<feed xmlns='http://www.w3.org/2005/Atom'>
<title>suspect-devices/circuitpython/py/objstr.c, branch 4.0.0-beta.0</title>
<subtitle>CircuitPython - a Python implementation for teaching coding with microcontrollers</subtitle>
<id>https://git.suspectdevices.com/suspect-devices/circuitpython/atom?h=4.0.0-beta.0</id>
<link rel='self' href='https://git.suspectdevices.com/suspect-devices/circuitpython/atom?h=4.0.0-beta.0'/>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/'/>
<updated>2019-01-15T02:09:02+00:00</updated>
<entry>
<title>fixup micropy</title>
<updated>2019-01-15T02:09:02+00:00</updated>
<author>
<name>Scott Shawcroft</name>
<email>scott@tannewt.org</email>
</author>
<published>2019-01-15T02:09:02+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/commit/?id=c27175496248424c0581211aa53a5371f44a37ce'/>
<id>urn:sha1:c27175496248424c0581211aa53a5371f44a37ce</id>
<content type='text'>
</content>
</entry>
<entry>
<title>py changes for supporting superclass constructors that take kwargs</title>
<updated>2019-01-15T01:29:19+00:00</updated>
<author>
<name>Scott Shawcroft</name>
<email>scott@tannewt.org</email>
</author>
<published>2019-01-14T23:14:40+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/commit/?id=72d993d60c5e5238942491df00776ca31f9758a1'/>
<id>urn:sha1:72d993d60c5e5238942491df00776ca31f9758a1</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>WIP: after merge; before testing</title>
<updated>2018-07-11T20:45:30+00:00</updated>
<author>
<name>Dan Halbert</name>
<email>halbert@halwitz.org</email>
</author>
<published>2018-07-11T20:45:30+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/commit/?id=7c219600a246d8956d0b23ea3f5d125a820e6b6a'/>
<id>urn:sha1:7c219600a246d8956d0b23ea3f5d125a820e6b6a</id>
<content type='text'>
</content>
</entry>
<entry>
<title>py/objstr: In find/rfind, don't crash when end &lt; start.</title>
<updated>2018-04-05T06:14:17+00:00</updated>
<author>
<name>Jeff Epler</name>
<email>jepler@gmail.com</email>
</author>
<published>2018-04-01T02:27:56+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/commit/?id=d6cf5c674952d5ae3463d9b580dac6559576deac'/>
<id>urn:sha1:d6cf5c674952d5ae3463d9b580dac6559576deac</id>
<content type='text'>
</content>
</entry>
<entry>
<title>py/objstr: Don't crash when end &lt; start</title>
<updated>2018-04-01T03:17:11+00:00</updated>
<author>
<name>Jeff Epler</name>
<email>jepler@gmail.com</email>
</author>
<published>2018-04-01T02:27:56+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/commit/?id=0041df0c6b493458000d7e815e094995cfbc8043'/>
<id>urn:sha1:0041df0c6b493458000d7e815e094995cfbc8043</id>
<content type='text'>
.. and add testcases for the same.

(crash found by afl-fuzz)
</content>
</entry>
<entry>
<title>py/runtime: Check that keys in dicts passed as ** args are strings.</title>
<updated>2018-03-30T00:13:32+00:00</updated>
<author>
<name>Damien George</name>
<email>damien.p.george@gmail.com</email>
</author>
<published>2018-03-30T00:09:00+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/commit/?id=32807881954f106b9735de74fe984062a0815b81'/>
<id>urn:sha1:32807881954f106b9735de74fe984062a0815b81</id>
<content type='text'>
Prior to this patch the code would crash if a key in a ** dict was anything
other than a str or qstr.  This is because mp_setup_code_state() assumes
that keys in kwargs are qstrs (for efficiency).

Thanks to @jepler for finding the bug.
</content>
</entry>
<entry>
<title>py/objstr: Remove unnecessary check for positive splits variable.</title>
<updated>2018-02-20T08:19:02+00:00</updated>
<author>
<name>Damien George</name>
<email>damien.p.george@gmail.com</email>
</author>
<published>2018-02-20T08:19:02+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/commit/?id=8769049e935a89daa51883755457a083a5589d4e'/>
<id>urn:sha1:8769049e935a89daa51883755457a083a5589d4e</id>
<content type='text'>
At this point in the code the variable "splits" is guaranteed to be
positive due to the check for "splits == 0" above it.
</content>
</entry>
<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/unicode: Clean up utf8 funcs and provide non-utf8 inline versions.</title>
<updated>2018-02-14T07:19:22+00:00</updated>
<author>
<name>Damien George</name>
<email>damien.p.george@gmail.com</email>
</author>
<published>2018-02-14T07:19:22+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/commit/?id=19aee9438a7a8cf8539536dab5147aedb6b16bb3'/>
<id>urn:sha1:19aee9438a7a8cf8539536dab5147aedb6b16bb3</id>
<content type='text'>
This patch provides inline versions of the utf8 helper functions for the
case when unicode is disabled (MICROPY_PY_BUILTINS_STR_UNICODE set to 0).
This saves code size.

The unichar_charlen function is also renamed to utf8_charlen to match the
other utf8 helper functions, and the signature of this function is adjusted
for consistency (const char* -&gt; const byte*, mp_uint_t -&gt; size_t).
</content>
</entry>
</feed>
