<feed xmlns='http://www.w3.org/2005/Atom'>
<title>suspect-devices/circuitpython/py/objdeque.c, branch 6.1.x</title>
<subtitle>CircuitPython - a Python implementation for teaching coding with microcontrollers</subtitle>
<id>https://git.suspectdevices.com/suspect-devices/circuitpython/atom?h=6.1.x</id>
<link rel='self' href='https://git.suspectdevices.com/suspect-devices/circuitpython/atom?h=6.1.x'/>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/'/>
<updated>2019-01-18T19:53:09+00:00</updated>
<entry>
<title>More make_new fixes for unix build</title>
<updated>2019-01-18T19:53:09+00:00</updated>
<author>
<name>Scott Shawcroft</name>
<email>scott@tannewt.org</email>
</author>
<published>2019-01-18T19:53:09+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/commit/?id=0318a9a9bcbceab308323788cb9e579da166710e'/>
<id>urn:sha1:0318a9a9bcbceab308323788cb9e579da166710e</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Two fixes and translate more strings.</title>
<updated>2018-08-09T20:29:30+00:00</updated>
<author>
<name>Scott Shawcroft</name>
<email>scott@tannewt.org</email>
</author>
<published>2018-08-09T01:24:49+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/commit/?id=96ebf5bc3fb455162286b9bc31e763f3c4f1c457'/>
<id>urn:sha1:96ebf5bc3fb455162286b9bc31e763f3c4f1c457</id>
<content type='text'>
* Fix finding translations with escaped characters.
* Add back \r to translations since its needed by screen.
</content>
</entry>
<entry>
<title>py/objdeque: Fix sign extension bug when computing len of deque object.</title>
<updated>2018-05-11T03:44:50+00:00</updated>
<author>
<name>Damien George</name>
<email>damien.p.george@gmail.com</email>
</author>
<published>2018-05-11T03:44:50+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/commit/?id=095d3970173f3d4ad6c43bd0c363b727d3a67241'/>
<id>urn:sha1:095d3970173f3d4ad6c43bd0c363b727d3a67241</id>
<content type='text'>
For cases where size_t is smaller than mp_int_t (eg nan-boxing builds) the
difference between two size_t's is not sign extended into mp_int_t and so
the result is never negative.  This patch fixes this bug by using ssize_t
for the type of the result.
</content>
</entry>
<entry>
<title>py/objdeque: Use m_new0 when allocating items to avoid need to clear.</title>
<updated>2018-02-21T12:36:46+00:00</updated>
<author>
<name>Damien George</name>
<email>damien.p.george@gmail.com</email>
</author>
<published>2018-02-21T12:36:46+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/commit/?id=6e675c1baaf0de0d56a2345376d6b5600bfab3aa'/>
<id>urn:sha1:6e675c1baaf0de0d56a2345376d6b5600bfab3aa</id>
<content type='text'>
Saves a few bytes of code space, and is more efficient because with
MICROPY_GC_CONSERVATIVE_CLEAR enabled by default all memory is already
cleared when allocated.
</content>
</entry>
<entry>
<title>py/objdeque: Protect against negative maxlen in deque constructor.</title>
<updated>2018-02-21T12:34:17+00:00</updated>
<author>
<name>Damien George</name>
<email>damien.p.george@gmail.com</email>
</author>
<published>2018-02-21T12:34:17+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/commit/?id=160d6708684de8c71895f90bc699a5879fb6ed29'/>
<id>urn:sha1:160d6708684de8c71895f90bc699a5879fb6ed29</id>
<content type='text'>
Otherwise passing -1 as maxlen will lead to a zero allocation and
subsequent unbound buffer overflow in deque.append() because i_put is
allowed to grow without bound.
</content>
</entry>
<entry>
<title>py/objdeque: Allow to compile without warnings by disabling deque_clear.</title>
<updated>2018-02-21T11:52:58+00:00</updated>
<author>
<name>Damien George</name>
<email>damien.p.george@gmail.com</email>
</author>
<published>2018-02-21T11:52:58+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/commit/?id=6c3faf6c17521940eb3ec48a8af3d28b513e2ba2'/>
<id>urn:sha1:6c3faf6c17521940eb3ec48a8af3d28b513e2ba2</id>
<content type='text'>
</content>
</entry>
<entry>
<title>py/objdeque: Implement ucollections.deque type with fixed size.</title>
<updated>2018-02-21T11:39:25+00:00</updated>
<author>
<name>Paul Sokolovsky</name>
<email>pfalcon@users.sourceforge.net</email>
</author>
<published>2018-02-05T22:06:42+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/commit/?id=970eedce8f37af46cb2b67fa0e91d76c82057541'/>
<id>urn:sha1:970eedce8f37af46cb2b67fa0e91d76c82057541</id>
<content type='text'>
So far, implements just append() and popleft() methods, required for
a normal queue. Constructor doesn't accept an arbitarry sequence to
initialize from (am empty deque is always created), so an empty tuple
must be passed as such. Only fixed-size deques are supported, so 2nd
argument (size) is required.

There's also an extension to CPython - if True is passed as 3rd argument,
append(), instead of silently overwriting the oldest item on queue
overflow, will throw IndexError. This behavior is desired in many
cases, where queues should store information reliably, instead of
silently losing some items.
</content>
</entry>
</feed>
