[apps] Python: Refining random module

This commit is contained in:
Émilie Feral
2018-01-05 17:01:51 +01:00
committed by Ecco
parent 4a3b935e7b
commit 5c23003e50
10 changed files with 101 additions and 80 deletions

View File

@@ -141,7 +141,13 @@ python/src/py/emitnative.o: CFLAGS += -DN_THUMB
extmod_objs += $(addprefix python/src/extmod/,\
modurandom.o \
)
)
# In order to change the name of the micropython module 'urandom' to 'random'
# (without altering micropython files), we redefined the macro MP_QSTR_urandom
# by DMP_QSTR_random.
python/src/py/objmodule.o: SFLAGS += -DMP_QSTR_urandom="MP_QSTR_random"
python/src/extmod/modurandom.o: SFLAGS += -DMP_QSTR_urandom="MP_QSTR_random"
#extmod_objs += $(addprefix python/src/extmod/,\
moductypes.o \

View File

@@ -275,7 +275,6 @@ Q(value)
Q(values)
Q(zip)
Q({:#b})
Q(urandom)
Q(getrandbits)
Q(seed)
Q(random)