Paul Sokolovsky
53ad5edc01
py/stream: Fix stupid thinko with variable naming/shadowing.
2016-03-27 12:58:33 +03:00
Paul Sokolovsky
8f1854ad2d
extmod/modlwip: Add SOL_SOCKET and SO_REUSEADDR constants for setsockopt().
2016-03-25 15:06:12 +02:00
Paul Sokolovsky
2c81b9be28
py/modio: io.BufferedWriter: Describe flushing policy.
2016-03-25 14:59:30 +02:00
Paul Sokolovsky
063e6e7d0a
py/modio: Implement io.BufferedWriter.flush().
2016-03-25 14:33:38 +02:00
Paul Sokolovsky
5d93dfbc2c
py/modio: Initial implementation of io.BufferedWriter class.
...
Just .write() method implemented currently.
2016-03-25 01:10:49 +02:00
Paul Sokolovsky
4a02a8f74d
py/stream: Fix object vs ptr usecase in mp_stream_writeall().
2016-03-24 19:43:08 +02:00
Paul Sokolovsky
24342dd65e
extmod/modwebsocket: Start module for WebSocket helper functions.
...
Currently, only write support is implemented (of limited buffer size).
2016-03-24 19:16:00 +02:00
Paul Sokolovsky
d4c8e626f2
py/stream: Add mp_stream_writeall() helper function.
...
Spools entire output buffer to a blocking stream (chunk by chunk if
needed).
2016-03-24 19:09:00 +02:00
Damien George
8d4d6731f5
py/parse: When looking up consts, check they exist before checking type.
2016-03-19 21:36:32 +00:00
Damien George
3acaa28b52
py: Don't allocate an extra parse node for power exponent.
...
Previous to this patch, the "**b" in "a**b" had its own parse node with
just one item (the "b"). Now, the "b" is just the last element of the
power parse-node. This saves (a tiny bit of) RAM when compiling.
2016-03-16 13:04:51 +00:00
Paul Sokolovsky
52e062ef33
py/frozenmod: Allow port to override lexer to use for frozen modules.
2016-03-16 17:42:37 +07:00
Damien George
9a58316de2
py/objfun: Allow inline-asm functions to be called with 4 arguments.
2016-03-16 08:22:26 +00:00
Damien George
cea6cf8a5e
py/formatfloat: Fix buffer overflow when formatting tiny numbers.
2016-03-15 12:21:56 +00:00
Damien George
0d1f8868b6
py: For mp_buffer_info_t, change len type from mp_uint_t to size_t.
2016-03-15 12:20:57 +00:00
Damien George
77f85db41e
py/objarray: Fix array slice assignment when array is reallocated.
...
Addresses issue #1898 .
2016-03-14 23:12:54 +00:00
Damien George
06b398489e
py/parsenum: Fix compiler warnings for no decl and signed comparison.
2016-03-14 22:52:52 +00:00
Damien George
0be6359f39
py: When printf'ing an object as a pointer, pass the concrete pointer.
2016-03-14 22:41:14 +00:00
Damien George
2a1cca20b1
py: Fix passing of some wide int types to printf varg format list.
...
Passing an mp_uint_t to a %d printf format is incorrect for builds where
mp_uint_t is larger than word size (eg a nanboxing build). This patch
adds some simple casting to int in these cases.
2016-03-14 22:40:39 +00:00
Damien George
e7cd1699df
py/argcheck: Use size_t instead of mp_uint_t to count number of args.
2016-03-14 22:35:48 +00:00
Damien George
dddb98db8b
py/parsenum: Use size_t to count bytes, and int for type of base arg.
...
size_t is the proper type to count number of bytes in a string. The base
argument does not need to be a full mp_uint_t, int is enough.
2016-03-14 22:34:03 +00:00
Damien George
9ae51257bd
py: Use MP_SMALL_INT_POSITIVE_MASK to check if uint fits in a small int.
...
Using the original WORD_MSBIT_HIGH-logic resulted in errors when the
object model is not REPR_A or REPR_C.
2016-03-10 21:52:56 +00:00
Paul Sokolovsky
f1919b7c98
extmod/modlwip: Add dummy .makefile() method.
2016-03-09 09:14:45 +07:00
Damien George
dcdf8f2d14
py/objboundmeth: Allocate arg state on stack if heap alloc fails.
...
If the heap is locked, or memory allocation fails, then calling a bound
method will still succeed by allocating the argument state on the stack.
The new code also allocates less stack than before if less than 4
arguments are passed. It's also a tiny bit smaller in code size.
This was done as part of the ESA project.
2016-03-08 15:36:53 +00:00
Paul Sokolovsky
ed593780bf
extmod/modlwip: Implement dummy setsockopt().
2016-03-08 14:24:49 +07:00
Markus Fix
4f0080346b
py/emitglue: Get persistent bytecode working on Linux ARM platform.
2016-03-07 15:15:23 +00:00