<feed xmlns='http://www.w3.org/2005/Atom'>
<title>suspect-devices/circuitpython/py/mpprint.c, branch 3.0.0-rc.0</title>
<subtitle>CircuitPython - a Python implementation for teaching coding with microcontrollers</subtitle>
<id>https://git.suspectdevices.com/suspect-devices/circuitpython/atom?h=3.0.0-rc.0</id>
<link rel='self' href='https://git.suspectdevices.com/suspect-devices/circuitpython/atom?h=3.0.0-rc.0'/>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/'/>
<updated>2017-10-04T07:07:32+00:00</updated>
<entry>
<title>py/mpprint: Only check for null string printing when NDEBUG not defined.</title>
<updated>2017-10-04T07:07:32+00:00</updated>
<author>
<name>Damien George</name>
<email>damien.p.george@gmail.com</email>
</author>
<published>2017-10-04T07:07:32+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/commit/?id=23faf88cab10a216eb24a30b4f33edd17183522c'/>
<id>urn:sha1:23faf88cab10a216eb24a30b4f33edd17183522c</id>
<content type='text'>
Printing "(null)" when a NULL string pointer is passed to %s is a debugging
feature and not a feature that's relied upon by the code.  So it only needs
to be compiled in when debugging (such as assert) is enabled, and saves
roughy 30 bytes of code when disabled.

This patch also fixes this NULL check to not do the check if the precision
is specified as zero.
</content>
</entry>
<entry>
<title>all: Use the name MicroPython consistently in comments</title>
<updated>2017-07-31T08:35:40+00:00</updated>
<author>
<name>Alexander Steffen</name>
<email>devel.20.webmeister@spamgourmet.com</email>
</author>
<published>2017-06-30T07:22:17+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/commit/?id=55f33240f3d7051d4213629e92437a36f1fac50e'/>
<id>urn:sha1:55f33240f3d7051d4213629e92437a36f1fac50e</id>
<content type='text'>
There were several different spellings of MicroPython present in comments,
when there should be only one.
</content>
</entry>
<entry>
<title>py/mpprint: Remove unreachable check for neg return of mp_format_float.</title>
<updated>2017-06-30T02:10:50+00:00</updated>
<author>
<name>Damien George</name>
<email>damien.p.george@gmail.com</email>
</author>
<published>2017-06-30T02:10:50+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/commit/?id=adf22c19aee53222b116928581b4d4a009d3af55'/>
<id>urn:sha1:adf22c19aee53222b116928581b4d4a009d3af55</id>
<content type='text'>
</content>
</entry>
<entry>
<title>py/mpprint: Fix int formatting so "+" is printed for 0-valued integer.</title>
<updated>2017-03-15T06:25:12+00:00</updated>
<author>
<name>Damien George</name>
<email>damien.p.george@gmail.com</email>
</author>
<published>2017-03-15T06:25:12+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/commit/?id=d65371538d8ecdc64691f1c522b5b9ecc1299c7f'/>
<id>urn:sha1:d65371538d8ecdc64691f1c522b5b9ecc1299c7f</id>
<content type='text'>
</content>
</entry>
<entry>
<title>py/mpprint: Add assertion for, and comment about, valid base values.</title>
<updated>2016-12-28T01:45:33+00:00</updated>
<author>
<name>Damien George</name>
<email>damien.p.george@gmail.com</email>
</author>
<published>2016-12-28T01:45:33+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/commit/?id=44bf8e1f2b3a66e8da09331ac016fa7922d8453c'/>
<id>urn:sha1:44bf8e1f2b3a66e8da09331ac016fa7922d8453c</id>
<content type='text'>
</content>
</entry>
<entry>
<title>py/objint: Use size_t for arguments that measure bytes/sizes.</title>
<updated>2016-10-11T02:20:11+00:00</updated>
<author>
<name>Damien George</name>
<email>damien.p.george@gmail.com</email>
</author>
<published>2016-10-11T02:20:11+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/commit/?id=6dff3df501242d106590a48b5ed382b01a97baea'/>
<id>urn:sha1:6dff3df501242d106590a48b5ed382b01a97baea</id>
<content type='text'>
</content>
</entry>
<entry>
<title>py/mpprint: Fail an assertion with unsupported format specifiers.</title>
<updated>2016-09-01T08:09:44+00:00</updated>
<author>
<name>Delio Brignoli</name>
<email>brignoli.delio@gmail.com</email>
</author>
<published>2016-08-20T08:51:28+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/commit/?id=f98bb2ddcbfed7033ae93ae8fe98b0540a9fb42f'/>
<id>urn:sha1:f98bb2ddcbfed7033ae93ae8fe98b0540a9fb42f</id>
<content type='text'>
Arguments of an unknown type cannot be skipped and continuing to parse a
format string after encountering an unknown format specifier leads to
undefined behaviour.  This patch helps to find use of unsupported formats.
</content>
</entry>
<entry>
<title>py/mpprint: Fix sign extension when printf'ing %u, %x and %X.</title>
<updated>2016-02-01T15:08:42+00:00</updated>
<author>
<name>Damien George</name>
<email>damien.p.george@gmail.com</email>
</author>
<published>2016-02-01T15:08:42+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/commit/?id=9e677114e4aba8fdb417350a87ce1af33cef127f'/>
<id>urn:sha1:9e677114e4aba8fdb417350a87ce1af33cef127f</id>
<content type='text'>
</content>
</entry>
<entry>
<title>py: Change mp_obj_int_is_positive to more general mp_obj_int_sign.</title>
<updated>2016-01-07T14:29:12+00:00</updated>
<author>
<name>Damien George</name>
<email>damien.p.george@gmail.com</email>
</author>
<published>2016-01-07T14:29:12+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/commit/?id=d6b31e4578a9f7ed4f970774fe91eeb811b1d475'/>
<id>urn:sha1:d6b31e4578a9f7ed4f970774fe91eeb811b1d475</id>
<content type='text'>
This function returns the sign (-1, 0 or 1) of the integer object.
</content>
</entry>
<entry>
<title>py/mpprint: Fix printing of 64bit integers for 64bit windows builds</title>
<updated>2015-12-19T01:15:58+00:00</updated>
<author>
<name>stijn</name>
<email>stinos@zoho.com</email>
</author>
<published>2015-12-18T09:20:33+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/commit/?id=0a4eb4dbf2df34b9a2efcf55855b9db7c7132bf7'/>
<id>urn:sha1:0a4eb4dbf2df34b9a2efcf55855b9db7c7132bf7</id>
<content type='text'>
This makes all tests pass again for 64bit windows builds which would
previously fail for anything printing ranges (builtin_range/unpack1)
because they were printed as range( ld, ld ).

This is done by reusing the mp_vprintf implementation for MICROPY_OBJ_REPR_D
for 64bit windows builds (both msvc and mingw-w64) since the format specifier
used for 64bit integers is also %lld, or %llu for the unsigned version.

Note these specifiers used to be fetched from inttypes.h, which is the
C99 way of working with printf/scanf in a portable way, but mingw-w64
wants to be backwards compatible with older MS C runtimes and uses
the non-portable %I64i instead of %lld in inttypes.h, so remove the use
of said header again in mpconfig.h and define the specifiers manually.
</content>
</entry>
</feed>
