<feed xmlns='http://www.w3.org/2005/Atom'>
<title>suspect-devices/circuitpython/py/objtuple.c, branch 2.x</title>
<subtitle>CircuitPython - a Python implementation for teaching coding with microcontrollers</subtitle>
<id>https://git.suspectdevices.com/suspect-devices/circuitpython/atom?h=2.x</id>
<link rel='self' href='https://git.suspectdevices.com/suspect-devices/circuitpython/atom?h=2.x'/>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/'/>
<updated>2017-08-13T12:52:33+00:00</updated>
<entry>
<title>all: Raise exceptions via mp_raise_XXX</title>
<updated>2017-08-13T12:52:33+00:00</updated>
<author>
<name>Javier Candeira</name>
<email>javier@candeira.com</email>
</author>
<published>2017-08-09T04:40:45+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/commit/?id=35a1fea90b2cae9d5cc8e9eab62ba4c67e8786db'/>
<id>urn:sha1:35a1fea90b2cae9d5cc8e9eab62ba4c67e8786db</id>
<content type='text'>
  - Changed: ValueError, TypeError, NotImplementedError
  - OSError invocations unchanged, because the corresponding utility
    function takes ints, not strings like the long form invocation.
  - OverflowError, IndexError and RuntimeError etc. not changed for now
    until we decide whether to add new utility functions.
</content>
</entry>
<entry>
<title>py/objtuple: Allow to use inplace-multiplication operator on tuples.</title>
<updated>2017-08-09T11:20:42+00:00</updated>
<author>
<name>Damien George</name>
<email>damien.p.george@gmail.com</email>
</author>
<published>2017-08-09T11:20:42+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/commit/?id=eb2784e8a2dc17b0f551b68d2b41eece3e5348a7'/>
<id>urn:sha1:eb2784e8a2dc17b0f551b68d2b41eece3e5348a7</id>
<content type='text'>
</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/objtuple: Add support for inplace add (same as normal add).</title>
<updated>2017-04-05T02:38:02+00:00</updated>
<author>
<name>Damien George</name>
<email>damien.p.george@gmail.com</email>
</author>
<published>2017-04-05T02:38:02+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/commit/?id=81d2ca2b12ddb8815a08941b8e00ee15174a0c40'/>
<id>urn:sha1:81d2ca2b12ddb8815a08941b8e00ee15174a0c40</id>
<content type='text'>
</content>
</entry>
<entry>
<title>py: Convert mp_uint_t to size_t for tuple/list accessors.</title>
<updated>2017-03-29T01:56:17+00:00</updated>
<author>
<name>Damien George</name>
<email>damien.p.george@gmail.com</email>
</author>
<published>2017-03-25T08:35:08+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/commit/?id=6213ad7f466df12c734dc527993bbb46c9d9eb5c'/>
<id>urn:sha1:6213ad7f466df12c734dc527993bbb46c9d9eb5c</id>
<content type='text'>
This patch changes mp_uint_t to size_t for the len argument of the
following public facing C functions:

mp_obj_tuple_get
mp_obj_list_get
mp_obj_get_array

These functions take a pointer to the len argument (to be filled in by the
function) and callers of these functions should update their code so the
type of len is changed to size_t.  For ports that don't use nan-boxing
there should be no change in generate code because the size of the type
remains the same (word sized), and in a lot of cases there won't even be a
compiler warning if the type remains as mp_uint_t.

The reason for this change is to standardise on the use of size_t for
variables that count memory (or memory related) sizes/lengths.  It helps
builds that use nan-boxing.
</content>
</entry>
<entry>
<title>py: Use size_t as len argument and return type of mp_get_index.</title>
<updated>2017-03-23T05:17:40+00:00</updated>
<author>
<name>Damien George</name>
<email>damien.p.george@gmail.com</email>
</author>
<published>2017-03-23T05:17:40+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/commit/?id=c88cfe165b0ab39c5d9392fb02dd12f22be1a28d'/>
<id>urn:sha1:c88cfe165b0ab39c5d9392fb02dd12f22be1a28d</id>
<content type='text'>
These values are used to compute memory addresses and so size_t is the
more appropriate type to use.
</content>
</entry>
<entry>
<title>py: De-optimise some uses of mp_getiter, so they don't use the C stack.</title>
<updated>2017-02-16T08:11:34+00:00</updated>
<author>
<name>Damien George</name>
<email>damien.p.george@gmail.com</email>
</author>
<published>2017-02-13T04:44:31+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/commit/?id=e6003f466e6f5b7eddd01740666230b62ab5a872'/>
<id>urn:sha1:e6003f466e6f5b7eddd01740666230b62ab5a872</id>
<content type='text'>
In these cases the heap is anyway used to create a new object so no real
need to use the C stack for iterating.  It saves a few bytes of code size.
</content>
</entry>
<entry>
<title>py: Add iter_buf to getiter type method.</title>
<updated>2017-02-16T07:38:06+00:00</updated>
<author>
<name>Damien George</name>
<email>damien.p.george@gmail.com</email>
</author>
<published>2016-01-09T23:14:54+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/commit/?id=ae8d86758631e62466a55d179897d2111c3cb1c1'/>
<id>urn:sha1:ae8d86758631e62466a55d179897d2111c3cb1c1</id>
<content type='text'>
Allows to iterate over the following without allocating on the heap:
- tuple
- list
- string, bytes
- bytearray, array
- dict (not dict.keys, dict.values, dict.items)
- set, frozenset

Allows to call the following without heap memory:
- all, any, min, max, sum

TODO: still need to allocate stack memory in bytecode for iter_buf.
</content>
</entry>
<entry>
<title>py/objtuple: Convert mp_uint_t to size_t where appropriate.</title>
<updated>2017-02-16T05:51:16+00:00</updated>
<author>
<name>Damien George</name>
<email>damien.p.george@gmail.com</email>
</author>
<published>2017-02-16T05:09:51+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/commit/?id=229823942c79b1233c43dc155bae01c20a8cec57'/>
<id>urn:sha1:229823942c79b1233c43dc155bae01c20a8cec57</id>
<content type='text'>
</content>
</entry>
<entry>
<title>py/objtuple: In tuple_cmp_helper, use mp_check_self instead of raising.</title>
<updated>2016-08-14T06:28:05+00:00</updated>
<author>
<name>Damien George</name>
<email>damien.p.george@gmail.com</email>
</author>
<published>2016-08-14T06:28:05+00:00</published>
<link rel='alternate' type='text/html' href='https://git.suspectdevices.com/suspect-devices/circuitpython/commit/?id=4aaa5adf9f13dc875cd0eaadc2951a3b24c8cf15'/>
<id>urn:sha1:4aaa5adf9f13dc875cd0eaadc2951a3b24c8cf15</id>
<content type='text'>
Only tuple, namedtuple and attrtuple use the tuple_cmp_helper function,
and they all have getiter=mp_obj_tuple_getiter, so the check here is only
to ensure that the self object is consistent.  Hence use mp_check_self.
</content>
</entry>
</feed>
