py: Make collections module configurable, enabled by default.

This commit is contained in:
Damien George
2014-04-26 10:31:15 +01:00
parent 1463c1fa82
commit 107c9fb235
4 changed files with 15 additions and 0 deletions

View File

@@ -7,6 +7,8 @@
#include "obj.h"
#include "objtuple.h"
#if MICROPY_ENABLE_MOD_COLLECTIONS
typedef struct _mp_obj_namedtuple_type_t {
mp_obj_type_t base;
const char *fields;
@@ -143,3 +145,5 @@ STATIC mp_obj_t new_namedtuple_type(mp_obj_t name_in, mp_obj_t fields_in) {
return mp_obj_new_namedtuple_type(name, fields);
}
MP_DEFINE_CONST_FUN_OBJ_2(mp_namedtuple_obj, new_namedtuple_type);
#endif // MICROPY_ENABLE_MOD_COLLECTIONS