62 Commits (713ea1800d1f0c82a0c75885ad034705556ab5ef)

Author SHA1 Message Date
Paul Sokolovsky 7799410950 py/stream: Allow to reuse is_nonblocking_error(). 9 years ago
blmorris bdd78c31b6 py: Add stream_tell method, and use for unix and stmhal file tell. 9 years ago
Damien George c50772d19f py: Add mp_obj_get_int_truncated and use it where appropriate. 10 years ago
Damien George 0d3cb6726d py: Change vstr so that it doesn't null terminate buffer by default. 10 years ago
Paul Sokolovsky ca3dbb8d8b stream: readall(): Make sure there's a trailing NUL char. 10 years ago
Paul Sokolovsky 425f952a1e stream: Fix readall() implementation in respect to NUL terminator bytes. 10 years ago
Damien George 05005f679e py: Remove mp_obj_str_builder and use vstr instead. 10 years ago
Damien George 0b9ee86133 py: Add mp_obj_new_str_from_vstr, and use it where relevant. 10 years ago
Damien George 51dfcb4bb7 py: Move to guarded includes, everywhere in py/ core. 10 years ago
Damien George be6d8be91e py: Rename mp_obj_int_get to mp_obj_int_get_truncated; fix struct.pack. 10 years ago
Damien George 5694cc5490 py: Make stream seek correctly check for ioctl fn; add seek for textio. 10 years ago
Paul Sokolovsky 838eb1fa2d stream: Implement seek operation support via ioctl, wrapped in generic method. 10 years ago
Damien George d00d8ac95c py: Use mp_uint_t where appropriate in stream functions. 10 years ago
Paul Sokolovsky e2f8d98525 stream: Add optional 2nd "length" arg to .readinto() - extension to CPython. 10 years ago
Paul Sokolovsky 1a55b6a787 unix, stmhal: Implement file.readinto() method. 10 years ago
Damien George b7a4b0f86f py: Improve stream_read so it doesn't need to alloc 2 bits of heap. 10 years ago
Paul Sokolovsky 923a8a8320 stream: Handle non-blocking errors in readline() properly. 10 years ago
Paul Sokolovsky 0c7b26c0f8 stream: Return errno value as first arg of OSError exception. 10 years ago
Damien George 69b7dae362 py: Small cleanup in stream.c. 10 years ago
Damien George adf0f2ae1a py: Change stream protocol API: fns return uint; is_text for text. 10 years ago
Paul Sokolovsky 4ecb700fe3 streams: Treat non-error output size as unsigned. 10 years ago
Paul Sokolovsky e1b1abc1e8 stream: Revert to checking for the correct error value. 10 years ago
Dave Hylands 1d8816c36b Deal with reading a buffer less than what was allocated. 10 years ago
Damien George 1694bc733d py: Add stream reading of n unicode chars; unicode support by default. 10 years ago
Paul Sokolovsky ac736f15c9 stream: Factor out mp_stream_write() method to write a memstring to stream. 10 years ago
Damien George 40f3c02682 Rename machine_(u)int_t to mp_(u)int_t. 11 years ago
stijn ec6fa8732b windows: Sync mpconfigport.h with the unix' version 11 years ago
Paul Sokolovsky f5f6c3b792 streams: Reading by char count from unicode text streams is not implemented. 11 years ago
Paul Sokolovsky e22cddbe2a stream: Use mp_obj_is_true() for EOF testing. 11 years ago
Damien George f600a6a085 py: Slightly improve efficiency of mp_obj_new_str; rename str_new. 11 years ago
Paul Sokolovsky a47b64ae2d objstringio: Implement io.BytesIO. 11 years ago
Paul Sokolovsky da9f0924ef py, unix: Add copyright for modules I worked closely on. 11 years ago
Paul Sokolovsky 0ef015b253 stream: Make non-blcoking stream support configurable. 11 years ago
Paul Sokolovsky b9be45e421 stream: Use standard name of DEFAULT_BUFFER_SIZE. 11 years ago
Paul Sokolovsky 6e73143de8 stream: Add compliant handling of non-blocking readall(). 11 years ago
Paul Sokolovsky a592104acd stream: Add compliant handling of non-blocking read()/write(). 11 years ago
Damien George 04b9147e15 Add license header to (almost) all files. 11 years ago
Damien George d5f5b2f766 py, stream: Implement readlines for a stream. 11 years ago
Paul Sokolovsky f54bcbf099 py, unix: Make "mpconfig.h" be first included, as other headers depend on it. 11 years ago
Paul Sokolovsky 45fb143ba6 streams: Make .write() support arbitrary objects with buffer interface. 11 years ago
Damien George ea8d06c39d py: Add MP_OBJ_STOP_ITERATION and make good use of it. 11 years ago
Ilya Dmitrichenko 5630b01920 py: the entire `<unistd.h>` shouldn't be needed 11 years ago
Damien George 27e735fd18 py: Replace stream_p with *stream_p in mp_obj_type_t. 11 years ago
Damien George ea13f407a3 py: Change nlr_jump to nlr_raise, to aid in debugging. 11 years ago
Damien George 66eaf84b8c py: Replace mp_const_stop_iteration object with MP_OBJ_NULL. 11 years ago
xbe efe3422394 py: Clean up includes. 11 years ago
Damien George c5966128c7 Implement proper exception type hierarchy. 11 years ago
Paul Sokolovsky 520e2f58a5 Replace global "static" -> "STATIC", to allow "analysis builds". Part 2. 11 years ago
Damien George 698ec21e46 Make mp_obj_str_get_data return char* instead of byte*. 11 years ago
Paul Sokolovsky 0914371faf file.readline(): Use mp_obj_str_get_data() and fix off-by-one error on EOF. 11 years ago