Damien George
abc1959e2c
py, unix, lib: Allow to compile with -Wold-style-definition.
10 years ago
Damien George
0178aa9a11
py, unix: Allow to compile with -Wdouble-promotion.
Ref issue #699 .
10 years ago
Damien George
6d7e47087f
unix: Prefix includes with py/; remove need for -I../py.
10 years ago
Paul Sokolovsky
9d944c7fb2
unix: Rename "time" module to "utime" to allow extensibility.
Name choosen per latest conventions and for compatibiity with stmhal port.
10 years ago
Damien George
3b603f29ec
Use MP_DEFINE_CONST_DICT macro to define module dicts.
This is just a clean-up of the code. Generated code is exactly the
same.
10 years ago
Damien George
40f3c02682
Rename machine_(u)int_t to mp_(u)int_t.
See discussion in issue #50 .
10 years ago
stijn
5478ed18ea
unix: Fix mpconfig.h not being included before misc.h
This fixes count_lead_ones in misc.h not compiling due to unknown types
11 years ago
Emmanuel Blot
f6932d6506
Prefix ARRAY_SIZE with micropython prefix MP_
11 years ago
Marcus von Appen
585a3394df
- Cast the struct stat sb.st_ino field to machine_int_t explicitly to avoid a
cast error in MP_OBJ_NEW_SMALL_INT(). This is necessary for FreeBSD, where
st_ino is of different size
- If MP_CLOCKS_PER_SEC is defined on the target host, simply define CLOCK_DIV
as a fraction, regardless of the value of MP_CLOCKS_PER_SEC.
FreeBSD uses a non-POSIX compliant value of 128 for CLOCKS_PER_SEC
11 years ago
Damien George
fb510b3bf9
Rename bultins config variables to MICROPY_PY_BUILTINS_*.
This renames:
MICROPY_PY_FROZENSET -> MICROPY_PY_BUILTINS_FROZENSET
MICROPY_PY_PROPERTY -> MICROPY_PY_BUILTINS_PROPERTY
MICROPY_PY_SLICE -> MICROPY_PY_BUILTINS_SLICE
MICROPY_ENABLE_FLOAT -> MICROPY_PY_BUILTINS_FLOAT
See issue #35 for discussion.
11 years ago
stijn
f45a83d7fc
mingw: Fix compilation issues
- use lowercase windows.h
- fix for mingw32 using preprocessor-unfriendly definition of CLOCKS_PER_SEC
11 years ago
stijn
5ed284a15e
windows: Add modtime implementation
11 years ago
Damien George
04b9147e15
Add license header to (almost) all files.
Blanket wide to all .c and .h files. Some files originating from ST are
difficult to deal with (license wise) so it was left out of those.
Also merged modpyb.h, modos.h, modstm.h and modtime.h in stmhal/.
11 years ago
Damien George
6d3c5e4301
Add ARRAY_SIZE macro, and use it where possible.
11 years ago
Paul Sokolovsky
eb2fc9787a
unix modtime: Convert to static module structures.
11 years ago
Paul Sokolovsky
de8292202e
unix modtime: Adhere to MICROPY_ENABLE_FLOAT better.
11 years ago
Paul Sokolovsky
c39368427c
unix: Rename module sources per latest naming conventions (mod*.c).
11 years ago
Paul Sokolovsky
cd31d826bf
unix: Use STATIC modifier to enable code size analysis via map file.
11 years ago
Damien George
d17926db71
Rename rt_* to mp_*.
Mostly just a global search and replace. Except rt_is_true which
becomes mp_obj_is_true.
Still would like to tidy up some of the names, but this will do for now.
11 years ago
xbe
c93a22197b
unix: Clean up includes.
Remove unnecessary includes. Add includes that improve portability.
11 years ago
Damien George
0c36da0b59
Implement ROMable modules. Add math module.
mp_module_obj_t can now be put in ROM.
Configuration of float type is now similar to longint: can now choose
none, float or double as the implementation.
math module has basic math functions. For STM port, these are not yet
implemented (they are just stub functions).
11 years ago
Paul Sokolovsky
f766264582
unix: Implement time.sleep().
11 years ago
Paul Sokolovsky
6964422cf4
unix time.clock(): Actually return float value.
11 years ago
Paul Sokolovsky
a9459bc723
unix: Add basic time module (with time() and clock() functions).
Both return int so far (single-precision float doesn't have enough
bits to represent int32 precisely).
11 years ago