aboutsummaryrefslogtreecommitdiffstats
path: root/sources/shiboken6/tests/libsmart/smart.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'sources/shiboken6/tests/libsmart/smart.cpp')
-rw-r--r--sources/shiboken6/tests/libsmart/smart.cpp12
1 files changed, 12 insertions, 0 deletions
diff --git a/sources/shiboken6/tests/libsmart/smart.cpp b/sources/shiboken6/tests/libsmart/smart.cpp
index 81fa30c7e..f5d318e59 100644
--- a/sources/shiboken6/tests/libsmart/smart.cpp
+++ b/sources/shiboken6/tests/libsmart/smart.cpp
@@ -153,6 +153,18 @@ Integer Obj::takeInteger(Integer val)
return val;
}
+SharedPtr<Integer> Obj::createSharedPtrToInteger(int value)
+{
+ auto *i = new Integer;
+ i->setValue(value);
+ return SharedPtr<Integer>(i);
+}
+
+SharedPtr<Integer> Obj::createNullSharedPtrToInteger()
+{
+ return {};
+}
+
Integer::Integer() : m_int(456)
{
Registry::getInstance()->add(this);