summaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorDamien George <damien.p.george@gmail.com>2015-12-17 12:45:22 +0000
committerDamien George <damien.p.george@gmail.com>2015-12-17 12:45:22 +0000
commit6e2fb56d40832564a164cd5a878cb52d8392b0fd (patch)
tree25ab07b5ead84d38c78bc5f4f0981b0838eb4bdc
parent257848587fb03879e145a34c8065927cf4d1532f (diff)
downloadmicropython-6e2fb56d40832564a164cd5a878cb52d8392b0fd.tar.gz
micropython-6e2fb56d40832564a164cd5a878cb52d8392b0fd.zip
py/qstr: Change type of qstr from mp_uint_t to size_t.
For builds where mp_uint_t is larger than size_t, it doesn't make sense to use such a wide type for qstrs. There can only be as many qstrs as there is address space on the machine, so size_t is the correct type to use. Saves about 3000 bytes of code size when building unix/ port with MICROPY_OBJ_REPR_D.
-rw-r--r--py/qstr.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/py/qstr.h b/py/qstr.h
index 6f9da14acb..b68f60a443 100644
--- a/py/qstr.h
+++ b/py/qstr.h
@@ -43,7 +43,7 @@ enum {
MP_QSTR_number_of,
};
-typedef mp_uint_t qstr;
+typedef size_t qstr;
typedef struct _qstr_pool_t {
struct _qstr_pool_t *prev;