blob: ad951d5e9e51bd1871e319812279bae5d5f06725 [file] [log] [blame]
Damien Georgecaac5422014-03-25 14:18:18 +00001#include "misc.h"
2#include "mpconfig.h"
3#include "qstr.h"
4#include "obj.h"
5#include "map.h"
6#include "builtin.h"
7
8STATIC const mp_map_elem_t mp_module_collections_globals_table[] = {
9 { MP_OBJ_NEW_QSTR(MP_QSTR___name__), MP_OBJ_NEW_QSTR(MP_QSTR_collections) },
10 { MP_OBJ_NEW_QSTR(MP_QSTR_namedtuple), (mp_obj_t)&mp_namedtuple_obj },
11};
12
13STATIC const mp_map_t mp_module_collections_globals = {
14 .all_keys_are_qstrs = 1,
15 .table_is_fixed_array = 1,
16 .used = sizeof(mp_module_collections_globals_table) / sizeof(mp_map_elem_t),
17 .alloc = sizeof(mp_module_collections_globals_table) / sizeof(mp_map_elem_t),
18 .table = (mp_map_elem_t*)mp_module_collections_globals_table,
19};
20
21const mp_obj_module_t mp_module_collections = {
22 .base = { &mp_type_module },
23 .name = MP_QSTR_collections,
24 .globals = (mp_map_t*)&mp_module_collections_globals,
25};