X-Git-Url: http://git.efficios.com/?a=blobdiff_plain;f=include%2Fbabeltrace%2Fgraph%2Fself-component-class-filter.h;h=1ff7b391cda247bfc032629b55ff7b74a8a637e6;hb=005f1204d7620018bb2c1406b6194940f0ee119f;hp=d1a447cddddab86b8622e69b8e1cc05a9dd9baef;hpb=d94d92ac6656fd252a5d7bb4f6c76935ba18e62e;p=babeltrace.git diff --git a/include/babeltrace/graph/self-component-class-filter.h b/include/babeltrace/graph/self-component-class-filter.h index d1a447cd..1ff7b391 100644 --- a/include/babeltrace/graph/self-component-class-filter.h +++ b/include/babeltrace/graph/self-component-class-filter.h @@ -2,6 +2,7 @@ #define BABELTRACE_GRAPH_SELF_COMPONENT_CLASS_FILTER_H /* + * Copyright 2017-2018 Philippe Proulx * Copyright 2016 Jérémie Galarneau * * Permission is hereby granted, free of charge, to any person obtaining a copy @@ -23,19 +24,23 @@ * SOFTWARE. */ +/* + * For bt_component_class_filter, bt_self_component_class_filter, + * __BT_UPCAST_CONST + */ +#include + #ifdef __cplusplus extern "C" { #endif -struct bt_component_class_filter; -struct bt_self_component_class_filter; - static inline -struct bt_component_class_filter * -bt_self_component_class_filter_borrow_component_class_filter( - struct bt_self_component_class_filter *self_comp_cls_filter) +const bt_component_class_filter * +bt_self_component_class_filter_as_component_class_filter( + bt_self_component_class_filter *self_comp_cls_filter) { - return (void *) self_comp_cls_filter; + return __BT_UPCAST_CONST(bt_component_class_filter, + self_comp_cls_filter); } #ifdef __cplusplus