<feed xmlns='http://www.w3.org/2005/Atom'>
<title>suspect-devices/circuitpython/py/stream.c, branch 0.9.0</title>
<subtitle>CircuitPython - a Python implementation for teaching coding with microcontrollers</subtitle>
<id>https://git.suspectdevices.com/suspect-devices/circuitpython/atom?h=0.9.0</id>
<link rel='self' href='https://git.suspectdevices.com/suspect-devices/circuitpython/atom?h=0.9.0'/>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/'/>
<updated>2016-11-13T21:24:22+00:00</updated>
<entry>
<title>all: Remove readall() method, which is equivalent to read() w/o args.</title>
<updated>2016-11-13T21:24:22+00:00</updated>
<author>
<name>Paul Sokolovsky</name>
<email>pfalcon@users.sourceforge.net</email>
</author>
<published>2016-11-13T21:24:22+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/commit/?id=59a1201da959ab01895361c0b5bb8bc1409f2b39'/>
<id>urn:sha1:59a1201da959ab01895361c0b5bb8bc1409f2b39</id>
<content type='text'>
Its addition was due to an early exploration on how to add CPython-like
stream interface. It's clear that it's not needed and just takes up
bytes in all ports.
</content>
</entry>
<entry>
<title>py/stream: Typo fix in comment.</title>
<updated>2016-10-27T19:13:45+00:00</updated>
<author>
<name>Paul Sokolovsky</name>
<email>pfalcon@users.sourceforge.net</email>
</author>
<published>2016-10-27T19:12:59+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/commit/?id=8a49905a2f268255cba7f7deb6c334b830d5943a'/>
<id>urn:sha1:8a49905a2f268255cba7f7deb6c334b830d5943a</id>
<content type='text'>
</content>
</entry>
<entry>
<title>py: Use mp_raise_msg helper function where appropriate.</title>
<updated>2016-10-17T01:17:37+00:00</updated>
<author>
<name>Damien George</name>
<email>damien.p.george@gmail.com</email>
</author>
<published>2016-10-17T01:17:37+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/commit/?id=7d0d7215d2575a2d36d34c9a13b58cade0610a28'/>
<id>urn:sha1:7d0d7215d2575a2d36d34c9a13b58cade0610a28</id>
<content type='text'>
Saves the following number of bytes of code space: 176 for bare-arm, 352
for minimal, 272 for unix x86-64, 140 for stmhal, 120 for esp8266.
</content>
</entry>
<entry>
<title>py: Add mp_raise_OSError(errno) helper function.</title>
<updated>2016-10-07T02:31:59+00:00</updated>
<author>
<name>Damien George</name>
<email>damien.p.george@gmail.com</email>
</author>
<published>2016-10-07T02:31:59+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/commit/?id=3a0a7717304cc34a4d6ef55f767666c918c185b5'/>
<id>urn:sha1:3a0a7717304cc34a4d6ef55f767666c918c185b5</id>
<content type='text'>
This is an often used code pattern, and its use reduces code size of the
core by about 100 bytes.
</content>
</entry>
<entry>
<title>py/stream: Remove unnecessary check for NULL return from vstr_extend.</title>
<updated>2016-09-22T00:50:47+00:00</updated>
<author>
<name>Damien George</name>
<email>damien.p.george@gmail.com</email>
</author>
<published>2016-09-22T00:50:47+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/commit/?id=79ec869f95934cbcdec01219121551333b1aacb0'/>
<id>urn:sha1:79ec869f95934cbcdec01219121551333b1aacb0</id>
<content type='text'>
vstr_extend will now only return NULL if the vstr is a fixed buffer, which
in this case it is not.
</content>
</entry>
<entry>
<title>py/stream.c: use mp_obj_get_type in mp_get_stream_raise</title>
<updated>2016-08-23T22:33:31+00:00</updated>
<author>
<name>Krzysztof Blazewicz</name>
<email>krzysztof.blazewicz@uxeon.com</email>
</author>
<published>2016-08-20T11:45:25+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/commit/?id=656207645485295477411224fdf41cfd4d598a88'/>
<id>urn:sha1:656207645485295477411224fdf41cfd4d598a88</id>
<content type='text'>
In current state `mp_get_stream_raise` assumes that `self_in` is an object
and always performs a pointer derefence which may cause a segfault.

This function shall throw an exception whenever `self_in` does not implement
a stream protocol, that includes qstr's and numbers.

fixes #2331
</content>
</entry>
<entry>
<title>py/mpconfig.h: Add MICROPY_STREAMS_POSIX_API setting.</title>
<updated>2016-07-30T17:05:56+00:00</updated>
<author>
<name>Paul Sokolovsky</name>
<email>pfalcon@users.sourceforge.net</email>
</author>
<published>2016-07-30T17:05:56+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/commit/?id=61e77a4e88c4b6971fd997191de01e5ab08e46c5'/>
<id>urn:sha1:61e77a4e88c4b6971fd997191de01e5ab08e46c5</id>
<content type='text'>
To filter out even prototypes of mp_stream_posix_*() functions, which
require POSIX types like ssize_t &amp; off_t, which may be not available in
some ports.
</content>
</entry>
<entry>
<title>py/stream: Add adapter methods with POSIX-compatible signatures.</title>
<updated>2016-07-29T21:25:06+00:00</updated>
<author>
<name>Paul Sokolovsky</name>
<email>pfalcon@users.sourceforge.net</email>
</author>
<published>2016-07-29T21:25:06+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/commit/?id=4f1b0292dbc5920457673a31cadfd894239cc1b9'/>
<id>urn:sha1:4f1b0292dbc5920457673a31cadfd894239cc1b9</id>
<content type='text'>
Previoussly such read() and write() methods were used by modussl_axtls,
move to py/stream for reuse.
</content>
</entry>
<entry>
<title>py/stream: Implement generic flush() method, in terms of C-level ioctl.</title>
<updated>2016-07-26T21:39:10+00:00</updated>
<author>
<name>Paul Sokolovsky</name>
<email>pfalcon@users.sourceforge.net</email>
</author>
<published>2016-07-26T21:39:10+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/commit/?id=a60b0263ba97f655c01f0982df74299c14457b1c'/>
<id>urn:sha1:a60b0263ba97f655c01f0982df74299c14457b1c</id>
<content type='text'>
</content>
</entry>
<entry>
<title>py/stream: Implement 2- and 3-arg write() method as an extension to CPython.</title>
<updated>2016-07-13T22:44:50+00:00</updated>
<author>
<name>Paul Sokolovsky</name>
<email>pfalcon@users.sourceforge.net</email>
</author>
<published>2016-07-13T22:44:50+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/commit/?id=ad9b9c7621a8a2d85e8056321c3da3287717ec18'/>
<id>urn:sha1:ad9b9c7621a8a2d85e8056321c3da3287717ec18</id>
<content type='text'>
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.
</content>
</entry>
</feed>
