X-Git-Url: http://git.efficios.com/?p=babeltrace.git;a=blobdiff_plain;f=types%2Fstring.c;h=d38d3cf33b45a24920a1114e1555d0521f73bc00;hp=4d57914112fe3a7aceeed0abda1621168e8d22f5;hb=be85c1c7633af07e35db7b415d6ee8447c30e80a;hpb=ccd7e1c86f36342b0b06651cc52df86bb663c271 diff --git a/types/string.c b/types/string.c index 4d579141..d38d3cf3 100644 --- a/types/string.c +++ b/types/string.c @@ -18,7 +18,7 @@ #include #include -#include +#include void string_copy(struct stream_pos *dest, const struct format *fdest, struct stream_pos *src, const struct format *fsrc, @@ -60,8 +60,9 @@ struct type_class_string *string_type_new(const char *name) string_class->p.alignment = CHAR_BIT; string_class->p.copy = string_copy; string_class->p.free = _string_type_free; + string_class->p.ref = 1; if (string_class->p.name) { - ret = ctf_register_type(&string_class->p); + ret = register_type(&string_class->p); if (ret) { g_free(string_class); return NULL;