diff options
author | Damien George <damien.p.george@gmail.com> | 2019-09-23 23:37:01 +1000 |
---|---|---|
committer | Damien George <damien.p.george@gmail.com> | 2019-10-01 12:26:22 +1000 |
commit | 4c5e1a036831a3ac36866e4daab3a50c772b4443 (patch) | |
tree | 795134f3011461f5574d64d545a3061eff655ea8 /py/bc.c | |
parent | 1d7afcce49366c11f67561019a5adf5e60c450f5 (diff) |
py/bc: Change mp_code_state_t.exc_sp to exc_sp_idx.
Change from a pointer to an index, to make space in mp_code_state_t.
Diffstat (limited to 'py/bc.c')
-rw-r--r-- | py/bc.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -133,7 +133,7 @@ void mp_setup_code_state(mp_code_state_t *code_state, size_t n_args, size_t n_kw size_t n_def_pos_args = *code_state->ip++; code_state->sp = &code_state->state[0] - 1; - code_state->exc_sp = (mp_exc_stack_t*)(code_state->state + n_state) - 1; + code_state->exc_sp_idx = 0; // zero out the local stack to begin with memset(code_state->state, 0, n_state * sizeof(*code_state->state)); |