ports/sh: seed random module (untested)

This commit is contained in:
Lephenixnoir 2024-02-13 14:32:58 +01:00
parent 0f867e9f72
commit a2b9c32cea
Signed by: Lephenixnoir
GPG Key ID: 1BBA026E13FC0495
1 changed files with 4 additions and 0 deletions

View File

@ -7,6 +7,7 @@
#include <stdint.h>
#include <alloca.h>
#include <gint/rtc.h>
#include "widget_shell.h"
/* Debugging options: PythonExtra debug tools (pretty much required for any
@ -95,6 +96,9 @@ extern const struct _mp_print_t mp_debug_print;
/* Enable alias of u-modules */
#define MICROPY_MODULE_WEAK_LINKS (1)
/* Seed for random module */
#define MICROPY_PY_RANDOM_SEED_INIT_FUNC (rtc_ticks())
/* Command executed automatically after every shell input */
void pe_after_python_exec(
int input_kind, int exec_flags, void *ret_val, int *ret);