summaryrefslogtreecommitdiff
path: root/py/builtinhelp.c
diff options
context:
space:
mode:
authorDan Halbert <halbert@halwitz.org>2017-07-15 17:03:24 -0400
committerScott Shawcroft <scott@tannewt.org>2017-07-16 16:00:41 -0700
commit0d2c1bf2bb130e5ddf7913165e6ae873a723dcf7 (patch)
treed66fc31091ce22075a90d3add7f163c58442a6d9 /py/builtinhelp.c
parentaf823e64c4768996e510bab613106018fde22329 (diff)
Fix problems that prevented use of internal frozen modules:
1. Allow -Wlto-type-mismatch to be just a warning when building with frozen modules. 2. Fix extern decls that triggered -Wnested-externs when building with frozen modules. 3. Pass the correct value of -mlongint-impl to $(MPY_TOOL). New file mpconfigport.mk to do this.
Diffstat (limited to 'py/builtinhelp.c')
-rw-r--r--py/builtinhelp.c12
1 files changed, 10 insertions, 2 deletions
diff --git a/py/builtinhelp.c b/py/builtinhelp.c
index 8ad23bc06..9903f2690 100644
--- a/py/builtinhelp.c
+++ b/py/builtinhelp.c
@@ -76,6 +76,16 @@ STATIC void mp_help_add_from_names(mp_obj_t list, const char *name) {
}
#endif
+// These externs were originally declared inside mp_help_print_modules(),
+// but they triggered -Wnested-externs, so they were moved outside.
+#if MICROPY_MODULE_FROZEN_STR
+extern const char mp_frozen_str_names[];
+#endif
+
+#if MICROPY_MODULE_FROZEN_MPY
+extern const char mp_frozen_mpy_names[];
+#endif
+
STATIC void mp_help_print_modules(void) {
mp_obj_t list = mp_obj_new_list(0, NULL);
@@ -86,12 +96,10 @@ STATIC void mp_help_print_modules(void) {
#endif
#if MICROPY_MODULE_FROZEN_STR
- extern const char mp_frozen_str_names[];
mp_help_add_from_names(list, mp_frozen_str_names);
#endif
#if MICROPY_MODULE_FROZEN_MPY
- extern const char mp_frozen_mpy_names[];
mp_help_add_from_names(list, mp_frozen_mpy_names);
#endif