summaryrefslogtreecommitdiff
path: root/examples/usercmodule/cexample/examplemodule.c
diff options
context:
space:
mode:
authorDamien George <damien@micropython.org>2020-10-20 14:20:00 +1100
committerDamien George <damien@micropython.org>2020-10-29 14:15:16 +1100
commit6f34800884f0a9a0c7116a7c5b94c6db38c4b417 (patch)
treeeee620573593efa4895a2143f301d76f884a0f02 /examples/usercmodule/cexample/examplemodule.c
parent3e455e9792b5851a21ed2d94d518b21557d2a361 (diff)
extmod/modurandom: Support urandom.seed() without an argument.
If a port provides MICROPY_PY_URANDOM_SEED_INIT_FUNC as a source of randomness then this will be used when urandom.seed() is called without an argument (or with None as the argument) to seed the pRNG. Other related changes in this commit: - mod_urandom___init__ is changed to call seed() without arguments, instead of explicitly passing in the result of MICROPY_PY_URANDOM_SEED_INIT_FUNC. - mod_urandom___init__ will only ever seed the pRNG once (before it could seed it again if imported by, eg, random and then urandom). - The Yasmarang state is moved to the BSS for builds where the state is guaranteed to be initialised on import of the (u)random module. Signed-off-by: Damien George <damien@micropython.org>
Diffstat (limited to 'examples/usercmodule/cexample/examplemodule.c')
0 files changed, 0 insertions, 0 deletions