aboutsummaryrefslogtreecommitdiff
path: root/py/objlist.c
AgeCommit message (Collapse)Author
2014-01-05Fix qstr in objlist.c; add more tests for list.index.Damien George
list.index fails on an edge case.
2014-01-05Merge remote-tracking branch 'upstream/master' into list_indexJohn R. Lenton
2014-01-04Convert Python types to proper Python type hierarchy.Damien George
Now much more inline with how CPython does types.
2014-01-04Merge pull request #70 from chipaca/list_countDamien George
Implements list.count. Fixes isue #55.
2014-01-04Split qstr into pools, and put initial pool in ROM.Damien George
Qstr's are now split into a linked-list of qstr pools. This has 2 benefits: the first pool can be in ROM (huge benefit, since we no longer use RAM for the core qstrs), and subsequent pools use m_new for the next pool instead of m_renew (thus avoiding a huge single table for all the qstrs). Still would be better to use a hash table, but this scheme takes us part of the way (eventually convert the pools to hash tables). Also fixed bug with import. Also improved the way the module code is referenced (not magic number 1 anymore).
2014-01-04Implements list.reverse; fixes issue #66John R. Lenton
2014-01-04Implements list.remove (in terms of list.index and list.pop).John R. Lenton
Fixes issue #63.
2014-01-04Implements list.insert. Fixes issue #61.John R. Lenton
2014-01-04Implements list.index. Fixes issue #57.John R. Lenton
2014-01-03Implemented list.countJohn R. Lenton
2014-01-03Implemented list.copy. Fixes issue #54.John R. Lenton
2014-01-03Added list.clear. Fixes issue #53.John R. Lenton
2014-01-03Worked on list.pop:John R. Lenton
* Fixes issue #51 * Adds a specific error message for when you try to pop an empty list. * Releases some memory if the list has shurnk a lot.
2014-01-03Changed to use memcpy.John R. Lenton
2014-01-03Add a bit of whitespace.John R. Lenton
2014-01-03untabifiedJohn R. Lenton
2014-01-03Add list addition (fixes: #39)John R. Lenton
2013-12-29Change memory allocation API to require size for free and realloc.Damien
2013-12-21Change object representation from 1 big union to individual structs.Damien
A big change. Micro Python objects are allocated as individual structs with the first element being a pointer to the type information (which is itself an object). This scheme follows CPython. Much more flexible, not necessarily slower, uses same heap memory, and can allocate objects statically. Also change name prefix, from py_ to mp_ (mp for Micro Python).