treelite
c_api_common.h
1 
9 /* Note: Make sure to use slash-asterisk form of comments in this file
10  * (like this one). Do not use double-slash (//). */
11 
12 #ifndef TREELITE_C_API_COMMON_H_
13 #define TREELITE_C_API_COMMON_H_
14 
15 #ifdef __cplusplus
16 #define TREELITE_EXTERN_C extern "C"
17 #include <cstdio>
18 #include <cstdint>
19 #else
20 #define TREELITE_EXTERN_C
21 #include <stdio.h>
22 #include <stdint.h>
23 #endif
24 
25 /* special symbols for DLL library on Windows */
26 #if defined(_MSC_VER) || defined(_WIN32)
27 #define TREELITE_DLL TREELITE_EXTERN_C __declspec(dllexport)
28 #else
29 #define TREELITE_DLL TREELITE_EXTERN_C
30 #endif
31 
37 TREELITE_DLL const char* TreeliteGetLastError(void);
38 
46 TREELITE_DLL int TreeliteRegisterLogCallback(void (*callback)(const char*));
47 
48 #endif // TREELITE_C_API_COMMON_H_