X-Git-Url: http://git.efficios.com/?a=blobdiff_plain;f=include%2Fbabeltrace%2Ftypes.h;h=12b35f602445698b99e544c7919dbe3b3e8fda9f;hb=906a150c3cc585a5b174c2d61b8bbe68885b8c78;hp=72fcb9e858c44c8710fa5add66373b2ee3dcd695;hpb=44fa6151e730c84e5a65a09fca6830b4ba8b24c2;p=deliverable%2Fbabeltrace.git diff --git a/include/babeltrace/types.h b/include/babeltrace/types.h index 72fcb9e85..12b35f602 100644 --- a/include/babeltrace/types.h +++ b/include/babeltrace/types.h @@ -25,6 +25,15 @@ #include +/* Internal use */ +#ifdef __cplusplus +# define __BT_UPCAST(_type, _p) static_cast<_type *>(static_cast(_p)) +# define __BT_UPCAST_CONST(_type, _p) static_cast(static_cast(_p)) +#else +# define __BT_UPCAST(_type, _p) ((_type *) (_p)) +# define __BT_UPCAST_CONST(_type, _p) ((const _type *) (_p)) +#endif + #ifdef __cplusplus extern "C" { #endif @@ -92,8 +101,9 @@ typedef struct bt_event_class bt_event_class; typedef struct bt_event_header_field bt_event_header_field; typedef struct bt_field bt_field; typedef struct bt_field_class bt_field_class; -typedef struct bt_field_class_signed_enumeration_mapping_ranges bt_field_class_signed_enumeration_mapping_ranges; -typedef struct bt_field_class_unsigned_enumeration_mapping_ranges bt_field_class_unsigned_enumeration_mapping_ranges; +typedef struct bt_field_class_enumeration_mapping bt_field_class_enumeration_mapping; +typedef struct bt_field_class_signed_enumeration_mapping bt_field_class_signed_enumeration_mapping; +typedef struct bt_field_class_unsigned_enumeration_mapping bt_field_class_unsigned_enumeration_mapping; typedef struct bt_field_class_structure_member bt_field_class_structure_member; typedef struct bt_field_class_variant_option bt_field_class_variant_option; typedef struct bt_field_path bt_field_path;