add ifdef __cplusplus to wrapper header file
This commit is contained in:
parent
b2850ae0f9
commit
42712988af
@ -6,7 +6,11 @@
|
|||||||
* \brief a C style wrapper of xgboost
|
* \brief a C style wrapper of xgboost
|
||||||
* can be used to create wrapper of other languages
|
* can be used to create wrapper of other languages
|
||||||
*/
|
*/
|
||||||
|
#ifdef __cplusplus
|
||||||
#include <cstdio>
|
#include <cstdio>
|
||||||
|
#else
|
||||||
|
#include <stdio.h>
|
||||||
|
#endif
|
||||||
#ifdef _MSC_VER
|
#ifdef _MSC_VER
|
||||||
#define XGB_DLL __declspec(dllexport)
|
#define XGB_DLL __declspec(dllexport)
|
||||||
#else
|
#else
|
||||||
@ -15,8 +19,9 @@
|
|||||||
// manually define unsign long
|
// manually define unsign long
|
||||||
typedef unsigned long bst_ulong;
|
typedef unsigned long bst_ulong;
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
extern "C" {
|
extern "C" {
|
||||||
|
#endif
|
||||||
/*!
|
/*!
|
||||||
* \brief load a data matrix
|
* \brief load a data matrix
|
||||||
* \return a loaded data matrix
|
* \return a loaded data matrix
|
||||||
@ -205,5 +210,7 @@ extern "C" {
|
|||||||
*/
|
*/
|
||||||
XGB_DLL const char **XGBoosterDumpModel(void *handle, const char *fmap,
|
XGB_DLL const char **XGBoosterDumpModel(void *handle, const char *fmap,
|
||||||
bst_ulong *out_len);
|
bst_ulong *out_len);
|
||||||
|
#ifdef __cplusplus
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
#endif // XGBOOST_WRAPPER_H_
|
#endif // XGBOOST_WRAPPER_H_
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user