summaryrefslogtreecommitdiffstats
path: root/struct.c
diff options
context:
space:
mode:
Diffstat (limited to 'struct.c')
-rw-r--r--struct.c12
1 files changed, 8 insertions, 4 deletions
diff --git a/struct.c b/struct.c
index 956506d2..a8d1f373 100644
--- a/struct.c
+++ b/struct.c
@@ -1649,10 +1649,12 @@ static val struct_inst_equalsub(val obj)
val method_name(val fun)
{
- val sth_iter = hash_begin(struct_type_hash);
+ struct hash_iter sthi;
val sth_cell;
- while ((sth_cell = hash_next(sth_iter))) {
+ us_hash_iter_init(&sthi, struct_type_hash);
+
+ while ((sth_cell = hash_iter_next(&sthi))) {
val sym = us_car(sth_cell);
val stype = us_cdr(sth_cell);
val sl_iter;
@@ -1695,10 +1697,12 @@ val method_name(val fun)
val get_slot_syms(val package, val is_current, val method_only)
{
val result_hash = make_hash(nil, nil, nil);
- val sth_iter = hash_begin(struct_type_hash);
+ struct hash_iter sthi;
val sth_cell;
- while ((sth_cell = hash_next(sth_iter))) {
+ us_hash_iter_init(&sthi, struct_type_hash);
+
+ while ((sth_cell = hash_iter_next(&sthi))) {
val stype = us_cdr(sth_cell);
val sl_iter;
struct struct_type *st = coerce(struct struct_type *, stype->co.handle);