Fix sys module

This commit is contained in:
Yaya.Cout
2021-12-15 13:40:13 +01:00
parent 46041e8e9a
commit dbbf27e59b
2 changed files with 10 additions and 2 deletions

View File

@@ -199,6 +199,13 @@ endif
$(call object_for,python/src/py/objmodule.c): SFLAGS += -DMP_QSTR_urandom="MP_QSTR_random"
$(call object_for,python/src/extmod/modurandom.c): SFLAGS += -DMP_QSTR_urandom="MP_QSTR_random"
# Rename usys to sys
# In order to change the name of the micropython module 'usys' to 'usys'
# (without altering micropython files), we redefined the macro MP_QSTR_usys
# by DMP_QSTR_sys.
$(call object_for,python/src/py/objmodule.c): SFLAGS += -DMP_QSTR_usys="MP_QSTR_sys"
$(call object_for,python/src/extmod/modusys.c): SFLAGS += -DMP_QSTR_usys="MP_QSTR_sys"
# Handle upward-growing stack
# Some platforms such as emscripten have a stack that grows up. We've rewritten
# the stack control file to handle this case.

View File

@@ -9,7 +9,8 @@
* - "cat build/genhdr/qstrdefs.preprocessed.h|grep '^Q'|uniq". CAUTION: the
* order is important, don't sort.
* - Insert the result below in the MicroPython QSTRs section
* - remove "QSTR(urandom)" as we renamed it to random */
* - remove "QSTR(urandom)" as we renamed it to random
* - remove "QSTR(usys)" as we renamed it to sys */
// Global configuration
QCFG(BYTES_IN_LEN, (1))
@@ -331,7 +332,7 @@ Q(union)
Q(update)
Q(upper)
Q(random)
Q(usys)
Q(sys)
Q(value)
Q(values)
Q(version)