From: Simon Marchi Date: Tue, 27 Jun 2023 17:02:04 +0000 (-0400) Subject: Move lttng_session unique_ptr to lttng/session-internal.hpp X-Git-Url: https://git.lttng.org./?a=commitdiff_plain;h=d0eca33e3e66b6d76fa4b64cfe49295bdb5b9c17;p=lttng-tools.git Move lttng_session unique_ptr to lttng/session-internal.hpp Make it possible to use this unique_ptr elsewhere. Change-Id: I30141efac45d842f4bc3414ca03fffb2e4ba5cce Signed-off-by: Simon Marchi Signed-off-by: Jérémie Galarneau --- diff --git a/include/lttng/session-internal.hpp b/include/lttng/session-internal.hpp index e7530d3ae..aead01b78 100644 --- a/include/lttng/session-internal.hpp +++ b/include/lttng/session-internal.hpp @@ -9,9 +9,12 @@ #define LTTNG_SESSION_INTERNAL_H #include +#include #include +struct lttng_session; + struct lttng_session_extended { struct { uint64_t value; @@ -19,4 +22,8 @@ struct lttng_session_extended { } LTTNG_PACKED creation_time; } LTTNG_PACKED; +using lttng_session_uptr = + std::unique_ptr::deleter>; + #endif /* LTTNG_SESSION_INTERNAL_H */ diff --git a/src/bin/lttng/utils.hpp b/src/bin/lttng/utils.hpp index 75b91df19..0f42ef74e 100644 --- a/src/bin/lttng/utils.hpp +++ b/src/bin/lttng/utils.hpp @@ -14,6 +14,7 @@ #include #include +#include #include #include @@ -66,9 +67,7 @@ public: { } - std::unique_ptr::deleter> - _array = nullptr; + lttng_session_uptr _array = nullptr; std::size_t _count = 0; };