py: Make old_globals part of mp_code_state structure.

Conceptually it is part of code state, so let it be allocated in the same way
as the rest of state.
This commit is contained in:
Paul Sokolovsky
2015-02-15 17:12:58 +08:00
parent e5039c6ff8
commit 53e5e0fa28
2 changed files with 4 additions and 3 deletions

View File

@@ -45,6 +45,7 @@ typedef struct _mp_code_state {
mp_obj_t *sp;
// bit 0 is saved currently_in_except_block value
mp_exc_stack_t *exc_sp;
mp_obj_dict_t *old_globals;
mp_uint_t n_state;
// Variable-length
mp_obj_t state[0];