<feed xmlns='http://www.w3.org/2005/Atom'>
<title>suspect-devices/circuitpython/py/mpprint.h, branch travis-esp8266</title>
<subtitle>CircuitPython - a Python implementation for teaching coding with microcontrollers</subtitle>
<id>https://git.suspectdevices.com/suspect-devices/circuitpython/atom?h=travis-esp8266</id>
<link rel='self' href='https://git.suspectdevices.com/suspect-devices/circuitpython/atom?h=travis-esp8266'/>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/'/>
<updated>2015-11-29T14:25:04+00:00</updated>
<entry>
<title>py: Change mp_print_strn_t func type to use size_t for the str length.</title>
<updated>2015-11-29T14:25:04+00:00</updated>
<author>
<name>Damien George</name>
<email>damien.p.george@gmail.com</email>
</author>
<published>2015-11-27T12:19:25+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/commit/?id=4e7107a572b55321f3f483f0293dd19b4f752c9b'/>
<id>urn:sha1:4e7107a572b55321f3f483f0293dd19b4f752c9b</id>
<content type='text'>
</content>
</entry>
<entry>
<title>py: Remove unnecessary extra handling of padding of nan/inf.</title>
<updated>2015-05-28T14:22:12+00:00</updated>
<author>
<name>Damien George</name>
<email>damien.p.george@gmail.com</email>
</author>
<published>2015-05-28T14:22:12+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/commit/?id=79474c6b164fb66a8d348bfa57613f9dbf5af4e8'/>
<id>urn:sha1:79474c6b164fb66a8d348bfa57613f9dbf5af4e8</id>
<content type='text'>
C's printf will pad nan/inf differently to CPython.  Our implementation
originally conformed to C, now it conforms to CPython's way.

Tests for this are also added in this patch.
</content>
</entry>
<entry>
<title>py: Reduce size of mp_printf by eliminating unnecessary code.</title>
<updated>2015-05-28T13:54:56+00:00</updated>
<author>
<name>Damien George</name>
<email>damien.p.george@gmail.com</email>
</author>
<published>2015-05-28T13:54:56+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/commit/?id=2cae0f62908812b6cd925943ee70e7e0bef0387e'/>
<id>urn:sha1:2cae0f62908812b6cd925943ee70e7e0bef0387e</id>
<content type='text'>
Saves around 120 bytes on Thumb2 archs.
</content>
</entry>
<entry>
<title>py: Make mp_sys_stdout_print object, wrapping sys.stdout for mp_print*.</title>
<updated>2015-04-16T14:30:16+00:00</updated>
<author>
<name>Damien George</name>
<email>damien.p.george@gmail.com</email>
</author>
<published>2015-04-11T11:01:39+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/commit/?id=5ae5ec986ea5e14321f6c8091454c165c23b40c5'/>
<id>urn:sha1:5ae5ec986ea5e14321f6c8091454c165c23b40c5</id>
<content type='text'>
So now all printing should go via either mp_plat_print or
mp_sys_stdout_print.
</content>
</entry>
<entry>
<title>py: Overhaul and simplify printf/pfenv mechanism.</title>
<updated>2015-04-16T14:30:16+00:00</updated>
<author>
<name>Damien George</name>
<email>damien.p.george@gmail.com</email>
</author>
<published>2015-04-09T22:56:15+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/commit/?id=7f9d1d6ab923096582622b700bedb6a571518eac'/>
<id>urn:sha1:7f9d1d6ab923096582622b700bedb6a571518eac</id>
<content type='text'>
Previous to this patch the printing mechanism was a bit of a tangled
mess.  This patch attempts to consolidate printing into one interface.

All (non-debug) printing now uses the mp_print* family of functions,
mainly mp_printf.  All these functions take an mp_print_t structure as
their first argument, and this structure defines the printing backend
through the "print_strn" function of said structure.

Printing from the uPy core can reach the platform-defined print code via
two paths: either through mp_sys_stdout_obj (defined pert port) in
conjunction with mp_stream_write; or through the mp_plat_print structure
which uses the MP_PLAT_PRINT_STRN macro to define how string are printed
on the platform.  The former is only used when MICROPY_PY_IO is defined.

With this new scheme printing is generally more efficient (less layers
to go through, less arguments to pass), and, given an mp_print_t*
structure, one can call mp_print_str for efficiency instead of
mp_printf("%s", ...).  Code size is also reduced by around 200 bytes on
Thumb2 archs.
</content>
</entry>
</feed>
