<feed xmlns='http://www.w3.org/2005/Atom'>
<title>suspect-devices/circuitpython/py/objexcept.c, branch v1.8.3</title>
<subtitle>CircuitPython - a Python implementation for teaching coding with microcontrollers</subtitle>
<id>https://git.suspectdevices.com/suspect-devices/circuitpython/atom?h=v1.8.3</id>
<link rel='self' href='https://git.suspectdevices.com/suspect-devices/circuitpython/atom?h=v1.8.3'/>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/'/>
<updated>2016-05-12T13:27:52+00:00</updated>
<entry>
<title>py/objexcept: Don't convert errno to str in constructor, do it in print.</title>
<updated>2016-05-12T13:27:52+00:00</updated>
<author>
<name>Damien George</name>
<email>damien.p.george@gmail.com</email>
</author>
<published>2016-05-12T13:27:52+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/commit/?id=9a9249964155f333131bbd728ffc755e80dc68a2'/>
<id>urn:sha1:9a9249964155f333131bbd728ffc755e80dc68a2</id>
<content type='text'>
OSError's are now printed like:

    OSError: [Errno 1] EPERM

but only if the string corresponding to the errno is found.
</content>
</entry>
<entry>
<title>py: Add mp_errno_to_str() and use it to provide nicer OSError msgs.</title>
<updated>2016-05-12T12:20:40+00:00</updated>
<author>
<name>Damien George</name>
<email>damien.p.george@gmail.com</email>
</author>
<published>2016-05-12T12:20:40+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/commit/?id=d45e5f8c357d13e66aeac644e2b5ead8c734025f'/>
<id>urn:sha1:d45e5f8c357d13e66aeac644e2b5ead8c734025f</id>
<content type='text'>
If an OSError is raised with an integer argument, and that integer
corresponds to an errno, then the string for the errno is used as the
argument to the exception, instead of the integer.  Only works if
the uerrno module is enabled.
</content>
</entry>
<entry>
<title>py: add async/await/async for/async with syntax</title>
<updated>2016-04-13T14:26:38+00:00</updated>
<author>
<name>pohmelie</name>
<email>multisosnooley@gmail.com</email>
</author>
<published>2016-01-27T20:23:11+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/commit/?id=81ebba7e0236163b7594938201bf3a6b802ebfaa'/>
<id>urn:sha1:81ebba7e0236163b7594938201bf3a6b802ebfaa</id>
<content type='text'>
They are sugar for marking function as generator, "yield from"
and pep492 python "semantically equivalents" respectively.

@dpgeorge was the original author of this patch, but @pohmelie made
changes to implement `async for` and `async with`.
</content>
</entry>
<entry>
<title>py: Change first arg of type.make_new from mp_obj_t to mp_obj_type_t*.</title>
<updated>2016-01-11T00:49:27+00:00</updated>
<author>
<name>Damien George</name>
<email>damien.p.george@gmail.com</email>
</author>
<published>2016-01-03T15:55:55+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/commit/?id=5b3f0b7f39bd67cc9182993c288f09f67a0890df'/>
<id>urn:sha1:5b3f0b7f39bd67cc9182993c288f09f67a0890df</id>
<content type='text'>
The first argument to the type.make_new method is naturally a uPy type,
and all uses of this argument cast it directly to a pointer to a type
structure.  So it makes sense to just have it a pointer to a type from
the very beginning (and a const pointer at that).  This patch makes
such a change, and removes all unnecessary casting to/from mp_obj_t.
</content>
</entry>
<entry>
<title>py: Change type signature of builtin funs that take variable or kw args.</title>
<updated>2016-01-11T00:49:27+00:00</updated>
<author>
<name>Damien George</name>
<email>damien.p.george@gmail.com</email>
</author>
<published>2016-01-03T14:21:40+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/commit/?id=4b72b3a133ea87a1ef8b964508dc25c551ccf093'/>
<id>urn:sha1:4b72b3a133ea87a1ef8b964508dc25c551ccf093</id>
<content type='text'>
With this patch the n_args parameter is changed type from mp_uint_t to
size_t.
</content>
</entry>
<entry>
<title>py: Change type of .make_new and .call args: mp_uint_t becomes size_t.</title>
<updated>2016-01-11T00:48:41+00:00</updated>
<author>
<name>Damien George</name>
<email>damien.p.george@gmail.com</email>
</author>
<published>2016-01-03T09:59:18+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/commit/?id=a0c97814dfcb0debbde8be99539e3d5ca2334e54'/>
<id>urn:sha1:a0c97814dfcb0debbde8be99539e3d5ca2334e54</id>
<content type='text'>
This patch changes the type signature of .make_new and .call object method
slots to use size_t for n_args and n_kw (was mp_uint_t.  Makes code more
efficient when mp_uint_t is larger than a machine word.  Doesn't affect
ports when size_t and mp_uint_t have the same size.
</content>
</entry>
<entry>
<title>py: Change exception traceback data to use size_t instead of mp_uint_t.</title>
<updated>2016-01-02T22:04:12+00:00</updated>
<author>
<name>Damien George</name>
<email>damien.p.george@gmail.com</email>
</author>
<published>2016-01-02T22:04:12+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/commit/?id=3d2daa2d03e300ac64005b8659c31f04a0f7fd53'/>
<id>urn:sha1:3d2daa2d03e300ac64005b8659c31f04a0f7fd53</id>
<content type='text'>
The traceback array stores qstrs and line numbers.  qstrs are typed as
size_t, and line numbers should safely fit in size_t as well.
</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: Add MP_ROM_* macros and mp_rom_* types and use them.</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-27T13:38:15+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/commit/?id=cbf7674025814797f5c537d6d1c195efe58ccaaf'/>
<id>urn:sha1:cbf7674025814797f5c537d6d1c195efe58ccaaf</id>
<content type='text'>
</content>
</entry>
<entry>
<title>py: Improve allocation policy of qstr data.</title>
<updated>2015-07-14T21:56:32+00:00</updated>
<author>
<name>Damien George</name>
<email>damien.p.george@gmail.com</email>
</author>
<published>2015-06-13T20:53:22+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/commit/?id=ade9a052365247be5ed4ce8b53c2164a576a4a05'/>
<id>urn:sha1:ade9a052365247be5ed4ce8b53c2164a576a4a05</id>
<content type='text'>
Previous to this patch all interned strings lived in their own malloc'd
chunk.  On average this wastes N/2 bytes per interned string, where N is
the number-of-bytes for a quanta of the memory allocator (16 bytes on 32
bit archs).

With this patch interned strings are concatenated into the same malloc'd
chunk when possible.  Such chunks are enlarged inplace when possible,
and shrunk to fit when a new chunk is needed.

RAM savings with this patch are highly varied, but should always show an
improvement (unless only 3 or 4 strings are interned).  New version
typically uses about 70% of previous memory for the qstr data, and can
lead to savings of around 10% of total memory footprint of a running
script.

Costs about 120 bytes code size on Thumb2 archs (depends on how many
calls to gc_realloc are made).
</content>
</entry>
</feed>
