treelite
c_api_common.h
Go to the documentation of this file.
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();
38 
46 TREELITE_DLL int TreeliteRegisterLogCallback(void (*callback)(const char*));
47 
48 #endif // TREELITE_C_API_COMMON_H_
const char * TreeliteGetLastError()
display last error; can be called by multiple threads Note. Each thread will get the last error occur...
Definition: c_api_error.cc:16
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