From 8eec8bcad95d5e60485635a2dbfd97886698d954 Mon Sep 17 00:00:00 2001 From: Paul Sokolovsky Date: Sun, 12 Jan 2014 23:23:10 +0200 Subject: Add objtuple.h to allow embedding of tuples inside other objects. This is useful because tuple is closest analog of C static array. --- py/objtuple.h | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 py/objtuple.h (limited to 'py/objtuple.h') diff --git a/py/objtuple.h b/py/objtuple.h new file mode 100644 index 000000000..9c672fe3f --- /dev/null +++ b/py/objtuple.h @@ -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); -- cgit v1.2.3