summaryrefslogtreecommitdiff
path: root/py/objnamedtuple.h
AgeCommit message (Collapse)Author
2022-09-19py/obj: Convert make_new into a mp_obj_type_t slot.Jim Mussared
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>
2022-09-19py/objnamedtuple: Optimise slot RAM usage for namedtuple.Jim Mussared
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>
2022-09-19py/obj: Add "full" and "empty" non-variable-length mp_obj_type_t.Jim Mussared
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>
2017-11-20py/objnamedtuple: Allow to reuse namedtuple basic functionality.Paul Sokolovsky
By declaring interface in objnamedtuple.h and introducing a helper allocation function.