Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
tools-mirror
Micropython
提交
93c4a6a3
M
Micropython
项目概览
tools-mirror
/
Micropython
12 个月 前同步成功
通知
0
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
M
Micropython
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
93c4a6a3
编写于
9月 21, 2016
作者:
D
Damien George
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
all: Remove 'name' member from mp_obj_module_t struct.
One can instead lookup __name__ in the modules dict to get the value.
上级
b0a46900
变更
62
隐藏空白更改
内联
并排
Showing
62 changed file
with
12 addition
and
66 deletion
+12
-66
cc3200/mods/modmachine.c
cc3200/mods/modmachine.c
+0
-1
cc3200/mods/modnetwork.c
cc3200/mods/modnetwork.c
+0
-1
cc3200/mods/modubinascii.c
cc3200/mods/modubinascii.c
+0
-1
cc3200/mods/moduhashlib.c
cc3200/mods/moduhashlib.c
+0
-1
cc3200/mods/moduos.c
cc3200/mods/moduos.c
+0
-1
cc3200/mods/modusocket.c
cc3200/mods/modusocket.c
+0
-1
cc3200/mods/modussl.c
cc3200/mods/modussl.c
+0
-1
cc3200/mods/modutime.c
cc3200/mods/modutime.c
+0
-1
cc3200/mods/modwipy.c
cc3200/mods/modwipy.c
+0
-1
esp8266/modesp.c
esp8266/modesp.c
+0
-1
esp8266/modmachine.c
esp8266/modmachine.c
+0
-1
esp8266/modnetwork.c
esp8266/modnetwork.c
+0
-1
esp8266/modonewire.c
esp8266/modonewire.c
+0
-1
esp8266/moduos.c
esp8266/moduos.c
+0
-1
esp8266/modutime.c
esp8266/modutime.c
+0
-1
extmod/modbtree.c
extmod/modbtree.c
+0
-1
extmod/modframebuf.c
extmod/modframebuf.c
+0
-1
extmod/modlwip.c
extmod/modlwip.c
+0
-1
extmod/modubinascii.c
extmod/modubinascii.c
+0
-1
extmod/moductypes.c
extmod/moductypes.c
+0
-1
extmod/moduhashlib.c
extmod/moduhashlib.c
+0
-1
extmod/moduheapq.c
extmod/moduheapq.c
+0
-1
extmod/modujson.c
extmod/modujson.c
+0
-1
extmod/modurandom.c
extmod/modurandom.c
+0
-1
extmod/modure.c
extmod/modure.c
+0
-1
extmod/modussl_axtls.c
extmod/modussl_axtls.c
+0
-1
extmod/moduzlib.c
extmod/moduzlib.c
+0
-1
extmod/modwebrepl.c
extmod/modwebrepl.c
+1
-2
extmod/modwebsocket.c
extmod/modwebsocket.c
+0
-1
pic16bit/modpyb.c
pic16bit/modpyb.c
+0
-1
py/modarray.c
py/modarray.c
+0
-1
py/modbuiltins.c
py/modbuiltins.c
+2
-1
py/modcmath.c
py/modcmath.c
+0
-1
py/modcollections.c
py/modcollections.c
+0
-1
py/modgc.c
py/modgc.c
+0
-1
py/modio.c
py/modio.c
+0
-1
py/modmath.c
py/modmath.c
+0
-1
py/modmicropython.c
py/modmicropython.c
+0
-1
py/modstruct.c
py/modstruct.c
+0
-1
py/modsys.c
py/modsys.c
+0
-1
py/modthread.c
py/modthread.c
+0
-1
py/moduerrno.c
py/moduerrno.c
+0
-1
py/obj.h
py/obj.h
+0
-1
py/objmodule.c
py/objmodule.c
+9
-4
py/runtime.c
py/runtime.c
+0
-1
stmhal/modmachine.c
stmhal/modmachine.c
+0
-1
stmhal/modnetwork.c
stmhal/modnetwork.c
+0
-1
stmhal/modpyb.c
stmhal/modpyb.c
+0
-1
stmhal/modstm.c
stmhal/modstm.c
+0
-1
stmhal/moduos.c
stmhal/moduos.c
+0
-1
stmhal/moduselect.c
stmhal/moduselect.c
+0
-1
stmhal/modusocket.c
stmhal/modusocket.c
+0
-1
stmhal/modutime.c
stmhal/modutime.c
+0
-1
teensy/modpyb.c
teensy/modpyb.c
+0
-1
unix/modffi.c
unix/modffi.c
+0
-1
unix/modjni.c
unix/modjni.c
+0
-1
unix/modmachine.c
unix/modmachine.c
+0
-1
unix/modos.c
unix/modos.c
+0
-1
unix/modsocket.c
unix/modsocket.c
+0
-1
unix/modtermios.c
unix/modtermios.c
+0
-1
unix/modtime.c
unix/modtime.c
+0
-1
unix/moduselect.c
unix/moduselect.c
+0
-1
未找到文件。
cc3200/mods/modmachine.c
浏览文件 @
93c4a6a3
...
...
@@ -213,6 +213,5 @@ STATIC MP_DEFINE_CONST_DICT(machine_module_globals, machine_module_globals_table
const
mp_obj_module_t
machine_module
=
{
.
base
=
{
&
mp_type_module
},
.
name
=
MP_QSTR_umachine
,
.
globals
=
(
mp_obj_dict_t
*
)
&
machine_module_globals
,
};
cc3200/mods/modnetwork.c
浏览文件 @
93c4a6a3
...
...
@@ -161,7 +161,6 @@ STATIC MP_DEFINE_CONST_DICT(mp_module_network_globals, mp_module_network_globals
const
mp_obj_module_t
mp_module_network
=
{
.
base
=
{
&
mp_type_module
},
.
name
=
MP_QSTR_network
,
.
globals
=
(
mp_obj_dict_t
*
)
&
mp_module_network_globals
,
};
...
...
cc3200/mods/modubinascii.c
浏览文件 @
93c4a6a3
...
...
@@ -58,6 +58,5 @@ STATIC MP_DEFINE_CONST_DICT(mp_module_binascii_globals, mp_module_binascii_globa
const
mp_obj_module_t
mp_module_ubinascii
=
{
.
base
=
{
&
mp_type_module
},
.
name
=
MP_QSTR_ubinascii
,
.
globals
=
(
mp_obj_dict_t
*
)
&
mp_module_binascii_globals
,
};
cc3200/mods/moduhashlib.c
浏览文件 @
93c4a6a3
...
...
@@ -204,7 +204,6 @@ STATIC MP_DEFINE_CONST_DICT(mp_module_hashlib_globals, mp_module_hashlib_globals
const
mp_obj_module_t
mp_module_uhashlib
=
{
.
base
=
{
&
mp_type_module
},
.
name
=
MP_QSTR_uhashlib
,
.
globals
=
(
mp_obj_dict_t
*
)
&
mp_module_hashlib_globals
,
};
cc3200/mods/moduos.c
浏览文件 @
93c4a6a3
...
...
@@ -602,6 +602,5 @@ STATIC MP_DEFINE_CONST_DICT(os_module_globals, os_module_globals_table);
const
mp_obj_module_t
mp_module_uos
=
{
.
base
=
{
&
mp_type_module
},
.
name
=
MP_QSTR_uos
,
.
globals
=
(
mp_obj_dict_t
*
)
&
os_module_globals
,
};
cc3200/mods/modusocket.c
浏览文件 @
93c4a6a3
...
...
@@ -541,6 +541,5 @@ STATIC MP_DEFINE_CONST_DICT(mp_module_usocket_globals, mp_module_usocket_globals
const
mp_obj_module_t
mp_module_usocket
=
{
.
base
=
{
&
mp_type_module
},
.
name
=
MP_QSTR_usocket
,
.
globals
=
(
mp_obj_dict_t
*
)
&
mp_module_usocket_globals
,
};
cc3200/mods/modussl.c
浏览文件 @
93c4a6a3
...
...
@@ -152,7 +152,6 @@ STATIC MP_DEFINE_CONST_DICT(mp_module_ussl_globals, mp_module_ussl_globals_table
const
mp_obj_module_t
mp_module_ussl
=
{
.
base
=
{
&
mp_type_module
},
.
name
=
MP_QSTR_ussl
,
.
globals
=
(
mp_obj_dict_t
*
)
&
mp_module_ussl_globals
,
};
cc3200/mods/modutime.c
浏览文件 @
93c4a6a3
...
...
@@ -196,6 +196,5 @@ STATIC MP_DEFINE_CONST_DICT(time_module_globals, time_module_globals_table);
const
mp_obj_module_t
mp_module_utime
=
{
.
base
=
{
&
mp_type_module
},
.
name
=
MP_QSTR_utime
,
.
globals
=
(
mp_obj_dict_t
*
)
&
time_module_globals
,
};
cc3200/mods/modwipy.c
浏览文件 @
93c4a6a3
...
...
@@ -26,6 +26,5 @@ STATIC MP_DEFINE_CONST_DICT(wipy_module_globals, wipy_module_globals_table);
const
mp_obj_module_t
wipy_module
=
{
.
base
=
{
&
mp_type_module
},
.
name
=
MP_QSTR_wipy
,
.
globals
=
(
mp_obj_dict_t
*
)
&
wipy_module_globals
,
};
esp8266/modesp.c
浏览文件 @
93c4a6a3
...
...
@@ -748,6 +748,5 @@ STATIC MP_DEFINE_CONST_DICT(esp_module_globals, esp_module_globals_table);
const
mp_obj_module_t
esp_module
=
{
.
base
=
{
&
mp_type_module
},
.
name
=
MP_QSTR_esp
,
.
globals
=
(
mp_obj_dict_t
*
)
&
esp_module_globals
,
};
esp8266/modmachine.c
浏览文件 @
93c4a6a3
...
...
@@ -271,7 +271,6 @@ STATIC MP_DEFINE_CONST_DICT(machine_module_globals, machine_module_globals_table
const
mp_obj_module_t
mp_module_machine
=
{
.
base
=
{
&
mp_type_module
},
.
name
=
MP_QSTR_umachine
,
.
globals
=
(
mp_obj_dict_t
*
)
&
machine_module_globals
,
};
...
...
esp8266/modnetwork.c
浏览文件 @
93c4a6a3
...
...
@@ -484,6 +484,5 @@ STATIC MP_DEFINE_CONST_DICT(mp_module_network_globals, mp_module_network_globals
const
mp_obj_module_t
network_module
=
{
.
base
=
{
&
mp_type_module
},
.
name
=
MP_QSTR_network
,
.
globals
=
(
mp_obj_dict_t
*
)
&
mp_module_network_globals
,
};
esp8266/modonewire.c
浏览文件 @
93c4a6a3
...
...
@@ -117,6 +117,5 @@ STATIC MP_DEFINE_CONST_DICT(onewire_module_globals, onewire_module_globals_table
const
mp_obj_module_t
onewire_module
=
{
.
base
=
{
&
mp_type_module
},
.
name
=
MP_QSTR_onewire
,
.
globals
=
(
mp_obj_dict_t
*
)
&
onewire_module_globals
,
};
esp8266/moduos.c
浏览文件 @
93c4a6a3
...
...
@@ -178,6 +178,5 @@ STATIC MP_DEFINE_CONST_DICT(os_module_globals, os_module_globals_table);
const
mp_obj_module_t
uos_module
=
{
.
base
=
{
&
mp_type_module
},
.
name
=
MP_QSTR_uos
,
.
globals
=
(
mp_obj_dict_t
*
)
&
os_module_globals
,
};
esp8266/modutime.c
浏览文件 @
93c4a6a3
...
...
@@ -173,6 +173,5 @@ STATIC MP_DEFINE_CONST_DICT(time_module_globals, time_module_globals_table);
const
mp_obj_module_t
utime_module
=
{
.
base
=
{
&
mp_type_module
},
.
name
=
MP_QSTR_utime
,
.
globals
=
(
mp_obj_dict_t
*
)
&
time_module_globals
,
};
extmod/modbtree.c
浏览文件 @
93c4a6a3
...
...
@@ -387,7 +387,6 @@ STATIC MP_DEFINE_CONST_DICT(mp_module_btree_globals, mp_module_btree_globals_tab
const
mp_obj_module_t
mp_module_btree
=
{
.
base
=
{
&
mp_type_module
},
.
name
=
MP_QSTR_btree
,
.
globals
=
(
mp_obj_dict_t
*
)
&
mp_module_btree_globals
,
};
...
...
extmod/modframebuf.c
浏览文件 @
93c4a6a3
...
...
@@ -213,7 +213,6 @@ STATIC MP_DEFINE_CONST_DICT(framebuf_module_globals, framebuf_module_globals_tab
const
mp_obj_module_t
mp_module_framebuf
=
{
.
base
=
{
&
mp_type_module
},
.
name
=
MP_QSTR_framebuf
,
.
globals
=
(
mp_obj_dict_t
*
)
&
framebuf_module_globals
,
};
...
...
extmod/modlwip.c
浏览文件 @
93c4a6a3
...
...
@@ -1309,7 +1309,6 @@ STATIC MP_DEFINE_CONST_DICT(mp_module_lwip_globals, mp_module_lwip_globals_table
const
mp_obj_module_t
mp_module_lwip
=
{
.
base
=
{
&
mp_type_module
},
.
name
=
MP_QSTR_lwip
,
.
globals
=
(
mp_obj_dict_t
*
)
&
mp_module_lwip_globals
,
};
...
...
extmod/modubinascii.c
浏览文件 @
93c4a6a3
...
...
@@ -232,7 +232,6 @@ STATIC MP_DEFINE_CONST_DICT(mp_module_binascii_globals, mp_module_binascii_globa
const
mp_obj_module_t
mp_module_ubinascii
=
{
.
base
=
{
&
mp_type_module
},
.
name
=
MP_QSTR_ubinascii
,
.
globals
=
(
mp_obj_dict_t
*
)
&
mp_module_binascii_globals
,
};
...
...
extmod/moductypes.c
浏览文件 @
93c4a6a3
...
...
@@ -710,7 +710,6 @@ STATIC MP_DEFINE_CONST_DICT(mp_module_uctypes_globals, mp_module_uctypes_globals
const
mp_obj_module_t
mp_module_uctypes
=
{
.
base
=
{
&
mp_type_module
},
.
name
=
MP_QSTR_uctypes
,
.
globals
=
(
mp_obj_dict_t
*
)
&
mp_module_uctypes_globals
,
};
...
...
extmod/moduhashlib.c
浏览文件 @
93c4a6a3
...
...
@@ -151,7 +151,6 @@ STATIC MP_DEFINE_CONST_DICT(mp_module_hashlib_globals, mp_module_hashlib_globals
const
mp_obj_module_t
mp_module_uhashlib
=
{
.
base
=
{
&
mp_type_module
},
.
name
=
MP_QSTR_uhashlib
,
.
globals
=
(
mp_obj_dict_t
*
)
&
mp_module_hashlib_globals
,
};
...
...
extmod/moduheapq.c
浏览文件 @
93c4a6a3
...
...
@@ -116,7 +116,6 @@ STATIC MP_DEFINE_CONST_DICT(mp_module_uheapq_globals, mp_module_uheapq_globals_t
const
mp_obj_module_t
mp_module_uheapq
=
{
.
base
=
{
&
mp_type_module
},
.
name
=
MP_QSTR_uheapq
,
.
globals
=
(
mp_obj_dict_t
*
)
&
mp_module_uheapq_globals
,
};
...
...
extmod/modujson.c
浏览文件 @
93c4a6a3
...
...
@@ -260,7 +260,6 @@ STATIC MP_DEFINE_CONST_DICT(mp_module_ujson_globals, mp_module_ujson_globals_tab
const
mp_obj_module_t
mp_module_ujson
=
{
.
base
=
{
&
mp_type_module
},
.
name
=
MP_QSTR_ujson
,
.
globals
=
(
mp_obj_dict_t
*
)
&
mp_module_ujson_globals
,
};
...
...
extmod/modurandom.c
浏览文件 @
93c4a6a3
...
...
@@ -215,7 +215,6 @@ STATIC MP_DEFINE_CONST_DICT(mp_module_urandom_globals, mp_module_urandom_globals
const
mp_obj_module_t
mp_module_urandom
=
{
.
base
=
{
&
mp_type_module
},
.
name
=
MP_QSTR_urandom
,
.
globals
=
(
mp_obj_dict_t
*
)
&
mp_module_urandom_globals
,
};
...
...
extmod/modure.c
浏览文件 @
93c4a6a3
...
...
@@ -237,7 +237,6 @@ STATIC MP_DEFINE_CONST_DICT(mp_module_re_globals, mp_module_re_globals_table);
const
mp_obj_module_t
mp_module_ure
=
{
.
base
=
{
&
mp_type_module
},
.
name
=
MP_QSTR_ure
,
.
globals
=
(
mp_obj_dict_t
*
)
&
mp_module_re_globals
,
};
...
...
extmod/modussl_axtls.c
浏览文件 @
93c4a6a3
...
...
@@ -196,7 +196,6 @@ STATIC MP_DEFINE_CONST_DICT(mp_module_ssl_globals, mp_module_ssl_globals_table);
const
mp_obj_module_t
mp_module_ussl
=
{
.
base
=
{
&
mp_type_module
},
.
name
=
MP_QSTR_ussl
,
.
globals
=
(
mp_obj_dict_t
*
)
&
mp_module_ssl_globals
,
};
...
...
extmod/moduzlib.c
浏览文件 @
93c4a6a3
...
...
@@ -204,7 +204,6 @@ STATIC MP_DEFINE_CONST_DICT(mp_module_uzlib_globals, mp_module_uzlib_globals_tab
const
mp_obj_module_t
mp_module_uzlib
=
{
.
base
=
{
&
mp_type_module
},
.
name
=
MP_QSTR_uzlib
,
.
globals
=
(
mp_obj_dict_t
*
)
&
mp_module_uzlib_globals
,
};
...
...
extmod/modwebrepl.c
浏览文件 @
93c4a6a3
...
...
@@ -340,7 +340,7 @@ STATIC const mp_obj_type_t webrepl_type = {
};
STATIC
const
mp_map_elem_t
webrepl_module_globals_table
[]
=
{
{
MP_OBJ_NEW_QSTR
(
MP_QSTR___name__
),
MP_OBJ_NEW_QSTR
(
MP_QSTR_
websocket
)
},
{
MP_OBJ_NEW_QSTR
(
MP_QSTR___name__
),
MP_OBJ_NEW_QSTR
(
MP_QSTR_
_webrepl
)
},
{
MP_OBJ_NEW_QSTR
(
MP_QSTR__webrepl
),
(
mp_obj_t
)
&
webrepl_type
},
{
MP_OBJ_NEW_QSTR
(
MP_QSTR_password
),
(
mp_obj_t
)
&
webrepl_set_password_obj
},
};
...
...
@@ -349,7 +349,6 @@ STATIC MP_DEFINE_CONST_DICT(webrepl_module_globals, webrepl_module_globals_table
const
mp_obj_module_t
mp_module_webrepl
=
{
.
base
=
{
&
mp_type_module
},
.
name
=
MP_QSTR__webrepl
,
.
globals
=
(
mp_obj_dict_t
*
)
&
webrepl_module_globals
,
};
...
...
extmod/modwebsocket.c
浏览文件 @
93c4a6a3
...
...
@@ -313,7 +313,6 @@ STATIC MP_DEFINE_CONST_DICT(websocket_module_globals, websocket_module_globals_t
const
mp_obj_module_t
mp_module_websocket
=
{
.
base
=
{
&
mp_type_module
},
.
name
=
MP_QSTR_websocket
,
.
globals
=
(
mp_obj_dict_t
*
)
&
websocket_module_globals
,
};
...
...
pic16bit/modpyb.c
浏览文件 @
93c4a6a3
...
...
@@ -66,6 +66,5 @@ STATIC MP_DEFINE_CONST_DICT(pyb_module_globals, pyb_module_globals_table);
const
mp_obj_module_t
pyb_module
=
{
.
base
=
{
&
mp_type_module
},
.
name
=
MP_QSTR_pyb
,
.
globals
=
(
mp_obj_dict_t
*
)
&
pyb_module_globals
,
};
py/modarray.c
浏览文件 @
93c4a6a3
...
...
@@ -37,7 +37,6 @@ STATIC MP_DEFINE_CONST_DICT(mp_module_array_globals, mp_module_array_globals_tab
const
mp_obj_module_t
mp_module_array
=
{
.
base
=
{
&
mp_type_module
},
.
name
=
MP_QSTR_array
,
.
globals
=
(
mp_obj_dict_t
*
)
&
mp_module_array_globals
,
};
...
...
py/modbuiltins.c
浏览文件 @
93c4a6a3
...
...
@@ -577,6 +577,8 @@ MP_DEFINE_CONST_FUN_OBJ_1(mp_builtin_id_obj, mp_obj_id);
MP_DEFINE_CONST_FUN_OBJ_1
(
mp_builtin_len_obj
,
mp_obj_len
);
STATIC
const
mp_rom_map_elem_t
mp_module_builtins_globals_table
[]
=
{
{
MP_ROM_QSTR
(
MP_QSTR___name__
),
MP_ROM_QSTR
(
MP_QSTR_builtins
)
},
// built-in core functions
{
MP_ROM_QSTR
(
MP_QSTR___build_class__
),
MP_ROM_PTR
(
&
mp_builtin___build_class___obj
)
},
{
MP_ROM_QSTR
(
MP_QSTR___import__
),
MP_ROM_PTR
(
&
mp_builtin___import___obj
)
},
...
...
@@ -727,6 +729,5 @@ MP_DEFINE_CONST_DICT(mp_module_builtins_globals, mp_module_builtins_globals_tabl
const
mp_obj_module_t
mp_module_builtins
=
{
.
base
=
{
&
mp_type_module
},
.
name
=
MP_QSTR_builtins
,
.
globals
=
(
mp_obj_dict_t
*
)
&
mp_module_builtins_globals
,
};
py/modcmath.c
浏览文件 @
93c4a6a3
...
...
@@ -160,7 +160,6 @@ STATIC MP_DEFINE_CONST_DICT(mp_module_cmath_globals, mp_module_cmath_globals_tab
const
mp_obj_module_t
mp_module_cmath
=
{
.
base
=
{
&
mp_type_module
},
.
name
=
MP_QSTR_cmath
,
.
globals
=
(
mp_obj_dict_t
*
)
&
mp_module_cmath_globals
,
};
...
...
py/modcollections.c
浏览文件 @
93c4a6a3
...
...
@@ -40,7 +40,6 @@ STATIC MP_DEFINE_CONST_DICT(mp_module_collections_globals, mp_module_collections
const
mp_obj_module_t
mp_module_collections
=
{
.
base
=
{
&
mp_type_module
},
.
name
=
MP_QSTR_ucollections
,
.
globals
=
(
mp_obj_dict_t
*
)
&
mp_module_collections_globals
,
};
...
...
py/modgc.c
浏览文件 @
93c4a6a3
...
...
@@ -119,7 +119,6 @@ STATIC MP_DEFINE_CONST_DICT(mp_module_gc_globals, mp_module_gc_globals_table);
const
mp_obj_module_t
mp_module_gc
=
{
.
base
=
{
&
mp_type_module
},
.
name
=
MP_QSTR_gc
,
.
globals
=
(
mp_obj_dict_t
*
)
&
mp_module_gc_globals
,
};
...
...
py/modio.c
浏览文件 @
93c4a6a3
...
...
@@ -153,7 +153,6 @@ STATIC MP_DEFINE_CONST_DICT(mp_module_io_globals, mp_module_io_globals_table);
const
mp_obj_module_t
mp_module_io
=
{
.
base
=
{
&
mp_type_module
},
.
name
=
MP_QSTR_uio
,
.
globals
=
(
mp_obj_dict_t
*
)
&
mp_module_io_globals
,
};
...
...
py/modmath.c
浏览文件 @
93c4a6a3
...
...
@@ -268,7 +268,6 @@ STATIC MP_DEFINE_CONST_DICT(mp_module_math_globals, mp_module_math_globals_table
const
mp_obj_module_t
mp_module_math
=
{
.
base
=
{
&
mp_type_module
},
.
name
=
MP_QSTR_math
,
.
globals
=
(
mp_obj_dict_t
*
)
&
mp_module_math_globals
,
};
...
...
py/modmicropython.c
浏览文件 @
93c4a6a3
...
...
@@ -145,6 +145,5 @@ STATIC MP_DEFINE_CONST_DICT(mp_module_micropython_globals, mp_module_micropython
const
mp_obj_module_t
mp_module_micropython
=
{
.
base
=
{
&
mp_type_module
},
.
name
=
MP_QSTR_micropython
,
.
globals
=
(
mp_obj_dict_t
*
)
&
mp_module_micropython_globals
,
};
py/modstruct.c
浏览文件 @
93c4a6a3
...
...
@@ -265,7 +265,6 @@ STATIC MP_DEFINE_CONST_DICT(mp_module_struct_globals, mp_module_struct_globals_t
const
mp_obj_module_t
mp_module_ustruct
=
{
.
base
=
{
&
mp_type_module
},
.
name
=
MP_QSTR_ustruct
,
.
globals
=
(
mp_obj_dict_t
*
)
&
mp_module_struct_globals
,
};
...
...
py/modsys.c
浏览文件 @
93c4a6a3
...
...
@@ -203,7 +203,6 @@ STATIC MP_DEFINE_CONST_DICT(mp_module_sys_globals, mp_module_sys_globals_table);
const
mp_obj_module_t
mp_module_sys
=
{
.
base
=
{
&
mp_type_module
},
.
name
=
MP_QSTR_sys
,
.
globals
=
(
mp_obj_dict_t
*
)
&
mp_module_sys_globals
,
};
...
...
py/modthread.c
浏览文件 @
93c4a6a3
...
...
@@ -294,7 +294,6 @@ STATIC MP_DEFINE_CONST_DICT(mp_module_thread_globals, mp_module_thread_globals_t
const
mp_obj_module_t
mp_module_thread
=
{
.
base
=
{
&
mp_type_module
},
.
name
=
MP_QSTR__thread
,
.
globals
=
(
mp_obj_dict_t
*
)
&
mp_module_thread_globals
,
};
...
...
py/moduerrno.c
浏览文件 @
93c4a6a3
...
...
@@ -89,7 +89,6 @@ STATIC MP_DEFINE_CONST_DICT(mp_module_uerrno_globals, mp_module_uerrno_globals_t
const
mp_obj_module_t
mp_module_uerrno
=
{
.
base
=
{
&
mp_type_module
},
.
name
=
MP_QSTR_uerrno
,
.
globals
=
(
mp_obj_dict_t
*
)
&
mp_module_uerrno_globals
,
};
...
...
py/obj.h
浏览文件 @
93c4a6a3
...
...
@@ -765,7 +765,6 @@ MP_DECLARE_CONST_FUN_OBJ(mp_identity_obj);
// module
typedef
struct
_mp_obj_module_t
{
mp_obj_base_t
base
;
qstr
name
;
mp_obj_dict_t
*
globals
;
}
mp_obj_module_t
;
mp_obj_dict_t
*
mp_obj_module_get_globals
(
mp_obj_t
self_in
);
...
...
py/objmodule.c
浏览文件 @
93c4a6a3
...
...
@@ -37,17 +37,23 @@ STATIC void module_print(const mp_print_t *print, mp_obj_t self_in, mp_print_kin
(
void
)
kind
;
mp_obj_module_t
*
self
=
MP_OBJ_TO_PTR
(
self_in
);
const
char
*
module_name
=
""
;
mp_map_elem_t
*
elem
=
mp_map_lookup
(
&
self
->
globals
->
map
,
MP_OBJ_NEW_QSTR
(
MP_QSTR___name__
),
MP_MAP_LOOKUP
);
if
(
elem
!=
NULL
)
{
module_name
=
mp_obj_str_get_str
(
elem
->
value
);
}
#if MICROPY_PY___FILE__
// If we store __file__ to imported modules then try to lookup this
// symbol to give more information about the module.
mp_map_elem_t
*
elem
=
mp_map_lookup
(
&
self
->
globals
->
map
,
MP_OBJ_NEW_QSTR
(
MP_QSTR___file__
),
MP_MAP_LOOKUP
);
elem
=
mp_map_lookup
(
&
self
->
globals
->
map
,
MP_OBJ_NEW_QSTR
(
MP_QSTR___file__
),
MP_MAP_LOOKUP
);
if
(
elem
!=
NULL
)
{
mp_printf
(
print
,
"<module '%
q' from '%s'>"
,
self
->
name
,
mp_obj_str_get_str
(
elem
->
value
));
mp_printf
(
print
,
"<module '%
s' from '%s'>"
,
module_
name
,
mp_obj_str_get_str
(
elem
->
value
));
return
;
}
#endif
mp_printf
(
print
,
"<module '%
q'>"
,
self
->
name
);
mp_printf
(
print
,
"<module '%
s'>"
,
module_
name
);
}
STATIC
void
module_attr
(
mp_obj_t
self_in
,
qstr
attr
,
mp_obj_t
*
dest
)
{
...
...
@@ -106,7 +112,6 @@ mp_obj_t mp_obj_new_module(qstr module_name) {
// create new module object
mp_obj_module_t
*
o
=
m_new_obj
(
mp_obj_module_t
);
o
->
base
.
type
=
&
mp_type_module
;
o
->
name
=
module_name
;
o
->
globals
=
MP_OBJ_TO_PTR
(
mp_obj_new_dict
(
MICROPY_MODULE_DICT_SIZE
));
// store __name__ entry in the module
...
...
py/runtime.c
浏览文件 @
93c4a6a3
...
...
@@ -55,7 +55,6 @@
const
mp_obj_module_t
mp_module___main__
=
{
.
base
=
{
&
mp_type_module
},
.
name
=
MP_QSTR___main__
,
.
globals
=
(
mp_obj_dict_t
*
)
&
MP_STATE_VM
(
dict_main
),
};
...
...
stmhal/modmachine.c
浏览文件 @
93c4a6a3
...
...
@@ -559,7 +559,6 @@ STATIC MP_DEFINE_CONST_DICT(machine_module_globals, machine_module_globals_table
const
mp_obj_module_t
machine_module
=
{
.
base
=
{
&
mp_type_module
},
.
name
=
MP_QSTR_umachine
,
.
globals
=
(
mp_obj_dict_t
*
)
&
machine_module_globals
,
};
stmhal/modnetwork.c
浏览文件 @
93c4a6a3
...
...
@@ -86,6 +86,5 @@ STATIC MP_DEFINE_CONST_DICT(mp_module_network_globals, mp_module_network_globals
const
mp_obj_module_t
mp_module_network
=
{
.
base
=
{
&
mp_type_module
},
.
name
=
MP_QSTR_network
,
.
globals
=
(
mp_obj_dict_t
*
)
&
mp_module_network_globals
,
};
stmhal/modpyb.c
浏览文件 @
93c4a6a3
...
...
@@ -229,6 +229,5 @@ STATIC MP_DEFINE_CONST_DICT(pyb_module_globals, pyb_module_globals_table);
const
mp_obj_module_t
pyb_module
=
{
.
base
=
{
&
mp_type_module
},
.
name
=
MP_QSTR_pyb
,
.
globals
=
(
mp_obj_dict_t
*
)
&
pyb_module_globals
,
};
stmhal/modstm.c
浏览文件 @
93c4a6a3
...
...
@@ -51,6 +51,5 @@ STATIC MP_DEFINE_CONST_DICT(stm_module_globals, stm_module_globals_table);
const
mp_obj_module_t
stm_module
=
{
.
base
=
{
&
mp_type_module
},
.
name
=
MP_QSTR_stm
,
.
globals
=
(
mp_obj_dict_t
*
)
&
stm_module_globals
,
};
stmhal/moduos.c
浏览文件 @
93c4a6a3
...
...
@@ -407,6 +407,5 @@ STATIC MP_DEFINE_CONST_DICT(os_module_globals, os_module_globals_table);
const
mp_obj_module_t
mp_module_uos
=
{
.
base
=
{
&
mp_type_module
},
.
name
=
MP_QSTR_uos
,
.
globals
=
(
mp_obj_dict_t
*
)
&
os_module_globals
,
};
stmhal/moduselect.c
浏览文件 @
93c4a6a3
...
...
@@ -307,6 +307,5 @@ STATIC MP_DEFINE_CONST_DICT(mp_module_select_globals, mp_module_select_globals_t
const
mp_obj_module_t
mp_module_uselect
=
{
.
base
=
{
&
mp_type_module
},
.
name
=
MP_QSTR_uselect
,
.
globals
=
(
mp_obj_dict_t
*
)
&
mp_module_select_globals
,
};
stmhal/modusocket.c
浏览文件 @
93c4a6a3
...
...
@@ -444,6 +444,5 @@ STATIC MP_DEFINE_CONST_DICT(mp_module_usocket_globals, mp_module_usocket_globals
const
mp_obj_module_t
mp_module_usocket
=
{
.
base
=
{
&
mp_type_module
},
.
name
=
MP_QSTR_usocket
,
.
globals
=
(
mp_obj_dict_t
*
)
&
mp_module_usocket_globals
,
};
stmhal/modutime.c
浏览文件 @
93c4a6a3
...
...
@@ -213,6 +213,5 @@ STATIC MP_DEFINE_CONST_DICT(time_module_globals, time_module_globals_table);
const
mp_obj_module_t
mp_module_utime
=
{
.
base
=
{
&
mp_type_module
},
.
name
=
MP_QSTR_utime
,
.
globals
=
(
mp_obj_dict_t
*
)
&
time_module_globals
,
};
teensy/modpyb.c
浏览文件 @
93c4a6a3
...
...
@@ -354,6 +354,5 @@ STATIC MP_DEFINE_CONST_DICT(pyb_module_globals, pyb_module_globals_table);
const
mp_obj_module_t
pyb_module
=
{
.
base
=
{
&
mp_type_module
},
.
name
=
MP_QSTR_pyb
,
.
globals
=
(
mp_obj_dict_t
*
)
&
pyb_module_globals
,
};
unix/modffi.c
浏览文件 @
93c4a6a3
...
...
@@ -499,6 +499,5 @@ STATIC MP_DEFINE_CONST_DICT(mp_module_ffi_globals, mp_module_ffi_globals_table);
const
mp_obj_module_t
mp_module_ffi
=
{
.
base
=
{
&
mp_type_module
},
.
name
=
MP_QSTR_ffi
,
.
globals
=
(
mp_obj_dict_t
*
)
&
mp_module_ffi_globals
,
};
unix/modjni.c
浏览文件 @
93c4a6a3
...
...
@@ -718,6 +718,5 @@ STATIC MP_DEFINE_CONST_DICT(mp_module_jni_globals, mp_module_jni_globals_table);
const
mp_obj_module_t
mp_module_jni
=
{
.
base
=
{
&
mp_type_module
},
.
name
=
MP_QSTR_jni
,
.
globals
=
(
mp_obj_dict_t
*
)
&
mp_module_jni_globals
,
};
unix/modmachine.c
浏览文件 @
93c4a6a3
...
...
@@ -91,7 +91,6 @@ STATIC MP_DEFINE_CONST_DICT(machine_module_globals, machine_module_globals_table
const
mp_obj_module_t
mp_module_machine
=
{
.
base
=
{
&
mp_type_module
},
.
name
=
MP_QSTR_umachine
,
.
globals
=
(
mp_obj_dict_t
*
)
&
machine_module_globals
,
};
...
...
unix/modos.c
浏览文件 @
93c4a6a3
...
...
@@ -253,6 +253,5 @@ STATIC MP_DEFINE_CONST_DICT(mp_module_os_globals, mp_module_os_globals_table);
const
mp_obj_module_t
mp_module_os
=
{
.
base
=
{
&
mp_type_module
},
.
name
=
MP_QSTR_uos
,
.
globals
=
(
mp_obj_dict_t
*
)
&
mp_module_os_globals
,
};
unix/modsocket.c
浏览文件 @
93c4a6a3
...
...
@@ -586,6 +586,5 @@ STATIC MP_DEFINE_CONST_DICT(mp_module_socket_globals, mp_module_socket_globals_t
const
mp_obj_module_t
mp_module_socket
=
{
.
base
=
{
&
mp_type_module
},
.
name
=
MP_QSTR_usocket
,
.
globals
=
(
mp_obj_dict_t
*
)
&
mp_module_socket_globals
,
};
unix/modtermios.c
浏览文件 @
93c4a6a3
...
...
@@ -151,6 +151,5 @@ STATIC MP_DEFINE_CONST_DICT(mp_module_termios_globals, mp_module_termios_globals
const
mp_obj_module_t
mp_module_termios
=
{
.
base
=
{
&
mp_type_module
},
.
name
=
MP_QSTR_termios
,
.
globals
=
(
mp_obj_dict_t
*
)
&
mp_module_termios_globals
,
};
unix/modtime.c
浏览文件 @
93c4a6a3
...
...
@@ -198,7 +198,6 @@ STATIC MP_DEFINE_CONST_DICT(mp_module_time_globals, mp_module_time_globals_table
const
mp_obj_module_t
mp_module_time
=
{
.
base
=
{
&
mp_type_module
},
.
name
=
MP_QSTR_utime
,
.
globals
=
(
mp_obj_dict_t
*
)
&
mp_module_time_globals
,
};
...
...
unix/moduselect.c
浏览文件 @
93c4a6a3
...
...
@@ -235,7 +235,6 @@ STATIC MP_DEFINE_CONST_DICT(mp_module_select_globals, mp_module_select_globals_t
const
mp_obj_module_t
mp_module_uselect
=
{
.
base
=
{
&
mp_type_module
},
.
name
=
MP_QSTR_uselect
,
.
globals
=
(
mp_obj_dict_t
*
)
&
mp_module_select_globals
,
};
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录