Paul Sokolovsky
59c675a64c
py: Include mpconfig.h before all other includes.
...
It defines types used by all other headers.
Fixes #691 .
2014-06-21 22:43:22 +03:00
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 ;-).
2014-06-20 18:00:23 +03:00
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.
2014-06-14 18:02:21 +03:00
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.
2014-06-01 13:32:54 +01:00
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.
2014-05-28 14:51:12 +01:00
Damien George
503d611033
py: Implement long int parsing in int(...).
...
Addresses issue #627 .
2014-05-28 14:07:21 +01:00
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/.
2014-05-03 23:27:38 +01:00
Andrew Scheller
f78cfaf8b5
Remove exception name from inside the exception message
...
This prevents micropython printing exception messages like
ImportError: ImportError: No module named 'foo'
2014-04-09 19:56:38 +01:00
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 .
2014-04-05 18:32:08 +01:00
Damien George
7b4b78bc33
py: Put back proper ValueError for badly parsed integers.
2014-03-21 20:46:38 +00:00
Damien George
dfbafabf6f
py: Improve mp_parse_num_integer; make it self contained.
2014-03-21 12:15:59 +00:00
Damien George
6e48f7fa85
py: Allow 'complex()' to take a string as first argument.
2014-03-21 11:45:46 +00:00
Damien George
c06ea7abf2
py: Implement parsing of infinity and nan for floats.
2014-03-21 10:55:08 +00:00
xbe
efe3422394
py: Clean up includes.
...
Remove unnecessary includes. Add includes that improve portability.
2014-03-17 02:43:40 -07:00
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.
2014-03-01 19:50:50 +00:00
Damien George
2077397118
py: Put number parsing code together in parsenum.c.
2014-02-22 18:12:43 +00:00