summaryrefslogtreecommitdiffstatshomepage
path: root/unix
Commit message (Collapse)AuthorAge
* Allow real memory errors (from locked gc) to be reported with traceback.Dave Hylands2014-10-07
|
* unix: Detect and print compile error.Damien George2014-10-05
|
* py: Change [u]int to mp_[u]int_t in qstr.[ch], and some other places.Damien George2014-10-03
| | | | This should pretty much resolve issue #50.
* unix: Do a proper clean-up on sys.exit/SystemExit.Damien George2014-10-01
| | | | Addresses issue #859.
* unix: Remove unnecessary #defines from config.Damien George2014-09-29
|
* py: For malloc and vstr functions, use size_t exclusively for int type.Damien George2014-09-25
| | | | | | It seems most sensible to use size_t for measuring "number of bytes" in malloc and vstr functions (since that's what size_t is for). We don't use mp_uint_t because malloc and vstr are not Micro Python specific.
* Clean up logical flow for setting LDFLAGS to build for Linux and OSXblmorris2014-09-23
| | | | Add more specific comments describing what is going on.
* Incorporate change in assignment logic suggested by dhylandsblmorris2014-09-22
|
* Fix unix/Makefile to build on OSXblmorris2014-09-22
| | | | | | | Force OSX to compile with clang even if gcc is available Change LDFLAGS syntax to be compatible with clang Fix questionable syntax on line 90 Remove extraneous tab character
* py: Add native json printing using existing print framework.Damien George2014-09-17
| | | | | Also add start of ujson module with dumps implemented. Enabled in unix and stmhal ports. Test passes on both.
* py: Move definition of mp_sys_exit to core.Damien George2014-09-15
| | | | | | | | sys.exit always raises SystemExit so doesn't need a special implementation for each port. If C exit() is really needed, use the standard os._exit function. Also initialise mp_sys_path and mp_sys_argv in teensy port.
* unix: Fix modffi to be able to return double on x86 machines.Damien George2014-09-06
|
* py: Add support for emitting native x86 machine code.Damien George2014-09-06
|
* unix: Don't use -Wno-error=cpp or #warning; fix strict alias warning.Damien George2014-09-06
| | | | | | | | | | For the sake of older versions of gcc (and other compilers), don't use the #warning CPP directive, nor the -Wno-error=cpp option. Also, fix a strict alias warning in modffi.c for older compilers, and add a test for ffi module. Addresses issue #847.
* Code style/whitespace cleanup; remove obsolete headers.Damien George2014-09-03
| | | | And move the MAP_ANON redefinition from py/asmx64.c to unix/alloc.c.
* unix: Auto-detect MICROPY_EMIT_X64 and MICROPY_GCREGS_SETJMP.Damien George2014-09-03
| | | | | | If not set, MICROPY_EMIT_X64 is set only if on x86-64 machine. If not set, MICROPY_GCREGS_SETJMP is set when on MIPS.
* Add cache flush in py/asmarm.c and add new MP_PLAT_ALLOC_EXEC and ↵Fabian Vogt2014-09-03
| | | | | | MP_PLAT_FREE_EXEC macros Fixes issue #840
* py: Change uint to mp_uint_t in runtime.h, stackctrl.h, binary.h.Damien George2014-08-30
| | | | Part of code cleanup, working towards resolving issue #50.
* py: Change all uint to mp_uint_t in obj.h.Damien George2014-08-30
| | | | Part of code cleanup, working towards resolving issue #50.
* py: Make tuple and list use mp_int_t/mp_uint_t.Damien George2014-08-30
| | | | Part of code cleanup, to resolve issue #50.
* Change some parts of the core API to use mp_uint_t instead of uint/int.Damien George2014-08-30
| | | | Addressing issue #50, still some way to go yet.
* Add pip-micropython to unix make install.Damien George2014-08-26
| | | | | | | Also add -t/--target option to pip-micropython to allowing installing to the pyboard. Thanks to turbinenreiter/Sebastian Plamauer for the patch.
* py: Fix bug where GC collected native/viper/asm function data.Damien George2014-08-24
| | | | | | | | Because (for Thumb) a function pointer has the LSB set, pointers to dynamic functions in RAM (eg native, viper or asm functions) were not being traced by the GC. This patch is a comprehensive fix for this. Addresses issue #820.
* unix, modtermios: Make it properly configurable; fix spelling mistake.Damien George2014-08-24
|
* modtermios: Add "termios" unix module, subset of CPython's.Paul Sokolovsky2014-08-23
| | | | | | | | Also provides setraw() function from "tty" module (which in CPython is implemented in Python). The idea here is that 95% of "termios" module usage is to set raw mode to allow access to normal serial devices. Then, instead of exporting gazillion termios symbols, it's better to implement it in C, and export minimal number of symbols (mostly baud rates and drain values).
* Merge pull request #796 from turbinenreiter/makeinstallPaul Sokolovsky2014-08-18
|\ | | | | unix: Added install/uninstall
| * added install/uninstallSebastian Plamauer2014-08-11
| |
* | py: Put SystemExit in builtin namespace.Damien George2014-08-16
| | | | | | | | Also fix unix port so that SystemExit with no arg exits with value 0.
* | modzlibd: Decompress part of "zlib" module, based on miniz tinfl.c .Paul Sokolovsky2014-08-13
|/
* modsocket: .recv() returns bytes object.Paul Sokolovsky2014-08-10
|
* Put call to qstr_init and mp_init_emergency_exc_buf in mp_init.Damien George2014-08-04
| | | | | | | qstr_init is always called exactly before mp_init, so makes sense to just have mp_init call it. Similarly with mp_init_emergency_exception_buf. Doing this makes the ports simpler and less error prone (ie they can no longer forget to call these).
* py: Make MP_OBJ_NEW_SMALL_INT cast arg to mp_int_t itself.Damien George2014-07-31
| | | | Addresses issue #724.
* Merge pull request #738 from dhylands/except-argsDamien George2014-07-29
|\ | | | | Add support for storing args during an exception raised by an irq.
| * Add support for storing args during an exception raised by an irq.Dave Hylands2014-07-25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The user code should call micropython.alloc_emergency_exception_buf(size) where size is the size of the buffer used to print the argument passed to the exception. With the test code from #732, and a call to micropython.alloc_emergenncy_exception_buf(100) the following error is now printed: ```python >>> import heartbeat_irq Uncaught exception in Timer(4) interrupt handler Traceback (most recent call last): File "0://heartbeat_irq.py", line 14, in heartbeat_cb NameError: name 'led' is not defined ```
* | py: Implement __file__ attribute for modules.Paul Sokolovsky2014-07-28
| |
* | py: Change stream protocol API: fns return uint; is_text for text.Damien George2014-07-27
|/
* Merge pull request #757 from stinos/windows-fsyncDamien George2014-07-19
|\ | | | | Add fsync for windows, i.e. _commit. See dce8876
| * Add fsync for windows, i.e. _commit. See dce8876stijn2014-07-16
| |
* | py: Add stream reading of n unicode chars; unicode support by default.Damien George2014-07-19
|/ | | | | | | | | | | | | With unicode enabled, this patch allows reading a fixed number of characters from text-mode streams; eg file.read(5) will read 5 unicode chars, which can made of more than 5 bytes. For an ASCII stream (ie no chars > 127) it only needs to do 1 read. If there are lots of non-ASCII chars in a stream, then it needs multiple reads of the underlying object. Adds a new test for this case. Enables unicode support by default on unix and stmhal ports.
* unix: file: No fsync() on Windows.v1.2Paul Sokolovsky2014-07-13
|
* unix: file: Implement .flush() method.Paul Sokolovsky2014-07-13
| | | | This method apparently should be part of stream interface.
* unix: Allow to disable MICROPY_EMIT_X64 from commandline.Paul Sokolovsky2014-07-13
| | | | | emitnative in particular requires nlr_* to be real functions, so doesn't compile with MICROPY_NLR_SETJMP=1.
* moductypes: Foreign data interface module, roughly based on ctype ideas.Paul Sokolovsky2014-07-09
| | | | | But much smaller and memory-efficient. Uses Python builtin data structures (dict, tuple, int) to describe structure layout.
* py: Implement sys.maxsize, standard way to check platform "bitness".Paul Sokolovsky2014-07-03
| | | | | Implementing it as a static constant is a bit peculiar and require cooperation from long int implementation.
* Rename machine_(u)int_t to mp_(u)int_t.Damien George2014-07-03
| | | | See discussion in issue #50.
* stackctrl: Add "mp_" prefix.Paul Sokolovsky2014-07-01
|
* modffi: Add special 'C' code for passing a callback function pointer.Paul Sokolovsky2014-07-01
|
* Merge pull request #730 from stinos/windows-mpconfigPaul Sokolovsky2014-06-29
|\ | | | | windows: Sync mpconfigport.h with the unix' version
| * windows: Sync mpconfigport.h with the unix' versionstijn2014-06-29
| | | | | | | | | | | | - rearrange/add definitions that were not there so it's easier to compare both - use MICROPY_PY_SYS_PLATFORM in main.c since it's available anyway - define EWOULDBLOCK, it is missing from ingw32
* | modffi: Support short types.Paul Sokolovsky2014-06-29
|/