mirror of
https://github.com/micropython/micropython.git
synced 2026-01-07 20:50:14 +01:00
py: Make collections module configurable, enabled by default.
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user