Skip to content

Commit 596f92b

Browse files
committed
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 <[email protected]>
1 parent 8809ae7 commit 596f92b

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

tools/makemanifest.py

+5-1
Original file line numberDiff line numberDiff line change
@@ -245,7 +245,11 @@ def main():
245245
b'#include "py/emitglue.h"\n'
246246
b"extern const qstr_pool_t mp_qstr_const_pool;\n"
247247
b"const qstr_pool_t mp_qstr_frozen_const_pool = {\n"
248-
b" (qstr_pool_t*)&mp_qstr_const_pool, MP_QSTRnumber_of, 0, 0\n"
248+
b" #if MICROPY_QSTR_BYTES_IN_HASH\n"
249+
b" (qstr_pool_t*)&mp_qstr_const_pool, MP_QSTRnumber_of, 0, 0, 0, NULL, NULL, {},\n"
250+
b" #else\n"
251+
b" (qstr_pool_t*)&mp_qstr_const_pool, MP_QSTRnumber_of, 0, 0, 0, NULL, {},\n"
252+
b" #endif\n"
249253
b"};\n"
250254
b'const char mp_frozen_names[] = { MP_FROZEN_STR_NAMES "\\0"};\n'
251255
b"const mp_raw_code_t *const mp_frozen_mpy_content[] = {NULL};\n"

0 commit comments

Comments
 (0)