summaryrefslogtreecommitdiffstatshomepage
path: root/py/stream.c
Commit message (Collapse)AuthorAge
* py: Add MP_OBJ_STOP_ITERATION and make good use of it.Damien George2014-04-17
| | | | | Also make consistent use of MP_OBJ_NOT_SUPPORTED and MP_OBJ_NULL. This helps a lot in debugging and understanding of function API.
* py: the entire `<unistd.h>` shouldn't be neededIlya Dmitrichenko2014-04-12
|
* py: Replace stream_p with *stream_p in mp_obj_type_t.Damien George2014-04-05
| | | | | | | | This is to reduce ROM usage. stream_p is used in file and socket types only (at the moment), so seems a good idea to make the protocol functions a pointer instead of the actual structure. It saves 308 bytes of ROM in the stmhal/ port, 928 in unix/.
* py: Change nlr_jump to nlr_raise, to aid in debugging.Damien George2014-04-05
| | | | | | This does not affect code size or performance when debugging turned off. To address issue #420.
* py: Replace mp_const_stop_iteration object with MP_OBJ_NULL.Damien George2014-03-26
|
* py: Clean up includes.xbe2014-03-17
| | | | Remove unnecessary includes. Add includes that improve portability.
* Implement proper exception type hierarchy.Damien George2014-02-15
| | | | | | | | | | | | | | Each built-in exception is now a type, with base type BaseException. C exceptions are created by passing a pointer to the exception type to make an instance of. When raising an exception from the VM, an instance is created automatically if an exception type is raised (as opposed to an exception instance). Exception matching (RT_BINARY_OP_EXCEPTION_MATCH) is now proper. Handling of parse error changed to match new exceptions. mp_const_type renamed to mp_type_type for consistency.
* Replace global "static" -> "STATIC", to allow "analysis builds". Part 2.Paul Sokolovsky2014-02-12
|
* Make mp_obj_str_get_data return char* instead of byte*.Damien George2014-02-08
| | | | | Can't decide which is better for string type, char or byte pointer. Changing to char removes a few casts. Really need to do proper unicode.
* file.readline(): Use mp_obj_str_get_data() and fix off-by-one error on EOF.Paul Sokolovsky2014-01-22
|
* Second stage of qstr revamp: uPy str object can be qstr or not.Damien George2014-01-22
|
* Merge branch 'master' of github.com:micropython/micropythonDamien George2014-01-21
|\ | | | | | | | | | | | | | | | | Conflicts: py/objstr.c py/py.mk py/stream.c unix/main.c unix/socket.c
| * stream_read(): Shrink memory block to actual read size.Paul Sokolovsky2014-01-20
| |
| * stream: Add generic unbuffered iternext method.Paul Sokolovsky2014-01-20
| | | | | | | | Uses stream_unbuffered_readline underline.
* | Revamp qstrs: they now include length and hash.Damien George2014-01-21
|/ | | | | Can now have null bytes in strings. Can define ROM qstrs per port using qstrdefsport.h
* Change int to uint for n_args in function with variable arguments.Damien George2014-01-19
|
* Make file.read() and file.read(-1) call out to file.readall().Paul Sokolovsky2014-01-16
| | | | Per Python3 io module semantics.
* Do not assume that vstr buf is the same after it was extended.Paul Sokolovsky2014-01-16
|
* Add unbuffered readline() implementation for Raw I/O files.Paul Sokolovsky2014-01-15
|
* Add generic impl of stream .readall() method. Use one for unix io.FileIO.Paul Sokolovsky2014-01-13
|
* py: add variable argument exception constructor function.Damien George2014-01-08
| | | | Addresses issue #104.
* Add generic implementations of Python read()/write methods for streams.Paul Sokolovsky2014-01-08
These can be used for any object which implements stream protocol (mp_stream_p_t).