diff --git a/tests/ffi/tests.cc b/tests/ffi/tests.cc index dffc40540..893bc1051 100644 --- a/tests/ffi/tests.cc +++ b/tests/ffi/tests.cc @@ -14,6 +14,8 @@ extern "C" void cxx_test_suite_set_correct() noexcept; extern "C" tests::R *cxx_test_suite_get_box() noexcept; extern "C" bool cxx_test_suite_r_is_correct(const tests::R *) noexcept; +bool PmrDeleterForC_callback_used{false}; + namespace tests { #if __cplusplus < 201703L @@ -139,8 +141,6 @@ std::unique_ptr c_return_unique_ptr() { return std::unique_ptr(new C{2020}); } -extern "C" bool PmrDeleterForC_callback_used{false}; - void PmrDeleterForC::operator()(C* obj) { alloc.destroy(obj); alloc.deallocate(obj, 1);