diff options
author | Damien George <damien@micropython.org> | 2022-02-17 11:17:21 +1100 |
---|---|---|
committer | Damien George <damien@micropython.org> | 2022-02-17 11:17:21 +1100 |
commit | 18acd0318f927930dd7f9efd77f08d8e05a43ce8 (patch) | |
tree | 1c4e1ebf33599e19c92d1780944ce0d0051359b6 /py | |
parent | 2ea21abae0358a46c0144f014f2e5891afe03dfd (diff) | |
download | micropython-18acd0318f927930dd7f9efd77f08d8e05a43ce8.tar.gz micropython-18acd0318f927930dd7f9efd77f08d8e05a43ce8.zip |
py/gc: Update debug code to compile with changes to qstr pool types.
Following on from 18b1ba086c0e5547ca81030bf13b026961f80720 and
f46a7140f55a8f6d80f9c2d5f8db7af3de116794.
Signed-off-by: Damien George <damien@micropython.org>
Diffstat (limited to 'py')
-rw-r--r-- | py/gc.c | 8 |
1 files changed, 4 insertions, 4 deletions
@@ -920,13 +920,13 @@ void gc_dump_alloc_table(void) { // This code prints "Q" for qstr-pool data, and "q" for qstr-str // data. It can be useful to see how qstrs are being allocated, // but is disabled by default because it is very slow. - for (qstr_pool_t *pool = MP_STATE_VM(last_pool); c == 'h' && pool != NULL; pool = pool->prev) { - if ((qstr_pool_t *)ptr == pool) { + for (const qstr_pool_t *pool = MP_STATE_VM(last_pool); c == 'h' && pool != NULL; pool = pool->prev) { + if ((const qstr_pool_t *)ptr == pool) { c = 'Q'; break; } - for (const byte **q = pool->qstrs, **q_top = pool->qstrs + pool->len; q < q_top; q++) { - if ((const byte *)ptr == *q) { + for (const char *const *q = pool->qstrs, *const *q_top = pool->qstrs + pool->len; q < q_top; q++) { + if ((const char *)ptr == *q) { c = 'q'; break; } |