X-Git-Url: https://git.lttng.org/?p=lttng-tools.git;a=blobdiff_plain;f=src%2Fcommon%2Fpayload-view.h;fp=src%2Fcommon%2Fpayload-view.h;h=deaa9655ce2d23de89f46568e9017512c0af6cda;hp=af8519ab32641aaab739fa66985179ee025b47ba;hb=b66cbf1731486ab4dc7e0b2e1c3fa05cc5360c19;hpb=729c1fec5976af17fded2f026725a08ef1924290 diff --git a/src/common/payload-view.h b/src/common/payload-view.h index af8519ab3..deaa9655c 100644 --- a/src/common/payload-view.h +++ b/src/common/payload-view.h @@ -11,10 +11,6 @@ #include #include -#ifdef __cplusplus -extern "C" { -#endif - struct lttng_payload; struct fd_handle; @@ -51,24 +47,7 @@ struct lttng_payload_view { struct lttng_buffer_view buffer; /* private */ - /* - * Avoid a -Wreturn-type-c-linkage warning with clang. - * gcc is more permissive with regards to this warning, but - * clang is right that a structure containing a _const_ structure is not - * a trivial type in the eyes of the C++ standard, theoritically affecting its - * compatibility with C from an ABI standpoint: - * A trivial class is a class that is trivially copyable and has one or - * more default constructors, all of which are either trivial or deleted and - * at least one of which is not deleted. - * - * A const member implicitly deletes lttng_payload_view's constructor, - * making it non-trivial. This is not a problem for the moment as we are - * transitioning all code to C++11. - */ -#if !defined(__cplusplus) - const -#endif - struct lttng_dynamic_pointer_array _fd_handles; + const struct lttng_dynamic_pointer_array _fd_handles; struct { size_t *p_fd_handles_position; @@ -182,8 +161,4 @@ int lttng_payload_view_get_fd_handle_count( struct fd_handle *lttng_payload_view_pop_fd_handle( struct lttng_payload_view *payload_view); -#ifdef __cplusplus -} -#endif - #endif /* LTTNG_PAYLOAD_VIEW_H */