Treelite
c_api_common.h
Go to the documentation of this file.
1 
9 #ifndef TREELITE_C_API_COMMON_H_
10 #define TREELITE_C_API_COMMON_H_
11 
12 #ifdef __cplusplus
13 #define TREELITE_EXTERN_C extern "C"
14 #include <cstdio>
15 #include <cstdint>
16 #else
17 #define TREELITE_EXTERN_C
18 #include <stdio.h>
19 #include <stdint.h>
20 #endif
21 
22 /* special symbols for DLL library on Windows */
23 #if defined(_MSC_VER) || defined(_WIN32)
24 #define TREELITE_DLL TREELITE_EXTERN_C __declspec(dllexport)
25 #else
26 #define TREELITE_DLL TREELITE_EXTERN_C
27 #endif
28 
34 TREELITE_DLL const char* TreeliteGetLastError(void);
35 
43 TREELITE_DLL int TreeliteRegisterLogCallback(void (*callback)(const char*));
44 
45 #endif // TREELITE_C_API_COMMON_H_
int TreeliteRegisterLogCallback(void(*callback)(const char *))
register callback function for LOG(INFO) messages – helpful messages that are not errors...
Definition: c_api_common.cc:14
const char * TreeliteGetLastError(void)
display last error; can be called by multiple threads Note. Each thread will get the last error occur...
Definition: c_api_error.cc:16