Commits

Anonymous committed 59ef6df

Removed stdcall.

Comments (0)

Files changed (4)

 #ifndef  _DLL_STUFF_HPP_
 #define  _DLL_STUFF_HPP_
 
-/* use stdcall convention under Windows, since this seems to
-   be more standard there and is important for calling from .NET */
-#if defined(_WIN32) || defined(__WIN32__)
-#  if defined(__GNUC__)
-#    define BAYESOPT_STDCALL __attribute__((stdcall))
-#  elif defined(_MSC_VER) || defined(_ICC) || defined(_STDCALL_SUPPORTED)
-#    define BAYESOPT_STDCALL __stdcall
-#  else
-#    define BAYESOPT_STDCALL
-#  endif
-#else
-#  define BAYESOPT_STDCALL
-#endif
 
 /* WINDOWS DLLs stuff */
 #if defined (BAYESOPT_DLL) && (defined(_WIN32) || defined(__WIN32__)) && !defined(__LCC__)
   #if defined(bayesopt_EXPORTS)
     #define  BAYESOPT_API __declspec(dllexport)
-	#define  BAYESOPT_C_API(T) extern __declspec(dllexport) T BAYESOPT_STDCALL
   #else
     #define  BAYESOPT_API __declspec(dllimport)
-	#define  BAYESOPT_C_API(T) extern __declspec(dllimport) T BAYESOPT_STDCALL
   #endif /* MyLibrary_EXPORTS */
 #else /* defined (_WIN32) */
  #define BAYESOPT_API
- #define BAYESOPT_C_API(T) extern T BAYESOPT_STDCALL
 #endif
 
         

include/nonparametricprocess.hpp

   /**
    * \brief Abstract class to implement non-parametric processes
    */
-  class BAYESOPT_API NonParametricProcess: public InnerOptimization
+  class NonParametricProcess: public InnerOptimization
   {
   public:
     NonParametricProcess(size_t dim, bopt_params parameters);
   /* These functions are added to simplify wrapping code       */
   /*************************************************************/
   /* surrogate_name str2surrogate (const char* name); */
-  BAYESOPT_C_API(learning_type)  str2learn     (const char* name);
+  BAYESOPT_API learning_type str2learn(const char* name);
 
   /* BAYESOPT_API const char* surrogate2str(surrogate_name name); */
-  BAYESOPT_C_API(const char*) learn2str(learning_type name);
+  BAYESOPT_API const char* learn2str(learning_type name);
 
-  BAYESOPT_C_API(bopt_params) initialize_parameters_to_default(void);
+  BAYESOPT_API bopt_params initialize_parameters_to_default(void);
 
 #ifdef __cplusplus
 }

wrappers/bayesoptwpr.h

  * 
  * @return error code
  */
-  BAYESOPT_C_API(int) bayes_optimization(int nDim, eval_func f, void* f_data,
+  BAYESOPT_API int bayes_optimization(int nDim, eval_func f, void* f_data,
 			 const double *lb, const double *ub,
 			 double *x, double *minf,
 			 bopt_params parameters);
  * 
  * @return error code
  */
-  BAYESOPT_C_API(int) bayes_optimization_disc(int nDim, eval_func f, void* f_data,
+  BAYESOPT_API int bayes_optimization_disc(int nDim, eval_func f, void* f_data,
 			      double *valid_x, size_t n_points,
 			      double *x, double *minf,
 			      bopt_params parameters);