@@ -1185,33 +1185,23 @@ STATIC const mp_rom_map_elem_t bitstruct_CompiledFormatDict_locals_dict_table[]
1185
1185
};
1186
1186
STATIC MP_DEFINE_CONST_DICT (bitstruct_CompiledFormatDict_locals_dict ,bitstruct_CompiledFormatDict_locals_dict_table );
1187
1187
1188
+ MP_DEFINE_CONST_OBJ_TYPE (
1189
+ bitstruct_CompiledFormat_type ,
1190
+ MP_QSTR_CompiledFormat ,
1191
+ MP_TYPE_FLAG_NONE ,
1192
+ print , bitstruct_CompiledFormat_print ,
1193
+ make_new , bitstruct_CompiledFormat_make_new ,
1194
+ locals_dict , & bitstruct_CompiledFormat_locals_dict
1195
+ );
1188
1196
1189
- const mp_obj_type_t bitstruct_CompiledFormat_type = {
1190
- // "inherit" the type "type"
1191
- { & mp_type_type },
1192
- // give it a name
1193
- .name = MP_QSTR_CompiledFormat ,
1194
- // give it a print-function
1195
- .print = bitstruct_CompiledFormat_print ,
1196
- // give it a constructor
1197
- .make_new = bitstruct_CompiledFormat_make_new ,
1198
- // and the global members
1199
- .locals_dict = (mp_obj_dict_t * )& bitstruct_CompiledFormat_locals_dict ,
1200
- };
1201
-
1202
-
1203
- const mp_obj_type_t bitstruct_CompiledFormatDict_type = {
1204
- // "inherit" the type "type"
1205
- { & mp_type_type },
1206
- // give it a name
1207
- .name = MP_QSTR_CompiledFormatDict ,
1208
- // give it a print-function
1209
- .print = bitstruct_CompiledFormatDict_print ,
1210
- // give it a constructor
1211
- .make_new = bitstruct_CompiledFormatDict_make_new ,
1212
- // and the global members
1213
- .locals_dict = (mp_obj_dict_t * )& bitstruct_CompiledFormatDict_locals_dict ,
1214
- };
1197
+ MP_DEFINE_CONST_OBJ_TYPE (
1198
+ bitstruct_CompiledFormatDict_type ,
1199
+ MP_QSTR_CompiledFormatDict ,
1200
+ MP_TYPE_FLAG_NONE ,
1201
+ print , bitstruct_CompiledFormatDict_print ,
1202
+ make_new , bitstruct_CompiledFormatDict_make_new ,
1203
+ locals_dict , & bitstruct_CompiledFormatDict_locals_dict
1204
+ );
1215
1205
1216
1206
/**
1217
1207
* Python: bitstruct.CompiledFormat(fmt)
0 commit comments