Antonin ENFRUN
26ed00118b
uctypes: Implement assignment for scalar array
2016-01-03 20:23:20 +02:00
Paul Sokolovsky
467504da01
extmod/moduos_dupterm: Handle exceptions in call to dupterm's .write()
2016-01-01 22:06:38 +02:00
Paul Sokolovsky
30b7344eb0
extmod/moduos_dupterm: Make mp_uos_dupterm_tx_strn() function reusable.
...
Function to actually spool output terminal data to dupterm object.
2016-01-01 16:43:35 +02:00
Paul Sokolovsky
ddea7cb702
extmod/moduos_dupterm: Make uos.dupterm() implementation reusable.
...
That's just function which sets/gets dup terminal object, and can be
easily reused across ports.
2016-01-01 13:04:32 +02:00
Paul Sokolovsky
fb7b715b7b
extmod/modlwip: Use _ERR_BADF instead of magic number.
2015-12-30 16:43:35 +02:00
Paul Sokolovsky
bc25545fbb
extmod/modlwip: Avoid magic numeric values in memcpy().
2015-12-30 16:40:23 +02:00
Paul Sokolovsky
722fb2d251
extmod/modlwip: User proper field name and value names for socket state.
2015-12-30 16:26:23 +02:00
Paul Sokolovsky
fff2dd2627
extmod/modlwip: Mark some lwip_socket_obj_t's fields as volatile.
...
Any fields changed by asynchronous callbacks must be volatile.
2015-12-29 21:02:02 +02:00
Paul Sokolovsky
a63d4a6cc2
extmod/modlwip: tcp_recv: Use more regular and responsive poll pattern.
...
Polling once in 100ms means dismal performance.
TODO: Propagate this pattern to other polling places.
2015-12-29 20:37:22 +02:00
Paul Sokolovsky
7203b58e87
extmod/modubinascii: Add "separator" argument to hexlify().
...
This is extension to CPython, it allows to easily produce human-readable
hex dump:
>>> ubinascii.hexlify(b"\xaa\x55\xaa\x55", b" ")
b'aa 55 aa 55'
2015-12-26 02:15:56 +02:00
Paul Sokolovsky
1b7f622410
extmod/moduhashlib: Add namespace prefix for crypto-algorithms/sha256.h.
...
Everyone loves to names similar things the same, then there're conflicts
between different libraries. The namespace prefix used is "CRYAL_", which
is weird, and that's good, as that minimizes chance of another conflict.
2015-12-20 23:14:47 +02:00
Dave Hylands
755b01439b
unix: machine_mem improvements
...
This basically introduces the MICROPY_MACHINE_MEM_GET_READ_ADDR
and MICROPY_MACHINE_MEM_GET_WRITE_ADDR macros. If one of them is
not defined, then a default identity function is provided.
2015-12-18 22:01:03 +02:00
Dave Hylands
f925165942
unix: Move modmachine into unix directory
...
This leaves behind the common functionality in extmod/machine_mem.c
which can be used by all ports.
2015-12-13 01:21:36 +02:00
Paul Sokolovsky
d4a874b81e
extmod/moductypes: sizeof operation depends on layout type of structure.
...
Previously, sizeof() blindly assumed LAYOUT_NATIVE and tried to align
size even for packed LAYOUT_LITTLE_ENDIAN & LAYOUT_BIG_ENDIAN. As sizeof()
is implemented on a strucuture descriptor dictionary (not an structure
object), resolving this required passing layout type around.
2015-12-09 21:43:28 +02:00
Paul Sokolovsky
add6f4556e
extmod/moductypes: set_aligned(): Handle INT64/UINT64.
2015-12-04 00:59:08 +02:00
Damien George
999cedb90f
py: Wrap all obj-ptr conversions in MP_OBJ_TO_PTR/MP_OBJ_FROM_PTR.
...
This allows the mp_obj_t type to be configured to something other than a
pointer-sized primitive type.
This patch also includes additional changes to allow the code to compile
when sizeof(mp_uint_t) != sizeof(void*), such as using size_t instead of
mp_uint_t, and various casts.
2015-11-29 14:25:35 +00:00
Damien George
cbf7674025
py: Add MP_ROM_* macros and mp_rom_* types and use them.
2015-11-29 14:25:04 +00:00
Damien George
278f3592d4
extmod/modmachine: Use uintptr_t instead of mp_uint_t for address type.
2015-11-29 14:25:04 +00:00
Paul Sokolovsky
f0fbab7ca7
extmod/fsusermount: Make configurable with MICROPY_FSUSERMOUNT.
2015-11-25 13:19:36 +02:00
Paul Sokolovsky
3a1bbcc2ef
extmod: Move fsusermount.c from stmhal for cross-port reuse.
2015-11-25 13:19:36 +02:00
Damien George
a8aa1998ce
extmod/modure: Use correct integer type for n_args argument.
2015-11-23 15:05:58 +00:00
Galen Hazelwood
af3e45419c
extmod/lwip: Change void pointers to unions, include new mphal.h file
2015-11-04 23:24:04 +03:00
Paul Sokolovsky
d0601b0a1f
extmod/re1.5: Workaround issue with mingw32-gcc 4.2.1.
2015-11-01 02:39:01 +03:00
Paul Sokolovsky
aee704ebe1
extmod/modure: Make sure that errors in regexps are caught early.
2015-11-01 00:38:22 +03:00
Paul Sokolovsky
7cce2f664c
extmod/re1.5: Update to 0.8.
...
Contains implementation of ?: (non-capturing groups), ?? (non-greedy ?),
as well as much improved robustness, and edge cases and error handling by
Amir Plivatsky (@ampli).
2015-11-01 00:38:00 +03:00