Add objtuple.h to allow embedding of tuples inside other objects.

This is useful because tuple is closest analog of C static array.
This commit is contained in:
Paul Sokolovsky
2014-01-12 23:23:10 +02:00
parent ca318bba0d
commit 8eec8bcad9
2 changed files with 9 additions and 7 deletions

7
py/objtuple.h Normal file
View File

@@ -0,0 +1,7 @@
typedef struct _mp_obj_tuple_t {
mp_obj_base_t base;
machine_uint_t len;
mp_obj_t items[];
} mp_obj_tuple_t;
void tuple_print(void (*print)(void *env, const char *fmt, ...), void *env, mp_obj_t o_in);