From c58c8a4d4a787b91f01d3fc4ad6c4855a3a2c18f Mon Sep 17 00:00:00 2001 From: Simon Marchi Date: Wed, 6 Nov 2024 00:11:57 -0500 Subject: [PATCH] bt2: include "py-common/py-common.h" where used `native_bt_log_and_append_error.hpp` specifically uses functions declared in `py-common/py-common.h`, so include it there, instead of in `native_bt.i`. Change-Id: Ib14b92f8a000e9d0203e907aff1c59a77fb6c461 Signed-off-by: Simon Marchi Reviewed-on: https://review.lttng.org/c/babeltrace/+/13507 Reviewed-by: Philippe Proulx --- src/bindings/python/bt2/bt2/native_bt.i | 1 - src/bindings/python/bt2/bt2/native_bt_log_and_append_error.hpp | 2 ++ 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/src/bindings/python/bt2/bt2/native_bt.i b/src/bindings/python/bt2/bt2/native_bt.i index e55b9db8..b44f684b 100644 --- a/src/bindings/python/bt2/bt2/native_bt.i +++ b/src/bindings/python/bt2/bt2/native_bt.i @@ -29,7 +29,6 @@ #include #include "common/assert.h" -#include "py-common/py-common.h" /* Used by some interface files */ #include "native_bt_bt2_objects.hpp" diff --git a/src/bindings/python/bt2/bt2/native_bt_log_and_append_error.hpp b/src/bindings/python/bt2/bt2/native_bt_log_and_append_error.hpp index 86f28db3..b57e789b 100644 --- a/src/bindings/python/bt2/bt2/native_bt_log_and_append_error.hpp +++ b/src/bindings/python/bt2/bt2/native_bt_log_and_append_error.hpp @@ -11,6 +11,8 @@ #include "logging/comp-logging.h" +#include "py-common/py-common.h" + static void restore_current_thread_error_and_append_exception_chain_recursive( int active_log_level, PyObject *py_exc_value, bt_self_component_class *self_component_class, bt_self_component *self_component, bt_self_message_iterator *self_message_iterator, -- 2.34.1