<feed xmlns='http://www.w3.org/2005/Atom'>
<title>suspect-devices/circuitpython/py/objint.c, branch 5.0.0</title>
<subtitle>CircuitPython - a Python implementation for teaching coding with microcontrollers</subtitle>
<id>https://git.suspectdevices.com/suspect-devices/circuitpython/atom?h=5.0.0</id>
<link rel='self' href='https://git.suspectdevices.com/suspect-devices/circuitpython/atom?h=5.0.0'/>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/'/>
<updated>2020-02-14T20:12:20+00:00</updated>
<entry>
<title>Implement to_bytes(..., signed=True)</title>
<updated>2020-02-14T20:12:20+00:00</updated>
<author>
<name>Dan Halbert</name>
<email>halbert@halwitz.org</email>
</author>
<published>2020-02-14T20:12:20+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/commit/?id=c592bd612ad8231f61681aa40cd51b6bbfcb307f'/>
<id>urn:sha1:c592bd612ad8231f61681aa40cd51b6bbfcb307f</id>
<content type='text'>
</content>
</entry>
<entry>
<title>use approx of original @godlygeek code for smallints; add tests</title>
<updated>2019-05-12T15:17:29+00:00</updated>
<author>
<name>Dan Halbert</name>
<email>halbert@halwitz.org</email>
</author>
<published>2019-05-12T15:17:29+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/commit/?id=8664a6574b4cb448df26bfaa0e12eb203cc5d759'/>
<id>urn:sha1:8664a6574b4cb448df26bfaa0e12eb203cc5d759</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Handle truth values; speed up smallint checks</title>
<updated>2019-05-12T04:10:53+00:00</updated>
<author>
<name>Dan Halbert</name>
<email>halbert@halwitz.org</email>
</author>
<published>2019-05-12T04:10:53+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/commit/?id=d103ac1d6325a075be3fafe812858584435f3144'/>
<id>urn:sha1:d103ac1d6325a075be3fafe812858584435f3144</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Reverse int to bytes buffer overflow conditionals</title>
<updated>2019-05-10T02:03:12+00:00</updated>
<author>
<name>Matt Wozniski</name>
<email>godlygeek+git@gmail.com</email>
</author>
<published>2019-05-10T02:02:13+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/commit/?id=1d0c61642b6fff2251c6b65a9fc18afd0ac255d5'/>
<id>urn:sha1:1d0c61642b6fff2251c6b65a9fc18afd0ac255d5</id>
<content type='text'>
Rather than jumping to a label when an overflow is known to have
occurred, return early when one is known not to have.
</content>
</entry>
<entry>
<title>Use OverflowError exception type for overflows</title>
<updated>2019-05-09T07:22:26+00:00</updated>
<author>
<name>Matt Wozniski</name>
<email>godlygeek+git@gmail.com</email>
</author>
<published>2019-05-09T07:20:15+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/commit/?id=f325bd848b183f9b111b44e2fab2a9e6a366af3c'/>
<id>urn:sha1:f325bd848b183f9b111b44e2fab2a9e6a366af3c</id>
<content type='text'>
Initially I used one of the existing exception raise functions, but it's
more correct and not much more code to raise OverflowError instead.
</content>
</entry>
<entry>
<title>Add overflow checks for int to bytes conversions</title>
<updated>2019-05-09T07:22:25+00:00</updated>
<author>
<name>Matt Wozniski</name>
<email>godlygeek+git@gmail.com</email>
</author>
<published>2019-05-09T03:50:35+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/commit/?id=095c844004bcd8680a4bf68901adbd9cac6a4302'/>
<id>urn:sha1:095c844004bcd8680a4bf68901adbd9cac6a4302</id>
<content type='text'>
For both small and long integers, raise an exception if calling
struct.pack, adding an element to an array.array, or formatting an int
with int.to_bytes would overflow the requested size.
</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>py/objint: Remove unreachable code checking for int type in format func.</title>
<updated>2018-03-02T00:01:24+00:00</updated>
<author>
<name>Damien George</name>
<email>damien.p.george@gmail.com</email>
</author>
<published>2018-03-02T00:01:24+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/commit/?id=9884a2c712988de8c69a03a5d5be8add043f141e'/>
<id>urn:sha1:9884a2c712988de8c69a03a5d5be8add043f141e</id>
<content type='text'>
All callers of mp_obj_int_formatted() are expected to pass in a valid int
object, and they do:

- mp_obj_int_print() should always pass through an int object because it is
  the print special method for int instances.

- mp_print_mp_int() checks that the argument is an int, and if not converts
  it to a small int.

This patch saves around 20-50 bytes of code space.
</content>
</entry>
<entry>
<title>py/objint: Use MP_OBJ_IS_STR_OR_BYTES macro instead of 2 separate ones.</title>
<updated>2018-02-20T13:20:46+00:00</updated>
<author>
<name>Damien George</name>
<email>damien.p.george@gmail.com</email>
</author>
<published>2018-02-20T13:20:46+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/commit/?id=fe3e17b026595f3386114e784b26a4a07810055c'/>
<id>urn:sha1:fe3e17b026595f3386114e784b26a4a07810055c</id>
<content type='text'>
</content>
</entry>
</feed>
