Skip to content

Commit 7f3d41b

Browse files
committed
more4
1 parent 0daba21 commit 7f3d41b

File tree

2 files changed

+6
-11
lines changed

2 files changed

+6
-11
lines changed

log.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,10 @@
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

1010
void set_log_error(void (*func)(const char* fmt, ...)) {
1111
log_error_func = func;

log.h

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff 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

0 commit comments

Comments
 (0)