Paul Sokolovsky
3b6f7b95eb
py: Separate MICROPY_PY_BUILTINS_COMPLEX from MICROPY_PY_BUILTINS_FLOAT.
One thing is wanting to do 1 / 2 and get something else but 0, and quite
another - doing rocket science ;-).
11 years ago
Paul Sokolovsky
0294661da5
parsenum: Signedness issues.
char can be signedness, and using signedness types is dangerous - it can
lead to negative offsets when doing table lookups. We apparently should just
ban char usage.
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
Damien George
d1e355ea8e
py: Fix check of small-int overflow when parsing ints.
Also unifies use of SMALL_INT_FITS macro across parser and runtime.
11 years ago
Damien George
503d611033
py: Implement long int parsing in int(...).
Addresses issue #627 .
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
Andrew Scheller
f78cfaf8b5
Remove exception name from inside the exception message
This prevents micropython printing exception messages like
ImportError: ImportError: No module named 'foo'
11 years ago
Damien George
ea13f407a3
py: Change nlr_jump to nlr_raise, to aid in debugging.
This does not affect code size or performance when debugging turned off.
To address issue #420 .
11 years ago
Damien George
7b4b78bc33
py: Put back proper ValueError for badly parsed integers.
11 years ago
Damien George
dfbafabf6f
py: Improve mp_parse_num_integer; make it self contained.
11 years ago
Damien George
6e48f7fa85
py: Allow 'complex()' to take a string as first argument.
11 years ago
Damien George
c06ea7abf2
py: Implement parsing of infinity and nan for floats.
11 years ago
xbe
efe3422394
py: Clean up includes.
Remove unnecessary includes. Add includes that improve portability.
11 years ago
Damien George
06201ff3d6
py: Implement bit-shift and not operations for mpz.
Implement not, shl and shr in mpz library. Add function to create mpzs
on the stack, used for memory efficiency when rhs is a small int.
Factor out code to parse base-prefix of number into a dedicated function.
11 years ago
Damien George
2077397118
py: Put number parsing code together in parsenum.c.
11 years ago