X-Git-Url: http://git.efficios.com/?p=babeltrace.git;a=blobdiff_plain;f=include%2Fbabeltrace%2Ftypes.h;h=305d553d700d9a8a9588f22bac9c02580b603791;hp=3c66563f075822da814e5359ae1687c77981f608;hb=7fe001942cc8ece60d945cbfbd1d135ff548dc7d;hpb=11d43b909baeee566511acfec577d4605386fa09 diff --git a/include/babeltrace/types.h b/include/babeltrace/types.h index 3c66563f..305d553d 100644 --- a/include/babeltrace/types.h +++ b/include/babeltrace/types.h @@ -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.