Manage enumerations at the library level
[babeltrace.git] / types / float.c
index ac1525595bc99c82a95f9cd2bc62321c6480be54..78499c8f14ea6205d732bf3a68b426d0a25221c3 100644 (file)
@@ -19,6 +19,7 @@
  */
 
 #include <babeltrace/compiler.h>
+#include <babeltrace/types.h>
 
 size_t float_copy(unsigned char *dest, const struct format *fdest, 
                  const unsigned char *src, const struct format *fsrc,
@@ -46,9 +47,6 @@ struct type_class_float *float_type_new(const char *name,
        struct type_class_float *float_class;
        int ret;
 
-       /*
-        * Freed when type is unregistered.
-        */
        float_class = g_new(struct type_class_float, 1);
        float_class->p.name = g_quark_from_string(name);
        float_class->p.alignment = alignment;
@@ -67,6 +65,5 @@ struct type_class_float *float_type_new(const char *name,
 
 void float_type_free(struct type_class_float *float_class)
 {
-       if (!float_class->name)
-               g_free(float_class);
+       g_free(float_class);
 }
This page took 0.025106 seconds and 4 git commands to generate.