diff options
author | Friedemann Kleint <[email protected]> | 2023-03-06 11:59:13 +0100 |
---|---|---|
committer | Friedemann Kleint <[email protected]> | 2023-03-14 12:31:14 +0100 |
commit | fce275e1de88b6d5bdd1c9612b910fa68d1db3f1 (patch) | |
tree | 598036bb8219988dbe07007bc5a12e7d9ff72e74 /sources/shiboken6/tests/libsample | |
parent | 52e3888582ac3f3db322d7113734ce43dc325099 (diff) |
shiboken6: Handle returning primitive types by pointer
This manifests in QtDataVisualization's
const QBarDataArray *QBarDataProxy::array() const
where QBarDataArray is handled as a primitive type.
This required adapting a code snippet which was relying
on the argument QString* being treated as QString.
Task-number: PYSIDE-2206
Change-Id: Ib05f01d7b54e103cf5bb71be86ffa9b5067ca3fb
Reviewed-by: Christian Tismer <[email protected]>
Diffstat (limited to 'sources/shiboken6/tests/libsample')
-rw-r--r-- | sources/shiboken6/tests/libsample/functions.cpp | 5 | ||||
-rw-r--r-- | sources/shiboken6/tests/libsample/functions.h | 1 |
2 files changed, 6 insertions, 0 deletions
diff --git a/sources/shiboken6/tests/libsample/functions.cpp b/sources/shiboken6/tests/libsample/functions.cpp index 29c148346..6f46f89df 100644 --- a/sources/shiboken6/tests/libsample/functions.cpp +++ b/sources/shiboken6/tests/libsample/functions.cpp @@ -115,6 +115,11 @@ int acceptInt(int x) return x; } +const int *acceptIntReturnPtr(int x) +{ + return new int(x); +} + unsigned int acceptUInt(unsigned int x) { return x; diff --git a/sources/shiboken6/tests/libsample/functions.h b/sources/shiboken6/tests/libsample/functions.h index 3eb41beaf..31d21902d 100644 --- a/sources/shiboken6/tests/libsample/functions.h +++ b/sources/shiboken6/tests/libsample/functions.h @@ -49,6 +49,7 @@ LIBSAMPLE_API unsigned long long doubleUnsignedLongLong(unsigned long long value LIBSAMPLE_API short doubleShort(short value); LIBSAMPLE_API int acceptInt(int x); +LIBSAMPLE_API const int *acceptIntReturnPtr(int x); LIBSAMPLE_API unsigned int acceptUInt(unsigned int x); LIBSAMPLE_API long acceptLong(long x); LIBSAMPLE_API unsigned long acceptULong(unsigned long x); |