aboutsummaryrefslogtreecommitdiff
path: root/py/qstr.c
diff options
context:
space:
mode:
authorDamien George <damien.p.george@gmail.com>2015-01-16 17:47:07 +0000
committerDamien George <damien.p.george@gmail.com>2015-01-16 17:47:07 +0000
commit963a5a3e82ded7ee75adae72ae7cb14796fa150e (patch)
tree78402c85b98c1c8f1889d7af7dc6f4828a8f55a5 /py/qstr.c
parentf12ea7c7ed1ef97ee48c4356dbbc808cc2bdee4a (diff)
py, unix: Allow to compile with -Wsign-compare.
See issue #699.
Diffstat (limited to 'py/qstr.c')
-rw-r--r--py/qstr.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/py/qstr.c b/py/qstr.c
index 2553872b1..813f25150 100644
--- a/py/qstr.c
+++ b/py/qstr.c
@@ -49,7 +49,7 @@
// - data follows
// - \0 terminated (for now, so they can be printed using printf)
-#define Q_GET_HASH(q) ((q)[0] | ((q)[1] << 8))
+#define Q_GET_HASH(q) ((mp_uint_t)(q)[0] | ((mp_uint_t)(q)[1] << 8))
#define Q_GET_ALLOC(q) (2 + MICROPY_QSTR_BYTES_IN_LEN + Q_GET_LENGTH(q) + 1)
#define Q_GET_DATA(q) ((q) + 2 + MICROPY_QSTR_BYTES_IN_LEN)
#if MICROPY_QSTR_BYTES_IN_LEN == 1