1 #include <stdio.h> 2 #include <stdlib.h> 3 #include <string.h> 4 5 #include "py/builtin.h" 6 #include "py/mperrno.h" 7 #include "py/obj.h" 8 #include "py/runtime.h" 9 #include "ulog/ulog.h" 10 11 extern const mp_obj_type_t aiagent_type; 12 13 // this is the actual C-structure for our new object 14 STATIC const mp_rom_map_elem_t aiagent_locals_dict_table[] = { 15 { MP_OBJ_NEW_QSTR(MP_QSTR___name__), MP_ROM_QSTR(MP_QSTR_aiagent) }, 16 { MP_OBJ_NEW_QSTR(MP_QSTR_AIAgent), MP_ROM_PTR(&aiagent_type) }, 17 }; 18 19 STATIC MP_DEFINE_CONST_DICT(aiagent_locals_dict, aiagent_locals_dict_table); 20 21 const mp_obj_module_t aiagent_module = { 22 .base = { &mp_type_module }, 23 .globals = (mp_obj_dict_t *)&aiagent_locals_dict, 24 }; 25