X-Git-Url: http://git.efficios.com/?a=blobdiff_plain;f=formats%2Fctf%2Ftypes%2Ffloat.c;h=fc7c39c1b412f794151ae34cc6678489dc543d07;hb=fe2b0e243a39ba31130512a1678ad46720bab9f3;hp=0cf9caeb6c7795212c53dc7d540c1a9fdd53b36e;hpb=c462e188f3e7819c7bc74f671038cdbf36e8c3c0;p=babeltrace.git diff --git a/formats/ctf/types/float.c b/formats/ctf/types/float.c index 0cf9caeb..fc7c39c1 100644 --- a/formats/ctf/types/float.c +++ b/formats/ctf/types/float.c @@ -96,7 +96,7 @@ static void float_unlock(void) assert(!ret); } -int _ctf_float_copy(struct stream_pos *destp, +static int _ctf_float_copy(struct stream_pos *destp, struct definition_float *dest_definition, struct stream_pos *srcp, const struct definition_float *src_definition) @@ -216,7 +216,7 @@ int ctf_float_read(struct stream_pos *ppos, struct definition *definition) } end_unref: - definition_unref(tmpdef); + bt_definition_unref(tmpdef); end: float_unlock(); return ret; @@ -272,12 +272,13 @@ int ctf_float_write(struct stream_pos *ppos, struct definition *definition) ret = _ctf_float_copy(ppos, float_definition, &srcp.parent, tmpfloat); end_unref: - definition_unref(tmpdef); + bt_definition_unref(tmpdef); end: float_unlock(); return ret; } +static void __attribute__((constructor)) ctf_float_init(void) { static_float_declaration = @@ -292,8 +293,9 @@ void __attribute__((constructor)) ctf_float_init(void) __alignof__(double)); } +static void __attribute__((destructor)) ctf_float_fini(void) { - declaration_unref(&static_float_declaration->p); - declaration_unref(&static_double_declaration->p); + bt_declaration_unref(&static_float_declaration->p); + bt_declaration_unref(&static_double_declaration->p); }