<feed xmlns='http://www.w3.org/2005/Atom'>
<title>suspect-devices/circuitpython/py/objint.c, branch v1.9.1</title>
<subtitle>CircuitPython - a Python implementation for teaching coding with microcontrollers</subtitle>
<id>https://git.suspectdevices.com/suspect-devices/circuitpython/atom?h=v1.9.1</id>
<link rel='self' href='https://git.suspectdevices.com/suspect-devices/circuitpython/atom?h=v1.9.1'/>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/'/>
<updated>2017-05-06T00:29:09+00:00</updated>
<entry>
<title>py/objint: In int.from_bytes, only create big-int if really needed.</title>
<updated>2017-05-06T00:29:09+00:00</updated>
<author>
<name>Damien George</name>
<email>damien.p.george@gmail.com</email>
</author>
<published>2017-05-05T11:42:39+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/commit/?id=58bb73e010301235b32c3b81575af21cca55f2a7'/>
<id>urn:sha1:58bb73e010301235b32c3b81575af21cca55f2a7</id>
<content type='text'>
This patch ensures that int.from_bytes only creates a big-int if necessary,
by checking the value for a small-int overflow as it's being parsed.
</content>
</entry>
<entry>
<title>py/objint: Use unsigned arithmetic when formatting an integer.</title>
<updated>2017-04-11T05:18:35+00:00</updated>
<author>
<name>Damien George</name>
<email>damien.p.george@gmail.com</email>
</author>
<published>2017-04-11T05:18:35+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/commit/?id=e31fbd9b41315963aaca732e7585fc4cb10ccbcd'/>
<id>urn:sha1:e31fbd9b41315963aaca732e7585fc4cb10ccbcd</id>
<content type='text'>
Otherwise the edge case of the most negative integer value will not convert
correctly.
</content>
</entry>
<entry>
<title>py/objint: Extract small int value directly because type is known.</title>
<updated>2017-04-11T05:16:09+00:00</updated>
<author>
<name>Damien George</name>
<email>damien.p.george@gmail.com</email>
</author>
<published>2017-04-11T05:16:09+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/commit/?id=f66df1efc85fe9fc7fd0b2125792d02001de48bb'/>
<id>urn:sha1:f66df1efc85fe9fc7fd0b2125792d02001de48bb</id>
<content type='text'>
</content>
</entry>
<entry>
<title>py/objint: Consolidate mp_obj_new_int_from_float to one implementation.</title>
<updated>2017-04-04T06:45:49+00:00</updated>
<author>
<name>Damien George</name>
<email>damien.p.george@gmail.com</email>
</author>
<published>2017-04-04T06:45:49+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/commit/?id=fc245d1ca4367f9876ac32c7e08e169da7db79b9'/>
<id>urn:sha1:fc245d1ca4367f9876ac32c7e08e169da7db79b9</id>
<content type='text'>
This reduces code duplication and allows to make mp_classify_fp_as_int
static, which reduces code size.
</content>
</entry>
<entry>
<title>py: Change mp_uint_t to size_t for mp_obj_str_get_data len arg.</title>
<updated>2017-03-29T01:56:45+00:00</updated>
<author>
<name>Damien George</name>
<email>damien.p.george@gmail.com</email>
</author>
<published>2017-03-25T08:48:18+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/commit/?id=6b341075376705ee1fe9e003b76b09afa59778f4'/>
<id>urn:sha1:6b341075376705ee1fe9e003b76b09afa59778f4</id>
<content type='text'>
</content>
</entry>
<entry>
<title>py/objint: Handle special case of -0 when classifying fp as int.</title>
<updated>2017-03-23T12:51:35+00:00</updated>
<author>
<name>Damien George</name>
<email>damien.p.george@gmail.com</email>
</author>
<published>2017-03-23T12:51:35+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/commit/?id=c073519ec824145676edef88623496c1ded4fae5'/>
<id>urn:sha1:c073519ec824145676edef88623496c1ded4fae5</id>
<content type='text'>
Otherwise -0.0 is classified as a bigint, which for builds without bigints
will lead unexpectedly to an overflow.
</content>
</entry>
<entry>
<title>py/objint: Allow to print long-long ints without using the heap.</title>
<updated>2017-03-14T03:54:20+00:00</updated>
<author>
<name>Damien George</name>
<email>damien.p.george@gmail.com</email>
</author>
<published>2017-03-14T03:54:20+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/commit/?id=d1ae6ae080e1475b50aa2c6580d1ea588cfbdf64'/>
<id>urn:sha1:d1ae6ae080e1475b50aa2c6580d1ea588cfbdf64</id>
<content type='text'>
Some stack is allocated to format ints, and when the int implementation uses
long-long there should be additional stack allocated compared with the other
cases.  This patch uses the existing "fmt_int_t" type to determine the
amount of stack to allocate.
</content>
</entry>
<entry>
<title>py/objint: Convert mp_uint_t to size_t where appropriate.</title>
<updated>2017-02-16T05:51:17+00:00</updated>
<author>
<name>Damien George</name>
<email>damien.p.george@gmail.com</email>
</author>
<published>2017-02-16T05:41:43+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/commit/?id=da36f5232dcf02c448ee9933e358b711cfe03f30'/>
<id>urn:sha1:da36f5232dcf02c448ee9933e358b711cfe03f30</id>
<content type='text'>
</content>
</entry>
<entry>
<title>py/objint: Fix left-shift overflow in checking for large int.</title>
<updated>2017-01-25T03:39:13+00:00</updated>
<author>
<name>Damien George</name>
<email>damien.p.george@gmail.com</email>
</author>
<published>2017-01-25T03:39:13+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/commit/?id=eaa77455c37cf18670d181556e6d17e0b01c2267'/>
<id>urn:sha1:eaa77455c37cf18670d181556e6d17e0b01c2267</id>
<content type='text'>
</content>
</entry>
<entry>
<title>py/objint: from_bytes(): Implement "byteorder" param and arbitrary precision.</title>
<updated>2017-01-21T17:14:18+00:00</updated>
<author>
<name>Paul Sokolovsky</name>
<email>pfalcon@users.sourceforge.net</email>
</author>
<published>2017-01-21T17:14:18+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/commit/?id=bec7bfb29d76f995dbf223c20f5d04ae1e33cee6'/>
<id>urn:sha1:bec7bfb29d76f995dbf223c20f5d04ae1e33cee6</id>
<content type='text'>
If result guaranteedly fits in a small int, it is handled in objint.c.
Otherwise, it is delegated to mp_obj_int_from_bytes_impl(), which should
be implemented by individual objint_*.c, similar to
mp_obj_int_to_bytes_impl().
</content>
</entry>
</feed>
