- string_type = g_new(struct type_string, 1);
- string_type->p.id = CTF_TYPE_STRING;
- string_type->p.name = g_quark_from_string(name);
- string_type->p.alignment = CHAR_BIT;
- string_type->p.copy = string_copy;
- string_type->p.type_free = _string_type_free;
- string_type->p.declaration_new = _string_declaration_new;
- string_type->p.declaration_free = _string_declaration_free;
- string_type->p.ref = 1;
- return string_type;
+ string_declaration = g_new(struct declaration_string, 1);
+ string_declaration->p.id = CTF_TYPE_STRING;
+ string_declaration->p.alignment = CHAR_BIT;
+ string_declaration->p.copy = string_copy;
+ string_declaration->p.declaration_free = _string_declaration_free;
+ string_declaration->p.definition_new = _string_definition_new;
+ string_declaration->p.definition_free = _string_definition_free;
+ string_declaration->p.ref = 1;
+ string_declaration->encoding = encoding;
+ return string_declaration;