aboutsummaryrefslogtreecommitdiff
path: root/py/stream.c
AgeCommit message (Collapse)Author
2014-02-15Implement proper exception type hierarchy.Damien George
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.
2014-02-12Replace global "static" -> "STATIC", to allow "analysis builds". Part 2.Paul Sokolovsky
2014-02-08Make mp_obj_str_get_data return char* instead of byte*.Damien George
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.
2014-01-22file.readline(): Use mp_obj_str_get_data() and fix off-by-one error on EOF.Paul Sokolovsky
2014-01-22Second stage of qstr revamp: uPy str object can be qstr or not.Damien George
2014-01-21Merge branch 'master' of github.com:micropython/micropythonDamien George
Conflicts: py/objstr.c py/py.mk py/stream.c unix/main.c unix/socket.c
2014-01-21Revamp qstrs: they now include length and hash.Damien George
Can now have null bytes in strings. Can define ROM qstrs per port using qstrdefsport.h
2014-01-20stream_read(): Shrink memory block to actual read size.Paul Sokolovsky
2014-01-20stream: Add generic unbuffered iternext method.Paul Sokolovsky
Uses stream_unbuffered_readline underline.
2014-01-19Change int to uint for n_args in function with variable arguments.Damien George
2014-01-16Make file.read() and file.read(-1) call out to file.readall().Paul Sokolovsky
Per Python3 io module semantics.
2014-01-16Do not assume that vstr buf is the same after it was extended.Paul Sokolovsky
2014-01-15Add unbuffered readline() implementation for Raw I/O files.Paul Sokolovsky
2014-01-13Add generic impl of stream .readall() method. Use one for unix io.FileIO.Paul Sokolovsky
2014-01-08py: add variable argument exception constructor function.Damien George
Addresses issue #104.
2014-01-08Add generic implementations of Python read()/write methods for streams.Paul Sokolovsky
These can be used for any object which implements stream protocol (mp_stream_p_t).