File tree Expand file tree Collapse file tree 2 files changed +6
-11
lines changed
Expand file tree Collapse file tree 2 files changed +6
-11
lines changed Original file line number Diff line number Diff line change 22// Define function pointers
33#include "log.h"
44
5- void (* log_error_func )(const char * fmt , ...);
6- void (* log_warn_func )(const char * fmt , ...);
7- void (* log_info_func )(const char * fmt , ...);
8- void (* log_debug_func )(const char * fmt , ...);
5+ static void (* log_error_func )(const char * fmt , ...);
6+ static void (* log_warn_func )(const char * fmt , ...);
7+ static void (* log_info_func )(const char * fmt , ...);
8+ static void (* log_debug_func )(const char * fmt , ...);
99
1010void set_log_error (void (* func )(const char * fmt , ...)) {
1111 log_error_func = func ;
Original file line number Diff line number Diff line change @@ -15,12 +15,7 @@ void log_debug(const char *fmt, ...);
1515 log_error(fmt, ##__VA_ARGS__);
1616#define LOG_WARN (fmt , ...) \
1717 log_warn(fmt, ##__VA_ARGS__);
18- #ifdef _DEBUG
19- # define LOG_INFO (fmt , ...) \
18+ #define LOG_INFO (fmt , ...) \
2019 log_info(fmt, ##__VA_ARGS__);
21- # define LOG_DEBUG (fmt , ...) \
20+ #define LOG_DEBUG (fmt , ...) \
2221 log_debug(fmt, ##__VA_ARGS__);
23- #else
24- # define LOG_INFO (fmt , ...)
25- # define LOG_DEBUG (fmt , ...)
26- #endif
You can’t perform that action at this time.
0 commit comments