aboutsummaryrefslogtreecommitdiffstats
path: root/sources/shiboken6/tests/libsample/handle.h
diff options
context:
space:
mode:
Diffstat (limited to 'sources/shiboken6/tests/libsample/handle.h')
-rw-r--r--sources/shiboken6/tests/libsample/handle.h8
1 files changed, 7 insertions, 1 deletions
diff --git a/sources/shiboken6/tests/libsample/handle.h b/sources/shiboken6/tests/libsample/handle.h
index d54dd9f11..1ef80689d 100644
--- a/sources/shiboken6/tests/libsample/handle.h
+++ b/sources/shiboken6/tests/libsample/handle.h
@@ -23,7 +23,7 @@ public:
explicit HandleHolder(HANDLE ptr = nullptr) : m_handle(ptr) {}
explicit HandleHolder(Foo::HANDLE val): m_handle2(val) {}
- inline void set(HANDLE ptr) { HANDLE tmp; tmp = m_handle; m_handle = tmp; }
+ void set(HANDLE ptr);
inline void set(const Foo::HANDLE& val) { m_handle2 = val; }
inline HANDLE handle() { return m_handle; }
inline Foo::HANDLE handle2() { return m_handle2; }
@@ -37,6 +37,12 @@ private:
Foo::HANDLE m_handle2;
};
+inline void HandleHolder::set(HANDLE)
+{
+ HANDLE tmp = m_handle;
+ m_handle = tmp;
+}
+
struct LIBSAMPLE_API PrimitiveStruct {};
using PrimitiveStructPtr = struct PrimitiveStruct *;
struct LIBSAMPLE_API PrimitiveStructPointerHolder