<feed xmlns='http://www.w3.org/2005/Atom'>
<title>suspect-devices/circuitpython/py/parsenum.c, branch v1.8.4</title>
<subtitle>CircuitPython - a Python implementation for teaching coding with microcontrollers</subtitle>
<id>https://git.suspectdevices.com/suspect-devices/circuitpython/atom?h=v1.8.4</id>
<link rel='self' href='https://git.suspectdevices.com/suspect-devices/circuitpython/atom?h=v1.8.4'/>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/'/>
<updated>2016-03-29T21:12:07+00:00</updated>
<entry>
<title>py/parsenum: Use pow function to apply exponent to decimal number.</title>
<updated>2016-03-29T21:12:07+00:00</updated>
<author>
<name>Damien George</name>
<email>damien.p.george@gmail.com</email>
</author>
<published>2016-03-29T21:12:07+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/commit/?id=259967238423f2b11479dadbab6eae77cd038096'/>
<id>urn:sha1:259967238423f2b11479dadbab6eae77cd038096</id>
<content type='text'>
Pow is already a dependency when compiling with floats, so may as well
use it here to reduce code size and speed up the conversion for most
cases.
</content>
</entry>
<entry>
<title>py/parsenum: Fix compiler warnings for no decl and signed comparison.</title>
<updated>2016-03-14T22:52:52+00:00</updated>
<author>
<name>Damien George</name>
<email>damien.p.george@gmail.com</email>
</author>
<published>2016-03-14T22:52:52+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/commit/?id=06b398489e312050bc13ef6ddaca52e77a8b119b'/>
<id>urn:sha1:06b398489e312050bc13ef6ddaca52e77a8b119b</id>
<content type='text'>
</content>
</entry>
<entry>
<title>py/parsenum: Use size_t to count bytes, and int for type of base arg.</title>
<updated>2016-03-14T22:34:03+00:00</updated>
<author>
<name>Damien George</name>
<email>damien.p.george@gmail.com</email>
</author>
<published>2016-03-14T22:34:03+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/commit/?id=dddb98db8b7544db0248843ad2450a7177adac4a'/>
<id>urn:sha1:dddb98db8b7544db0248843ad2450a7177adac4a</id>
<content type='text'>
size_t is the proper type to count number of bytes in a string.  The base
argument does not need to be a full mp_uint_t, int is enough.
</content>
</entry>
<entry>
<title>py: Wrap all obj-ptr conversions in MP_OBJ_TO_PTR/MP_OBJ_FROM_PTR.</title>
<updated>2015-11-29T14:25:35+00:00</updated>
<author>
<name>Damien George</name>
<email>damien.p.george@gmail.com</email>
</author>
<published>2015-11-27T17:01:44+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/commit/?id=999cedb90ff0827cdb9dfe0e4faa6ebc1739d271'/>
<id>urn:sha1:999cedb90ff0827cdb9dfe0e4faa6ebc1739d271</id>
<content type='text'>
This allows the mp_obj_t type to be configured to something other than a
pointer-sized primitive type.

This patch also includes additional changes to allow the code to compile
when sizeof(mp_uint_t) != sizeof(void*), such as using size_t instead of
mp_uint_t, and various casts.
</content>
</entry>
<entry>
<title>py/parsenum: Provide detailed error for int parsing with escaped bytes.</title>
<updated>2015-10-01T16:18:12+00:00</updated>
<author>
<name>Damien George</name>
<email>damien.p.george@gmail.com</email>
</author>
<published>2015-10-01T16:06:13+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/commit/?id=5f3c3ec5e62e64872bfd3f274473db86c2b7fd25'/>
<id>urn:sha1:5f3c3ec5e62e64872bfd3f274473db86c2b7fd25</id>
<content type='text'>
This patch adds more fine grained error message control for errors when
parsing integers (now has terse, normal and detailed).  When detailed is
enabled, the error now escapes bytes when printing them so they can be
more easily seen.
</content>
</entry>
<entry>
<title>py: Clarify comment in parsenum.c about ValueError vs SyntaxError.</title>
<updated>2015-06-23T16:08:51+00:00</updated>
<author>
<name>Damien George</name>
<email>damien.p.george@gmail.com</email>
</author>
<published>2015-06-23T16:08:51+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/commit/?id=2a1090a637e4877af443e57e133808f088848721'/>
<id>urn:sha1:2a1090a637e4877af443e57e133808f088848721</id>
<content type='text'>
</content>
</entry>
<entry>
<title>py: Change exception type to ValueError when error reporting is terse.</title>
<updated>2015-06-23T13:30:49+00:00</updated>
<author>
<name>Daniel Campora</name>
<email>daniel@wipy.io</email>
</author>
<published>2015-06-23T13:30:49+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/commit/?id=228c68a9cd02cfc3e9c6019f82b3b5992b5f613b'/>
<id>urn:sha1:228c68a9cd02cfc3e9c6019f82b3b5992b5f613b</id>
<content type='text'>
Addresses issue #1347
</content>
</entry>
<entry>
<title>py/parsenum.c: Rename "raise" func to "raise_exc" to avoid name clash.</title>
<updated>2015-05-30T22:13:16+00:00</updated>
<author>
<name>Damien George</name>
<email>damien.p.george@gmail.com</email>
</author>
<published>2015-05-30T22:13:16+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/commit/?id=0ec8cf8e80ecdac77416a2d3fed861c95515d5df'/>
<id>urn:sha1:0ec8cf8e80ecdac77416a2d3fed861c95515d5df</id>
<content type='text'>
"raise" is a common word that was found to exist in a vendor's stdlib.
</content>
</entry>
<entry>
<title>py: Fix printing of error message when parsing malformed integer.</title>
<updated>2015-03-16T10:42:50+00:00</updated>
<author>
<name>Damien George</name>
<email>damien.p.george@gmail.com</email>
</author>
<published>2015-03-16T10:42:50+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/commit/?id=d4bd37a561a18aa849c73ac285204eebd1078c15'/>
<id>urn:sha1:d4bd37a561a18aa849c73ac285204eebd1078c15</id>
<content type='text'>
</content>
</entry>
<entry>
<title>py: Parse big-int/float/imag constants directly in parser.</title>
<updated>2015-02-08T01:57:40+00:00</updated>
<author>
<name>Damien George</name>
<email>damien.p.george@gmail.com</email>
</author>
<published>2015-02-08T01:57:40+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/commit/?id=7d414a1b52d193bab2c94cf56932e1eba23ba542'/>
<id>urn:sha1:7d414a1b52d193bab2c94cf56932e1eba23ba542</id>
<content type='text'>
Previous to this patch, a big-int, float or imag constant was interned
(made into a qstr) and then parsed at runtime to create an object each
time it was needed.  This is wasteful in RAM and not efficient.  Now,
these constants are parsed straight away in the parser and turned into
objects.  This allows constants with large numbers of digits (so
addresses issue #1103) and takes us a step closer to #722.
</content>
</entry>
</feed>
