summaryrefslogtreecommitdiffstatshomepage
path: root/unix
Commit message (Collapse)AuthorAge
* 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
|/
* unix: Fix mpconfig.h not being included before misc.hstijn2014-06-28
| | | | This fixes count_lead_ones in misc.h not compiling due to unknown types
* unix, stmhal: Add option for STR_UNICODE to mpconfigport.h.Damien George2014-06-28
| | | | | | Unicode is disabled by default for now, since FileIO.read(n) is currently not implemented for text-mode files, and this is an often function.
* py: Move stack_ctrl_init() to mp_init().Paul Sokolovsky2014-06-27
| | | | | | As stack checking is enabled by default, ports which don't call stack_ctrl_init() are broken now (report RuntimeError on startup). Save them trouble and just init stack control framework in interpreter init.
* Merge pull request #717 from stinos/dead-codePaul Sokolovsky2014-06-27
|\ | | | | unix: Remove unused CTRL-D definition
| * unix: Remove unused CTRL-D definitionstijn2014-06-25
| |
* | py: Add portable framework to query/check C stack usage.Paul Sokolovsky2014-06-27
|/ | | | | | | | Such mechanism is important to get stable Python functioning, because Python function calling is handled with C stack. The idea is to sprinkle STACK_CHECK() calls in places where there can be C recursion. TODO: Add more STACK_CHECK()'s.
* Merge pull request #690 from stinos/msvc-gcPaul Sokolovsky2014-06-24
|\ | | | | msvc: Enable GC
| * gc: Use simple cast instead of union to silence compilerstijn2014-06-22
| |
| * windows: Enable GC and implement bss start and end symbolsstijn2014-06-22
| | | | | | | | | | The pointers to the bss section are acquired in init.c() by inspecting the PE header. Works for msvc and mingw.
* | modsocket: Fix uClibc detection.Paul Sokolovsky2014-06-24
| |
* | unix: Dump default heap size in usage message.Paul Sokolovsky2014-06-24
| |
* | unix: Don't error out on #warning directive.Paul Sokolovsky2014-06-22
| |
* | modsocket: Workaround uClibc issue with numeric port for getaddrinfo().Paul Sokolovsky2014-06-22
| | | | | | | | | | It sucks to workaround this on uPy side, but upgrading not upgradable embedded systems sucks even more.
* | modsocket: Add call to freeaddrinfo().Paul Sokolovsky2014-06-22
| |
* | unix: uClibc doesn't like NULL as a buffer arg to realpath().Paul Sokolovsky2014-06-22
|/ | | | So, allocate one explicitly.
* py: Support arm and thumb ARM ISAs, in addition to thumb2.Paul Sokolovsky2014-06-22
| | | | These changes were tested with QEMU, and by few people of real hardware.
* unix: Allow to override MICROPY_GCREGS_SETJMP from cmdline.Paul Sokolovsky2014-06-20
|
* unix: Add CFLAGS_EXTRA & LDFLAGS_EXTRA for command line usage.Paul Sokolovsky2014-06-20
| | | | | | The idea is that it should be possible to pass any additional params for experimentation without need to patch sources (and without need to deviate from or repeat baseline options).
* unix: Refactor order file munging fo MacOSX.Paul Sokolovsky2014-06-20
|
* unix: Group CFLAGS related stuff together.Paul Sokolovsky2014-06-20
|
* unix: Allow to override compiler warning options without touching the rest.Paul Sokolovsky2014-06-20
| | | | | | | | | Some people want to enable even more warnings. Let them do it without putting burden on everyone. Some people vice versa think that current settings should be relaxed. In this regard, -Werror is the most problematic, it disallows to use #warning directive, and disallows to pass configuration settings on make command lines. Again, until decided how to deal with these globally, allow to work around these problems locally.
* Prefix ARRAY_SIZE with micropython prefix MP_Emmanuel Blot2014-06-19
|
* Provide definition of alloca() in mpconfigport.h.Damien George2014-06-08
|
* Merge branch 'alloca' of github.com:marcusva/micropython into marcusva-allocaDamien George2014-06-08
|\
| * - FreeBSD provides alloca() via stdlib.h, in contrast to Linux and WindowsMarcus von Appen2014-06-07
| | | | | | | | - Move the includes for alloca() intp mpconfigport.h
* | modsys: Add optional support for sys.platform.Paul Sokolovsky2014-06-07
| | | | | | | | | | Ports which wants to have it, should define MICROPY_PY_SYS_PLATFORM to a string value they need.
* | Merge pull request #672 from marcusva/makefileDamien George2014-06-07
|\ \ | | | | | | toolchain fixes to enable cross compatibility
| * | - Let the build environment decide about the toolchain to be used, in caseMarcus von Appen2014-06-07
| |/ | | | | | | | | | | | | there are special tweaks and paths to be considered. Just provide some defaults, in case the values are undefined. - py-version.sh does not need any bash specific features. - Use libdl only on Linux for now. FreeBSD provides dl*() calls from libc.
* / - Cast the struct stat sb.st_ino field to machine_int_t explicitly to avoid aMarcus von Appen2014-06-07
|/ | | | | | | | 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
* Merge pull request #662 from stinos/windows-pathsepDamien George2014-06-07
|\ | | | | unix: Fix path seperator used depending on OS
| * unix: Fix path seperator used depending on OSstijn2014-06-05
| | | | | | | | ';' is the standard seperator used for paths in environment variables on Windows
* | modgc: Implement return value for gc.collect(), enable on Unix.Paul Sokolovsky2014-06-05
|/
* unix: Add setjmp-based GC register helper implementation.Paul Sokolovsky2014-06-05
| | | | | | | | As I suspected for a long time, for x86, register helper doesn't really make any difference - there's simply not enough register to keep anything in them for any prolonged time. Anything gets pushed on stack anyway. So, on x86, uPy passed all tests even with empty reg helper. So, this setjmp implementation goes as "untested".
* py: Instead of having "debug on" var, have "optimization level" var.Paul Sokolovsky2014-06-03
| | | | | This allows to have multiple "optimization" levels (CPython has two (-OO removes docstrings), we can have more).
* unix: Properly print script filename in case of error.Paul Sokolovsky2014-06-03
|