fix custodian-managed-list for weakly held objects

This commit is contained in:
Matthew Flatt 2015-04-18 07:03:35 +01:00
parent 5e02c55dd9
commit 11939df0f2

View File

@ -1627,6 +1627,7 @@ static Scheme_Object *custodian_to_list(int argc, Scheme_Object *argv[])
if (m->boxes[i]) { if (m->boxes[i]) {
o = xCUSTODIAN_FAM(m->boxes[i]); o = xCUSTODIAN_FAM(m->boxes[i]);
if (o) {
type = SCHEME_TYPE(o); type = SCHEME_TYPE(o);
ex = extractors[type]; ex = extractors[type];
if (ex) { if (ex) {
@ -1639,6 +1640,7 @@ static Scheme_Object *custodian_to_list(int argc, Scheme_Object *argv[])
} }
} }
} }
}
/* Add kids: */ /* Add kids: */
for (c = CUSTODIAN_FAM(m->children); c; c = CUSTODIAN_FAM(c->sibling)) { for (c = CUSTODIAN_FAM(m->children); c; c = CUSTODIAN_FAM(c->sibling)) {
hold[j] = (Scheme_Object *)c; hold[j] = (Scheme_Object *)c;