{
struct definition_struct *struct_definition =
container_of(definition, struct definition_struct, p);
{
struct definition_struct *struct_definition =
container_of(definition, struct definition_struct, p);
struct declaration_field *declaration_field =
&g_array_index(struct_declaration->fields,
struct declaration_field, i);
struct declaration_field *declaration_field =
&g_array_index(struct_declaration->fields,
struct declaration_field, i);
}
g_array_free(struct_declaration->fields, true);
g_free(struct_declaration);
}
struct declaration_struct *
}
g_array_free(struct_declaration->fields, true);
g_free(struct_declaration);
}
struct declaration_struct *
assert(_struct->fields->len == _struct->declaration->fields->len);
for (i = 0; i < _struct->fields->len; i++) {
struct definition *field = g_ptr_array_index(_struct->fields, i);
assert(_struct->fields->len == _struct->declaration->fields->len);
for (i = 0; i < _struct->fields->len; i++) {
struct definition *field = g_ptr_array_index(_struct->fields, i);
index = struct_declaration->fields->len - 1; /* last field (new) */
field = &g_array_index(struct_declaration->fields, struct declaration_field, index);
field->name = g_quark_from_string(field_name);
index = struct_declaration->fields->len - 1; /* last field (new) */
field = &g_array_index(struct_declaration->fields, struct declaration_field, index);
field->name = g_quark_from_string(field_name);
field->declaration = field_declaration;
/* Keep index in hash rather than pointer, because array can relocate */
g_hash_table_insert(struct_declaration->fields_by_name,
field->declaration = field_declaration;
/* Keep index in hash rather than pointer, because array can relocate */
g_hash_table_insert(struct_declaration->fields_by_name,
* field returned only valid as long as the field structure is not appended to.
*/
struct declaration_field *
* field returned only valid as long as the field structure is not appended to.
*/
struct declaration_field *