Remove bitfields, which are just a bit-addressed integer
[babeltrace.git] / include / babeltrace / types.h
index 3c66563f075822da814e5359ae1687c77981f608..305d553d700d9a8a9588f22bac9c02580b603791 100644 (file)
@@ -93,27 +93,23 @@ struct type_class {
        void (*free)(struct type_class *type_class);
 };
 
-struct type_class_integer {
-       struct type_class p;
-       size_t len;             /* length, in bits. */
-       int byte_order;         /* byte order */
-       int signedness;
-};
-
 /*
  * Because we address in bits, bitfields end up being exactly the same as
  * integers, except that their read/write functions must be able to deal with
  * read/write non aligned on CHAR_BIT.
  */
-struct type_class_bitfield {
-       struct type_class_integer p;
+struct type_class_integer {
+       struct type_class p;
+       size_t len;             /* length, in bits. */
+       int byte_order;         /* byte order */
+       int signedness;
 };
 
 struct type_class_float {
        struct type_class p;
-       struct bitfield_class *sign;
-       struct bitfield_class *mantissa;
-       struct bitfield_class *exp;
+       struct int_class *sign;
+       struct int_class *mantissa;
+       struct int_class *exp;
        int byte_order;
        /* TODO: we might want to express more info about NaN, +inf and -inf */
 };
@@ -124,7 +120,7 @@ struct enum_table {
 };
 
 struct type_class_enum {
-       struct type_class_bitfield p;   /* inherit from bitfield */
+       struct type_class_int p;        /* inherit from integer */
        struct enum_table table;
 };
 
@@ -148,12 +144,6 @@ struct type_class_integer *integer_type_new(const char *name,
                                            size_t alignment);
 void integer_type_free(struct type_class_integer *int_class);
 
-struct type_class_bitfield *bitfield_type_new(const char *name,
-                                             size_t len, int byte_order,
-                                             int signedness,
-                                             size_t alignment);
-void bitfield_type_free(struct type_class_bitfield *bitfield_class);
-
 /*
  * mantissa_len is the length of the number of bytes represented by the mantissa
  * (e.g. result of DBL_MANT_DIG). It includes the leading 1.
This page took 0.024685 seconds and 4 git commands to generate.