summaryrefslogtreecommitdiff
path: root/py/modsys.c
diff options
context:
space:
mode:
authorDavid Lechner <david@pybricks.com>2020-05-22 11:10:15 -0500
committerDamien George <damien.p.george@gmail.com>2020-05-28 10:02:14 +1000
commit093fd807606d088cfaf874e79060a6c68484cbfa (patch)
treed811e8afdadd5029184a7b3948814f66230261e9 /py/modsys.c
parent9523ca92e03e699494560ec964bea748b291c7a0 (diff)
py/modsys: Use consistent naming pattern for module-level const objects.
This renames a few identifiers to follow the usual naming convention of mp_<module>_<name>. This makes them easier to find, e.g. when grep'ing.
Diffstat (limited to 'py/modsys.c')
-rw-r--r--py/modsys.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/py/modsys.c b/py/modsys.c
index 8092d9799..586b13e74 100644
--- a/py/modsys.c
+++ b/py/modsys.c
@@ -53,7 +53,7 @@ const mp_print_t mp_sys_stdout_print = {&mp_sys_stdout_obj, mp_stream_write_adap
#endif
// version - Python language version that this implementation conforms to, as a string
-STATIC const MP_DEFINE_STR_OBJ(version_obj, "3.4.0");
+STATIC const MP_DEFINE_STR_OBJ(mp_sys_version_obj, "3.4.0");
// version_info - Python language version that this implementation conforms to, as a tuple of ints
#define I(n) MP_OBJ_NEW_SMALL_INT(n)
@@ -105,7 +105,7 @@ STATIC const mp_rom_obj_tuple_t mp_sys_implementation_obj = {
#ifdef MICROPY_PY_SYS_PLATFORM
// platform - the platform that MicroPython is running on
-STATIC const MP_DEFINE_STR_OBJ(platform_obj, MICROPY_PY_SYS_PLATFORM);
+STATIC const MP_DEFINE_STR_OBJ(mp_sys_platform_obj, MICROPY_PY_SYS_PLATFORM);
#endif
// exit([retval]): raise SystemExit, with optional argument given to the exception
@@ -189,11 +189,11 @@ STATIC const mp_rom_map_elem_t mp_module_sys_globals_table[] = {
{ MP_ROM_QSTR(MP_QSTR_path), MP_ROM_PTR(&MP_STATE_VM(mp_sys_path_obj)) },
{ MP_ROM_QSTR(MP_QSTR_argv), MP_ROM_PTR(&MP_STATE_VM(mp_sys_argv_obj)) },
- { MP_ROM_QSTR(MP_QSTR_version), MP_ROM_PTR(&version_obj) },
+ { MP_ROM_QSTR(MP_QSTR_version), MP_ROM_PTR(&mp_sys_version_obj) },
{ MP_ROM_QSTR(MP_QSTR_version_info), MP_ROM_PTR(&mp_sys_version_info_obj) },
{ MP_ROM_QSTR(MP_QSTR_implementation), MP_ROM_PTR(&mp_sys_implementation_obj) },
#ifdef MICROPY_PY_SYS_PLATFORM
- { MP_ROM_QSTR(MP_QSTR_platform), MP_ROM_PTR(&platform_obj) },
+ { MP_ROM_QSTR(MP_QSTR_platform), MP_ROM_PTR(&mp_sys_platform_obj) },
#endif
#if MP_ENDIANNESS_LITTLE
{ MP_ROM_QSTR(MP_QSTR_byteorder), MP_ROM_QSTR(MP_QSTR_little) },
@@ -210,7 +210,7 @@ STATIC const mp_rom_map_elem_t mp_module_sys_globals_table[] = {
// of "one" bits in sys.maxsize.
{ MP_ROM_QSTR(MP_QSTR_maxsize), MP_ROM_INT(MP_SMALL_INT_MAX) },
#else
- { MP_ROM_QSTR(MP_QSTR_maxsize), MP_ROM_PTR(&mp_maxsize_obj) },
+ { MP_ROM_QSTR(MP_QSTR_maxsize), MP_ROM_PTR(&mp_sys_maxsize_obj) },
#endif
#endif