fprintf(fi, "%s", prefix);
char*id = mkid(c);
dict_t*d = &c->members;
- fprintf(fi, "dict_init(&%s.members, %d);\n", id, d->hashsize);
+ fprintf(fi, "dict_init2(&%s.members, &slotinfo_type, %d);\n", id, d->hashsize);
int t;
for(t=0;t<d->hashsize;t++) {
dictentry_t*l = d->slots[t];
while(l) {
slotinfo_t*s2 = (slotinfo_t*)l->data;
fprintf(fi, "%s", prefix);
- fprintf(fi, "dict_put(&%s.members, \"%s\", &%s);\n", id, s2->name, mkid2(id, s2->name));
+ char*id2 = mkid2(id, s2->name);
+ fprintf(fi, "dict_put(&%s.members, &%s, &%s);\n", id, id2,id2);
l = l->next;
}
}
fprintf(fi, "interfaces: {");
int t;
for(t=0;c->interfaces[t];t++) {
- fprintf(fi, "%c", mkptr(c->interfaces[t]));
- if(c->interfaces[t+1])
- fprintf(fi, ", ");
+ fprintf(fi, "%s", mkptr(c->interfaces[t]));
+ fprintf(fi, ", ");
}
fprintf(fi, "0}};\n");
}