Damien George
aa7cf6f72f
stm: Remove long-obsolete stm/ port.
11 years ago
Damien George
63436ce22e
unix, Mac support: Generate order.def via Makefile.
11 years ago
Damien George
0fd01683c6
Merge pull request #607 from Anton-2/osx-clang
Allow compilation of unix port under clang on OS X
11 years ago
Damien George
6ac5dced24
py: Rename MP_OBJ_NOT_SUPPORTED to MP_OBJ_NULL.
See issue #608 for justification.
11 years ago
Damien George
6d197740cf
stmhal: Stop USB before entering DFU by software.
11 years ago
Paul Sokolovsky
008343f640
Merge pull request #621 from stinos/migw-w64-fix
windows: Fix compilation with mingw-w64 so it uses correct printf implem...
11 years ago
Paul Sokolovsky
053765414c
modstruct: struct_calcsize: Fix case of uninitialized var.
11 years ago
stijn
32acd4b9f1
windows: Fix compilation with mingw-w64 so it uses correct printf implementations
Without this flag, mingw-w64 uses the MS implementations of snpintf and the likes.
This is not really a problem since they work with the the fixes provided for msvc,
but due to the way mingw-w64's stdio.h is structured we cannot get it to use the fixes.
11 years ago
Paul Sokolovsky
44a949d58c
qemu-arm: Disable "io" module.
11 years ago
Paul Sokolovsky
9e29666bf9
py: Implement proper separation between io.FileIO and io.TextIOWrapper.
io.FileIO is binary I/O, ans actually optional. Default file type is
io.TextIOWrapper, which provides str results. CPython3 explicitly describes
io.TextIOWrapper as buffered I/O, but we don't have buffering support yet
anyway.
11 years ago
Paul Sokolovsky
52386cafa0
objexcept: Implement explicit __init__ method, useful for subclasses.
11 years ago
Paul Sokolovsky
66ab571cca
tests: Update subclass-native2.py for __new__/__init__ refactor.
Now case of subclassing tuple works, and list is broken, see comments.
11 years ago
Paul Sokolovsky
13684fd60b
objtype: Separate __new__ and __init__ methods.
Now schedule is: for native types, we call ->make_new() C-level method, which
should perform actions of __new__ and __init__ (note that this is not
compliant, but is efficient), but for user types, __new__ and __init__ are
called as expected.
Also, make sure we convert scalar attribute value to a bound-pair tight in
mp_obj_class_lookup() method, which avoids converting it again and again in
its callers.
11 years ago
Damien George
eee31288dd
stmhal: Fix DAC documentation: need to convert float to int for buf.
11 years ago
Damien George
2de4d59171
stmhal: Fix write_timed function for DAC(2).
Addresses issue #617 .
11 years ago
Damien George
f905ebb173
stmhal: Make pyb.bootloader take no arguments.
11 years ago
Damien George
404f7cf902
Merge pull request #618 from swegener/jump-to-bootloader
Jump to bootloader
11 years ago
Sven Wegener
9bf4f7e3d3
stmhal: Remap system flash and adjust addresses
Signed-off-by: Sven Wegener <sven.wegener@stealer.net>
11 years ago
Sven Wegener
7ae8e4b679
stmhal: Activate bootloader with pyb.bootloader()
Signed-off-by: Sven Wegener <sven.wegener@stealer.net>
11 years ago
Paul Sokolovsky
5cdff5fa61
Merge pull request #615 from swegener/for-upstream
py: Fix mp_obj_t -> mp_const_obj_t for mp_obj_int_get_checked()
11 years ago
Sven Wegener
7ba0fedf13
py: Fix mp_obj_t -> mp_const_obj_t for mp_obj_int_get_checked()
Signed-off-by: Sven Wegener <sven.wegener@stealer.net>
11 years ago
Paul Sokolovsky
bf27140193
py: More mp_identity usage.
11 years ago
Paul Sokolovsky
ab7bf28489
py: More const usage.
11 years ago
Paul Sokolovsky
c18ef2a9dd
objstr: startswith(): Accept optional "start" arg.
11 years ago
Paul Sokolovsky
70328e419a
py: Implement more complete bytes comparison handling.
11 years ago
Paul Sokolovsky
ad3baec12f
sequence: Fix yet another case of improper sequence comparison.
This time, in mp_seq_cmp_bytes(). How many more cases are still lurking?
11 years ago
Paul Sokolovsky
767e45c290
modos: Clean 64-bit issues.
11 years ago
Paul Sokolovsky
a47b64ae2d
objstringio: Implement io.BytesIO.
Done in generalized manner, allowing any stream class to be specified as
working with bytes.
11 years ago
Paul Sokolovsky
0c124c3123
unix: Add "_os" module with stat().
stat() is bad function to use using FFI, because its ABI is largely private.
To start with, Glibc .so doesn't even have "stat" symbol. Then, layout of
struct stat is too implementation-dependent. So, introduce _os to deal
with stat() and other similar cases.
11 years ago
Paul Sokolovsky
2a27365854
objstr.c: Partial implementation of .rsplit().
sep=None is TODO.
11 years ago
Damien George
51fab28e94
py: Improve mpz_and function.
This should now have correct (and optimal) behaviour.
11 years ago
Damien George
f6e430f77f
Merge pull request #600 from stinos/unix-exitcode
unix: Use standard return codes for main
11 years ago
Damien George
aeeb448eb6
Merge pull request #613 from pfalcon/pauls-copyr
py, unix: Add copyright for modules I worked closely on.
11 years ago
Paul Sokolovsky
da9f0924ef
py, unix: Add copyright for modules I worked closely on.
11 years ago
Paul Sokolovsky
7074f25768
tests/int-long.py: Try to expose issue with recent "&" optimization.
11 years ago
Damien George
561e425903
py: Fix bug in mpz_and function.
Addresses issue #610 .
11 years ago
Damien George
cc97446ca5
unix: Implement -O option to turn off __debug__ flag.
11 years ago
Damien George
915197a8f9
py: Remove emit_glue init and deinit. Needed only for debugging.
Debugging output for emit_glue now simplified so that the init and
deinit functions are no longer needed.
11 years ago
Damien George
97f9a2813e
py: Add support for __debug__ constant.
__debug__ now resolves to True or False. Its value needs to be set by
mp_set_debug().
TODO: call mp_set_debug in unix/ port.
TODO: optimise away "if False:" statements in compiler.
11 years ago
Damien George
96f137b24a
py: Rename BYTE_CODE to BYTECODE (this was missed in previous rename).
11 years ago
stijn
f42dbb98d1
unix: Fix linker errors when time/ffi modules are disabled
When disabling these via mpconfigport.mk or on the commandline,
the correspoding build options are not set and the sources are not
built so the modules should not be added to the
MICROPY_EXTRA_BUILTIN_MODULES list since they are undefined.
11 years ago
Paul Sokolovsky
df94b717b4
modstruct: Implement count specifier for strings (e.g. "100s").
Infra for counts of other types is there, need last mile to be implemented.
11 years ago
Antonin ENFRUN
da1fffaa09
Fix some unused variables, and silence a clang warning about initialization override in vmentrytable.h
11 years ago
Antonin ENFRUN
ceac71f1f5
unix: Add asm statements needed to read registers with clang. Code generated by gcc 4.9.0 is unchanged (same statements, different order).
Both are inefficient, saving unmodified registers on the stack.
11 years ago
Antonin ENFRUN
1b901c320b
tests: create result file for test/basics/memoryerror.py .
On Mac OS "python3 test/basics/memoryerror.py" never runs out of memory, the process is frozen by the os before.
11 years ago
Antonin ENFRUN
6caae0bcb1
unix: Create __bss_start and _end symbols for Mach-O targets.
It's a hack, but can't find a cleaner way to do it.
11 years ago
Paul Sokolovsky
147c80bf7c
modstruct: Use MP_OBJ_FUN_ARGS_MAX instead of -1.
11 years ago
Paul Sokolovsky
5ebd5f0f19
objstr: Slice indexing: support bytes properly.
11 years ago
Paul Sokolovsky
bfb8819c0c
objstr: Make .split() support bytes.
11 years ago
Paul Sokolovsky
5e5d69b35e
objstr: Make .join() support bytes.
11 years ago