diff options
Diffstat (limited to 'py')
-rw-r--r-- | py/gc.c | 2 | ||||
-rw-r--r-- | py/malloc.c | 2 | ||||
-rw-r--r-- | py/misc.h | 3 | ||||
-rw-r--r-- | py/qstr.c | 3 | ||||
-rw-r--r-- | py/runtime.c | 4 |
5 files changed, 8 insertions, 6 deletions
@@ -10,7 +10,7 @@ #if 0 // print debugging info #define DEBUG_PRINT (1) -#define DEBUG_printf(args...) printf(args) +#define DEBUG_printf DEBUG_printf #else // don't print debugging info #define DEBUG_printf(args...) (void)0 #endif diff --git a/py/malloc.c b/py/malloc.c index 5699d86b6..41cf1fd13 100644 --- a/py/malloc.c +++ b/py/malloc.c @@ -6,7 +6,7 @@ #include "mpconfig.h" #if 0 // print debugging info -#define DEBUG_printf(args...) printf(args) +#define DEBUG_printf DEBUG_printf #else // don't print debugging info #define DEBUG_printf(args...) (void)0 #endif @@ -117,4 +117,7 @@ void vstr_printf(vstr_t *vstr, const char *fmt, ...); void vstr_vprintf(vstr_t *vstr, const char *fmt, va_list ap); #endif +// Debugging helpers +int DEBUG_printf(const char *fmt, ...); + #endif // _INCLUDED_MINILIB_H @@ -10,8 +10,7 @@ // also probably need to include the length in the string data, to allow null bytes in the string #if 0 // print debugging info -#include <stdio.h> -#define DEBUG_printf(args...) printf(args) +#define DEBUG_printf DEBUG_printf #else // don't print debugging info #define DEBUG_printf(args...) (void)0 #endif diff --git a/py/runtime.c b/py/runtime.c index 9d93dbf2a..9fc0b9708 100644 --- a/py/runtime.c +++ b/py/runtime.c @@ -23,8 +23,8 @@ #if 0 // print debugging info #define DEBUG_PRINT (1) #define WRITE_CODE (1) -#define DEBUG_printf(args...) printf(args) -#define DEBUG_OP_printf(args...) printf(args) +#define DEBUG_printf DEBUG_printf +#define DEBUG_OP_printf(args...) DEBUG_printf(args) #else // don't print debugging info #define DEBUG_printf(args...) (void)0 #define DEBUG_OP_printf(args...) (void)0 |