aboutsummaryrefslogtreecommitdiffstats
path: root/sources/shiboken6/tests/libsample/pointerholder.h
diff options
context:
space:
mode:
Diffstat (limited to 'sources/shiboken6/tests/libsample/pointerholder.h')
-rw-r--r--sources/shiboken6/tests/libsample/pointerholder.h23
1 files changed, 23 insertions, 0 deletions
diff --git a/sources/shiboken6/tests/libsample/pointerholder.h b/sources/shiboken6/tests/libsample/pointerholder.h
new file mode 100644
index 000000000..26f1cf0a6
--- /dev/null
+++ b/sources/shiboken6/tests/libsample/pointerholder.h
@@ -0,0 +1,23 @@
+// Copyright (C) 2016 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
+
+#ifndef POINTERHOLDER_H
+#define POINTERHOLDER_H
+
+#include "libsamplemacros.h"
+
+class PointerHolder
+{
+public:
+ LIBMINIMAL_DEFAULT_COPY_MOVE(PointerHolder)
+
+ explicit PointerHolder(void *ptr) : m_pointer(ptr) {}
+ ~PointerHolder() = default;
+
+ inline void *pointer() const { return m_pointer; }
+
+private:
+ void *m_pointer;
+};
+
+#endif // POINTERHOLDER_H