X-Git-Url: http://git.efficios.com/?p=babeltrace.git;a=blobdiff_plain;f=types%2Ffloat.c;h=abbd86d5fb4d2aff1c0d5eb6da61f43b79eae216;hp=b3e0dc1cfc3808c27ebf16ee8be6e731a91a39f0;hb=4c8bfb7e0a9cef6e74cefa38ed54bf8cbd424183;hpb=ac65e35509398c6f3f27b26e9309750a565e1cbd diff --git a/types/float.c b/types/float.c index b3e0dc1c..abbd86d5 100644 --- a/types/float.c +++ b/types/float.c @@ -17,22 +17,24 @@ */ #include -#include +#include -void float_copy(struct stream_pos *dest, const struct format *fdest, - struct stream_pos *src, const struct format *fsrc, +void float_copy(struct stream_pos *destp, + const struct format *fdest, + struct stream_pos *srcp, + const struct format *fsrc, const struct type_class *type_class) { struct type_class_float *float_class = container_of(type_class, struct type_class_float, p); if (fsrc->float_copy == fdest->float_copy) { - fsrc->float_copy(dest, src, float_class); + fsrc->float_copy(destp, srcp, float_class); } else { double v; - v = fsrc->double_read(src, float_class); - fdest->double_write(dest, float_class, v); + v = fsrc->double_read(srcp, float_class); + fdest->double_write(destp, float_class, v); } } @@ -68,6 +70,7 @@ struct type_class_float *float_type_new(const char *name, type_class->alignment = alignment; type_class->copy = float_copy; type_class->free = _float_type_free; + type_class->ref = 1; float_class->byte_order = byte_order; float_class->sign = integer_type_new(NULL, 1,