diff options
author | stijn <stinos@zoho.com> | 2014-05-03 11:28:29 +0200 |
---|---|---|
committer | stijn <stinos@zoho.com> | 2014-05-03 20:15:15 +0200 |
commit | 72521a1c176506c044169038b68b83e5329a3dda (patch) | |
tree | 865f701b5e1a12485e9953e6b6e2ce6ee7082386 /py | |
parent | 6ec835dfef90a2f940a24b126cba8e3d8ede1ef2 (diff) | |
download | micropython-72521a1c176506c044169038b68b83e5329a3dda.tar.gz micropython-72521a1c176506c044169038b68b83e5329a3dda.zip |
mingw: Fix number of exponent digits in floating point formatting
By default mingw outputs 3 digits instead of the standard 2 so all float
tests using printf fail. Using setenv at the start of the program fixes this.
To accomodate calling platform specific initialization a
MICROPY_MAIN_INIT_FUNC macro is used which is called in mp_init()
Diffstat (limited to 'py')
-rw-r--r-- | py/runtime.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/py/runtime.c b/py/runtime.c index 2928de8a72..ba78ec40f3 100644 --- a/py/runtime.c +++ b/py/runtime.c @@ -42,6 +42,11 @@ const mp_obj_module_t mp_module___main__ = { }; void mp_init(void) { + // call port specific initialization if any +#ifdef MICROPY_PORT_INIT_FUNC + MICROPY_PORT_INIT_FUNC; +#endif + mp_emit_glue_init(); // init global module stuff |