From d0eca33e3e66b6d76fa4b64cfe49295bdb5b9c17 Mon Sep 17 00:00:00 2001 From: Simon Marchi Date: Tue, 27 Jun 2023 13:02:04 -0400 Subject: [PATCH] Move lttng_session unique_ptr to lttng/session-internal.hpp MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Make it possible to use this unique_ptr elsewhere. Change-Id: I30141efac45d842f4bc3414ca03fffb2e4ba5cce Signed-off-by: Simon Marchi Signed-off-by: Jérémie Galarneau --- include/lttng/session-internal.hpp | 7 +++++++ src/bin/lttng/utils.hpp | 5 ++--- 2 files changed, 9 insertions(+), 3 deletions(-) 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; }; -- 2.34.1