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 <a.gatti@frob.it>
1 parent 8809ae7 commit 596f92b

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

tools/makemanifest.py

Lines changed: 5 additions & 1 deletion
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)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy