<feed xmlns='http://www.w3.org/2005/Atom'>
<title>suspect-devices/circuitpython/tests/basics/bytes.py, branch main</title>
<subtitle>CircuitPython - a Python implementation for teaching coding with microcontrollers</subtitle>
<id>https://git.suspectdevices.com/suspect-devices/circuitpython/atom?h=main</id>
<link rel='self' href='https://git.suspectdevices.com/suspect-devices/circuitpython/atom?h=main'/>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/'/>
<updated>2018-02-19T05:25:30+00:00</updated>
<entry>
<title>py/objstr: Protect against creating bytes(n) with n negative.</title>
<updated>2018-02-19T05:25:30+00:00</updated>
<author>
<name>Damien George</name>
<email>damien.p.george@gmail.com</email>
</author>
<published>2018-02-19T05:25:30+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/commit/?id=4e469085c192017c5244bbc115bac90f4bb667cb'/>
<id>urn:sha1:4e469085c192017c5244bbc115bac90f4bb667cb</id>
<content type='text'>
Prior to this patch uPy (on a 32-bit arch) would have severe issues when
calling bytes(-1): such a call would call vstr_init_len(vstr, -1) which
would then +1 on the len and call vstr_init(vstr, 0), which would then
round this up and allocate a small amount of memory for the vstr.  The
bytes constructor would then attempt to zero out all this memory, thinking
it had allocated 2^32-1 bytes.
</content>
</entry>
<entry>
<title>py/objstr: Make empty bytes object have a null-terminating byte.</title>
<updated>2017-10-04T06:59:22+00:00</updated>
<author>
<name>Damien George</name>
<email>damien.p.george@gmail.com</email>
</author>
<published>2017-10-04T06:59:22+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/commit/?id=dfa563c71fead671931e91b786cd649eed517f92'/>
<id>urn:sha1:dfa563c71fead671931e91b786cd649eed517f92</id>
<content type='text'>
Because a lot of string processing functions assume there is a null
terminating byte, so they can work in an efficient way.

Fixes issue #3334.
</content>
</entry>
<entry>
<title>tests: Add tests to exercise lexer; and some more complex number tests.</title>
<updated>2015-04-04T22:16:22+00:00</updated>
<author>
<name>Damien George</name>
<email>damien.p.george@gmail.com</email>
</author>
<published>2015-04-04T22:16:22+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/commit/?id=97abe22963af5b62656cef5a46c195215f75f7d2'/>
<id>urn:sha1:97abe22963af5b62656cef5a46c195215f75f7d2</id>
<content type='text'>
</content>
</entry>
<entry>
<title>tests: Add some more tests for bytes, bignum, string and ujson.</title>
<updated>2015-03-14T21:20:58+00:00</updated>
<author>
<name>Damien George</name>
<email>damien.p.george@gmail.com</email>
</author>
<published>2015-03-14T21:20:58+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/commit/?id=26a9975fba2bbd8875f2671495003b9bdcb8d8b2'/>
<id>urn:sha1:26a9975fba2bbd8875f2671495003b9bdcb8d8b2</id>
<content type='text'>
</content>
</entry>
<entry>
<title>tests: Add testcase for bytes() on values in range 128-255.</title>
<updated>2015-01-28T20:29:51+00:00</updated>
<author>
<name>Paul Sokolovsky</name>
<email>pfalcon@users.sourceforge.net</email>
</author>
<published>2015-01-28T20:29:51+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/commit/?id=57aebe171459fd599f8d430c1ea1660ed307360c'/>
<id>urn:sha1:57aebe171459fd599f8d430c1ea1660ed307360c</id>
<content type='text'>
</content>
</entry>
<entry>
<title>tests: Fix uctypes tests to run on 64bit arch; enable more native tests.</title>
<updated>2014-09-23T14:15:45+00:00</updated>
<author>
<name>Damien George</name>
<email>damien.p.george@gmail.com</email>
</author>
<published>2014-09-23T12:09:26+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/commit/?id=96e20c600f6498c403445956077f85dd2fb548aa'/>
<id>urn:sha1:96e20c600f6498c403445956077f85dd2fb548aa</id>
<content type='text'>
</content>
</entry>
<entry>
<title>objstr: Make sure that bytes are indexed as bytes, not as unicode.</title>
<updated>2014-08-11T19:38:00+00:00</updated>
<author>
<name>Paul Sokolovsky</name>
<email>pfalcon@users.sourceforge.net</email>
</author>
<published>2014-08-11T19:36:38+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/commit/?id=9749b2fb0d6c4ff65c7395e09028102c9508b34a'/>
<id>urn:sha1:9749b2fb0d6c4ff65c7395e09028102c9508b34a</id>
<content type='text'>
Fixes #795.
</content>
</entry>
<entry>
<title>py: Make 'bytes' be a proper type, support standard constructor args.</title>
<updated>2014-03-21T22:07:04+00:00</updated>
<author>
<name>Paul Sokolovsky</name>
<email>pfalcon@users.sourceforge.net</email>
</author>
<published>2014-03-21T21:46:59+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/commit/?id=1ecea7c7539e73f105fef25da8a3bde7783da755'/>
<id>urn:sha1:1ecea7c7539e73f105fef25da8a3bde7783da755</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Add basic implementation of bytes type, piggybacking on str.</title>
<updated>2014-01-24T20:56:26+00:00</updated>
<author>
<name>Paul Sokolovsky</name>
<email>pfalcon@users.sourceforge.net</email>
</author>
<published>2014-01-24T20:50:40+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/commit/?id=91fb1c9b13021e90fa2f8c2105c135fc14ac71db'/>
<id>urn:sha1:91fb1c9b13021e90fa2f8c2105c135fc14ac71db</id>
<content type='text'>
This reuses as much str implementation as possible, from this we
can make them more separate as needed.
</content>
</entry>
</feed>
