Commit f78b6df1 authored by Damien George's avatar Damien George
Browse files

py: Disable dump_args function call entirely when not debugging.

Yes, I know, a good compiler will optimise this away, but I feel this is
parent e337f1ef
......@@ -151,15 +151,17 @@ typedef struct _mp_obj_fun_bc_t {
mp_obj_t extra_args[]; // values of default args (if any), plus a slot at the end for var args and/or kw args (if it takes them)
} mp_obj_fun_bc_t;
void dump_args(const mp_obj_t *a, int sz) {
STATIC void dump_args(const mp_obj_t *a, int sz) {
DEBUG_printf("%p: ", a);
for (int i = 0; i < sz; i++) {
DEBUG_printf("%p ", a[i]);
#define dump_args(...) (void)0
// If it's possible to call a function without allocating new argument array,
// this function returns true, together with pointers to 2 subarrays to be used
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment