summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlessandro Gatti <a.gatti@frob.it>2023-10-13 18:52:15 +0200
committerAlessandro Gatti <a.gatti@frob.it>2024-06-05 14:07:26 +0200
commit596f92bf77a44cefe5a3ec6e0c3fee8cfb5a3906 (patch)
tree5300ccfed2588be3beb34a7d25d0e2e3fa381f97
parent8809ae71610c2b3af4128c498d711535195d5221 (diff)
tools/makemanifest.py: Generate working code for empty manifests.
When no usable manifest directives are found (as opposed to no manifest being set in the makefile), non-compiling code was generated for the empty frozen constants pool block. Signed-off-by: Alessandro Gatti <a.gatti@frob.it>
-rw-r--r--tools/makemanifest.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/tools/makemanifest.py b/tools/makemanifest.py
index a74a6934a..e076a03e0 100644
--- a/tools/makemanifest.py
+++ b/tools/makemanifest.py
@@ -245,7 +245,11 @@ def main():
b'#include "py/emitglue.h"\n'
b"extern const qstr_pool_t mp_qstr_const_pool;\n"
b"const qstr_pool_t mp_qstr_frozen_const_pool = {\n"
- b" (qstr_pool_t*)&mp_qstr_const_pool, MP_QSTRnumber_of, 0, 0\n"
+ b" #if MICROPY_QSTR_BYTES_IN_HASH\n"
+ b" (qstr_pool_t*)&mp_qstr_const_pool, MP_QSTRnumber_of, 0, 0, 0, NULL, NULL, {},\n"
+ b" #else\n"
+ b" (qstr_pool_t*)&mp_qstr_const_pool, MP_QSTRnumber_of, 0, 0, 0, NULL, {},\n"
+ b" #endif\n"
b"};\n"
b'const char mp_frozen_names[] = { MP_FROZEN_STR_NAMES "\\0"};\n'
b"const mp_raw_code_t *const mp_frozen_mpy_content[] = {NULL};\n"