py: Change module globals from mp_map_t* to mp_obj_dict_t*.

Towards addressing issue #424.

Had a small increase to ROM usage (order 60 bytes).
This commit is contained in:
Damien George
2014-04-05 21:53:54 +01:00
parent 60be1cf3b9
commit 8b0535e23f
19 changed files with 129 additions and 98 deletions

View File

@@ -1,4 +1,5 @@
#include <stdlib.h>
#include <assert.h>
#include "misc.h"
#include "mpconfig.h"
@@ -285,7 +286,7 @@ mp_obj_t mp_set_lookup(mp_set_t *set, mp_obj_t index, mp_map_lookup_kind_t looku
mp_obj_t mp_set_remove_first(mp_set_t *set) {
for (uint pos = 0; pos < set->alloc; pos++) {
if (set->table[pos] != MP_OBJ_NULL && set->table[pos] != MP_OBJ_SENTINEL) {
if (MP_SET_SLOT_IS_FILLED(set, pos)) {
mp_obj_t elem = set->table[pos];
// delete element
set->used--;