diff options
Diffstat (limited to 'sources/shiboken6/tests/libsmart/smart.cpp')
| -rw-r--r-- | sources/shiboken6/tests/libsmart/smart.cpp | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/sources/shiboken6/tests/libsmart/smart.cpp b/sources/shiboken6/tests/libsmart/smart.cpp index 2273040f9..6dd4c3c6b 100644 --- a/sources/shiboken6/tests/libsmart/smart.cpp +++ b/sources/shiboken6/tests/libsmart/smart.cpp @@ -147,6 +147,18 @@ SharedPtr<const Integer> Obj::createSharedPtrConstInteger() return co; } +SharedPtr2<Integer> Obj::createNullSharedPtr2Integer() +{ + return {}; +} + +SharedPtr2<Integer> Obj::createSharedPtr2Integer(int value) +{ + auto *i = new Integer; + i->setValue(value); + return SharedPtr2<Integer>(i); +} + int Obj::takeSharedPtrToConstInteger(SharedPtr<const Integer> pInt) { return pInt->m_int; |
