summaryrefslogtreecommitdiff
path: root/py/showbc.c
diff options
context:
space:
mode:
authorDamien George <damien.p.george@gmail.com>2014-01-07 15:20:33 +0000
committerDamien George <damien.p.george@gmail.com>2014-01-07 15:20:33 +0000
commitd3ebe4829d920542e5af462e75179e4f0cadb946 (patch)
tree98b13b97030af834ef0a18114007edc43d442acf /py/showbc.c
parent136f67523b10d24dd65cb25e49e07a7e4e5341a1 (diff)
Factor and simplify Makefile's and mpconfig, part 2.
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 eb7d41b24..aea0aff67 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