diff options
author | Paul Sokolovsky <pfalcon@users.sourceforge.net> | 2016-07-14 01:44:50 +0300 |
---|---|---|
committer | Paul Sokolovsky <pfalcon@users.sourceforge.net> | 2016-07-14 01:44:50 +0300 |
commit | ad9b9c7621a8a2d85e8056321c3da3287717ec18 (patch) | |
tree | 131ef8e8ecfe81b7f655601f2a6d203513947709 /py/objcomplex.c | |
parent | be313ea215d7f8d9ca6a82f387d061b8633b319c (diff) | |
download | micropython-ad9b9c7621a8a2d85e8056321c3da3287717ec18.tar.gz micropython-ad9b9c7621a8a2d85e8056321c3da3287717ec18.zip |
py/stream: Implement 2- and 3-arg write() method as an extension to CPython.
3-arg form:
stream.write(data, offset, length)
2-arg form:
stream.write(data, length)
These allow efficient buffer writing without incurring extra memory
allocation for slicing or creating memoryview() object, what is
important for low-memory ports.
All arguments must be positional. It might be not so bad idea to standardize
on 3-arg form, but 2-arg case would need check and raising an exception
anyway then, so instead it was just made to work.
Diffstat (limited to 'py/objcomplex.c')
0 files changed, 0 insertions, 0 deletions