aboutsummaryrefslogtreecommitdiff
path: root/py/bc.h
diff options
context:
space:
mode:
authorDamien George <damien.p.george@gmail.com>2017-01-27 12:34:09 +1100
committerDamien George <damien.p.george@gmail.com>2017-01-27 12:34:09 +1100
commitcc4c1adf6e05dcda54393fe512e47463fc45414e (patch)
treeee2361f0698468cbbcc750825656afa119a53d0c /py/bc.h
parent4614403f63cad9f5eac09046a70e332b29584c9c (diff)
py/showbc: Make sure to set the const_table before printing bytecode.
Diffstat (limited to 'py/bc.h')
-rw-r--r--py/bc.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/py/bc.h b/py/bc.h
index 4707da179..c7dffbac5 100644
--- a/py/bc.h
+++ b/py/bc.h
@@ -94,9 +94,9 @@ mp_code_state_t *mp_obj_fun_bc_prepare_codestate(mp_obj_t func, size_t n_args, s
struct _mp_obj_fun_bc_t;
void mp_setup_code_state(mp_code_state_t *code_state, struct _mp_obj_fun_bc_t *self, size_t n_args, size_t n_kw, const mp_obj_t *args);
void mp_bytecode_print(const void *descr, const byte *code, mp_uint_t len, const mp_uint_t *const_table);
-void mp_bytecode_print2(const byte *code, mp_uint_t len);
+void mp_bytecode_print2(const byte *code, size_t len, const mp_uint_t *const_table);
const byte *mp_bytecode_print_str(const byte *ip);
-#define mp_bytecode_print_inst(code) mp_bytecode_print2(code, 1)
+#define mp_bytecode_print_inst(code, const_table) mp_bytecode_print2(code, 1, const_table)
// Helper macros to access pointer with least significant bits holding flags
#define MP_TAGPTR_PTR(x) ((void*)((uintptr_t)(x) & ~((uintptr_t)3)))