- struct type_class_float *float_class =
- container_of(type_class, struct type_class_float, p);
- float_type_free(float_class);
+ struct type_float *float_type;
+ struct type *type;
+
+ float_type = g_new(struct type_float, 1);
+ type = &float_type->p;
+ type->name = g_quark_from_string(name);
+ type->alignment = alignment;
+ type->copy = float_copy;
+ type->type_free = _float_type_free;
+ type->declaration_new = _float_declaration_new;
+ type->declaration_free = _float_declaration_free;
+ type->ref = 1;
+ float_type->byte_order = byte_order;
+
+ float_type->sign = integer_type_new(NULL, 1,
+ byte_order, false, 1);
+ float_type->mantissa = integer_type_new(NULL, mantissa_len - 1,
+ byte_order, false, 1);
+ float_type->exp = integer_type_new(NULL, exp_len,
+ byte_order, true, 1);
+ return float_type;