Revision f54c19ca qom/object.c
b/qom/object.c | ||
---|---|---|
78 | 78 |
return type_table; |
79 | 79 |
} |
80 | 80 |
|
81 |
static bool enumerating_types; |
|
82 |
|
|
81 | 83 |
static void type_table_add(TypeImpl *ti) |
82 | 84 |
{ |
85 |
assert(!enumerating_types); |
|
83 | 86 |
g_hash_table_insert(type_table_get(), (void *)ti->name, ti); |
84 | 87 |
} |
85 | 88 |
|
... | ... | |
670 | 673 |
{ |
671 | 674 |
OCFData data = { fn, implements_type, include_abstract, opaque }; |
672 | 675 |
|
676 |
enumerating_types = true; |
|
673 | 677 |
g_hash_table_foreach(type_table_get(), object_class_foreach_tramp, &data); |
678 |
enumerating_types = false; |
|
674 | 679 |
} |
675 | 680 |
|
676 | 681 |
int object_child_foreach(Object *obj, int (*fn)(Object *child, void *opaque), |
Also available in: Unified diff