summaryrefslogtreecommitdiffstatshomepage
path: root/py
diff options
context:
space:
mode:
authorDamien George <damien@micropython.org>2022-02-17 11:17:21 +1100
committerDamien George <damien@micropython.org>2022-02-17 11:17:21 +1100
commit18acd0318f927930dd7f9efd77f08d8e05a43ce8 (patch)
tree1c4e1ebf33599e19c92d1780944ce0d0051359b6 /py
parent2ea21abae0358a46c0144f014f2e5891afe03dfd (diff)
downloadmicropython-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.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/py/gc.c b/py/gc.c
index a01d81abdc..0c1f3961df 100644
--- a/py/gc.c
+++ b/py/gc.c
@@ -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;
}