summaryrefslogtreecommitdiffstatshomepage
path: root/py/objnamedtuple.h
Commit message (Collapse)AuthorAge
* py/obj: Convert make_new into a mp_obj_type_t slot.Jim Mussared2022-09-19
| | | | | | | | | | | Instead of being an explicit field, it's now a slot like all the other methods. This is a marginal code size improvement because most types have a make_new (100/138 on PYBV11), however it improves consistency in how types are declared, removing the special case for make_new. Signed-off-by: Jim Mussared <jim.mussared@gmail.com>
* py/objnamedtuple: Optimise slot RAM usage for namedtuple.Jim Mussared2022-09-19
| | | | | | | Rather than reserving a full 12-slot mp_obj_type_t, reserve enough room for seven and cast as necessary. Signed-off-by: Jim Mussared <jim.mussared@gmail.com>
* py/obj: Add "full" and "empty" non-variable-length mp_obj_type_t.Jim Mussared2022-09-19
| | | | | | | This will always have the maximum/minimum size of a mp_obj_type_t representation and can be used as a member in other structs. Signed-off-by: Jim Mussared <jim.mussared@gmail.com>
* py/objnamedtuple: Allow to reuse namedtuple basic functionality.Paul Sokolovsky2017-11-20
By declaring interface in objnamedtuple.h and introducing a helper allocation function.