summaryrefslogtreecommitdiffstatshomepage
path: root/py/showbc.c
diff options
context:
space:
mode:
authorJohn R. Lenton <jlenton@gmail.com>2014-01-07 18:01:08 +0000
committerJohn R. Lenton <jlenton@gmail.com>2014-01-07 18:01:08 +0000
commit270112f7312f724e46ae34649dfce3ec43b697e0 (patch)
treed7438ae877350aede062d8ac7e62e52ab35cb018 /py/showbc.c
parentc06763a0207dde7f2060f7b1670a0b99298a01f8 (diff)
parentfd04bb3bacf5dbc4d79c04a49520e3e81abb7352 (diff)
downloadmicropython-270112f7312f724e46ae34649dfce3ec43b697e0.tar.gz
micropython-270112f7312f724e46ae34649dfce3ec43b697e0.zip
Merge remote-tracking branch 'upstream/master' into listsort. Lots of conflict fun.
Conflicts: py/obj.h py/objbool.c py/objboundmeth.c py/objcell.c py/objclass.c py/objclosure.c py/objcomplex.c py/objdict.c py/objexcept.c py/objfun.c py/objgenerator.c py/objinstance.c py/objmodule.c py/objrange.c py/objset.c py/objslice.c
Diffstat (limited to 'py/showbc.c')
-rw-r--r--py/showbc.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/py/showbc.c b/py/showbc.c
index eb7d41b24d..aea0aff67a 100644
--- a/py/showbc.c
+++ b/py/showbc.c
@@ -8,6 +8,8 @@
#include "mpconfig.h"
#include "bc0.h"
+#if MICROPY_SHOW_BC
+
#define DECODE_UINT do { unum = *ip++; if (unum > 127) { unum = ((unum & 0x3f) << 8) | (*ip++); } } while (0)
#define DECODE_ULABEL do { unum = (ip[0] | (ip[1] << 8)); ip += 2; } while (0)
#define DECODE_SLABEL do { unum = (ip[0] | (ip[1] << 8)) - 0x8000; ip += 2; } while (0)
@@ -363,3 +365,5 @@ void mp_show_byte_code(const byte *ip, int len) {
printf("\n");
}
}
+
+#endif // MICROPY_SHOW_BC