summaryrefslogtreecommitdiff
path: root/py/objmodule.h
diff options
context:
space:
mode:
authorDamien George <damien@micropython.org>2023-06-12 13:09:48 +1000
committerDamien George <damien@micropython.org>2023-06-14 19:03:46 +1000
commit5ce1a03a78bf87c914d53f63a35cf2b81963e6e4 (patch)
tree93aca7cbe52a9edd02441372041e6d1927b58852 /py/objmodule.h
parent44295c9daa8a9210e2855ef431de21362c0cb662 (diff)
py/makemoduledefs.py: Automatically declare delegation attr functions.
So that the delegation functions don't need to be put somewhere global, like in mpconfigport.h. That would otherwise make it hard for extension modules to use delegation. Signed-off-by: Damien George <damien@micropython.org>
Diffstat (limited to 'py/objmodule.h')
-rw-r--r--py/objmodule.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/py/objmodule.h b/py/objmodule.h
index 9cc9a2f10..8b14cd9fc 100644
--- a/py/objmodule.h
+++ b/py/objmodule.h
@@ -28,6 +28,12 @@
#include "py/obj.h"
+#ifndef NO_QSTR
+// Only include module definitions when not doing qstr extraction, because the
+// qstr extraction stage also generates this module definition header file.
+#include "genhdr/moduledefs.h"
+#endif
+
extern const mp_map_t mp_builtin_module_map;
extern const mp_map_t mp_builtin_extensible_module_map;