File tree 5 files changed +11
-10
lines changed
5 files changed +11
-10
lines changed Original file line number Diff line number Diff line change @@ -132,8 +132,6 @@ extern const mp_obj_module_t mp_module___main__;
132
132
extern const mp_obj_module_t mp_module_builtins ;
133
133
extern const mp_obj_module_t mp_module_sys ;
134
134
135
- void mp_module_sys_attr (mp_obj_t self_in , qstr attr , mp_obj_t * dest );
136
-
137
135
// Modules needed by the parser when MICROPY_COMP_MODULE_CONST is enabled.
138
136
extern const mp_obj_module_t mp_module_errno ;
139
137
extern const mp_obj_module_t mp_module_uctypes ;
Original file line number Diff line number Diff line change @@ -106,7 +106,10 @@ def generate_module_delegations(delegations):
106
106
if not delegations :
107
107
return
108
108
109
- print ("\n #define MICROPY_MODULE_DELEGATIONS \\ " )
109
+ print ()
110
+ for obj_module , fun_name in delegations :
111
+ print ("extern void {}(mp_obj_t self_in, qstr attr, mp_obj_t *dest);" .format (fun_name ))
112
+ print ("#define MICROPY_MODULE_DELEGATIONS \\ " )
110
113
for obj_module , fun_name in delegations :
111
114
print (
112
115
" {{ MP_ROM_PTR(&{obj_module}), {fun_name} }}, \\ " .format (
Original file line number Diff line number Diff line change @@ -336,7 +336,7 @@ MP_REGISTER_ROOT_POINTER(mp_obj_t sys_exitfunc);
336
336
#if MICROPY_PY_SYS_ATTR_DELEGATION
337
337
// Contains mutable sys attributes.
338
338
MP_REGISTER_ROOT_POINTER (mp_obj_t sys_mutable [MP_SYS_MUTABLE_NUM ]);
339
- MP_REGISTER_MODULE_DELEGATION (mp_module_sys , & mp_module_sys_attr );
339
+ MP_REGISTER_MODULE_DELEGATION (mp_module_sys , mp_module_sys_attr );
340
340
#endif
341
341
342
342
#endif // MICROPY_PY_SYS
Original file line number Diff line number Diff line change 34
34
#include "py/runtime.h"
35
35
#include "py/builtin.h"
36
36
37
- #ifndef NO_QSTR
38
- // Only include module definitions when not doing qstr extraction, because the
39
- // qstr extraction stage also generates this module definition header file.
40
- #include "genhdr/moduledefs.h"
41
- #endif
42
-
43
37
STATIC void module_print (const mp_print_t * print , mp_obj_t self_in , mp_print_kind_t kind ) {
44
38
(void )kind ;
45
39
mp_obj_module_t * self = MP_OBJ_TO_PTR (self_in );
Original file line number Diff line number Diff line change 28
28
29
29
#include "py/obj.h"
30
30
31
+ #ifndef NO_QSTR
32
+ // Only include module definitions when not doing qstr extraction, because the
33
+ // qstr extraction stage also generates this module definition header file.
34
+ #include "genhdr/moduledefs.h"
35
+ #endif
36
+
31
37
extern const mp_map_t mp_builtin_module_map ;
32
38
extern const mp_map_t mp_builtin_extensible_module_map ;
33
39
You can’t perform that action at this time.
0 commit comments