summaryrefslogtreecommitdiffstatshomepage
path: root/py/qstr.h
diff options
context:
space:
mode:
authorDamien George <damien.p.george@gmail.com>2015-01-11 17:52:45 +0000
committerDamien George <damien.p.george@gmail.com>2015-01-11 22:06:53 +0000
commit6942f80a8feb521ff4dc2b457fa5cb3d039bee54 (patch)
tree586870b58e8930480f8ec63263ecec551b15477e /py/qstr.h
parente233a55a296a981bce5fe3a7c20049bea46e3a16 (diff)
downloadmicropython-6942f80a8feb521ff4dc2b457fa5cb3d039bee54.tar.gz
micropython-6942f80a8feb521ff4dc2b457fa5cb3d039bee54.zip
py: Add qstr cfg capability; generate QSTR_NULL and QSTR_ from script.
Diffstat (limited to 'py/qstr.h')
-rw-r--r--py/qstr.h7
1 files changed, 3 insertions, 4 deletions
diff --git a/py/qstr.h b/py/qstr.h
index d5ec1fed67..776c2ab8f7 100644
--- a/py/qstr.h
+++ b/py/qstr.h
@@ -35,12 +35,11 @@
// Note: it would be possible to define MP_QSTR_xxx as qstr_from_str_static("xxx")
// for qstrs that are referenced this way, but you don't want to have them in ROM.
+// first entry in enum will be MP_QSTR_NULL=0, which indicates invalid/no qstr
enum {
- MP_QSTR_NULL = 0, // indicates invalid/no qstr
- MP_QSTR_ = 1, // the empty qstr
-#define Q(id, str) MP_QSTR_##id,
+#define QDEF(id, str) id,
#include "genhdr/qstrdefs.generated.h"
-#undef Q
+#undef QDEF
MP_QSTR_number_of,
};