diff options
author | Friedemann Kleint <Friedemann.Kleint@qt.io> | 2020-05-25 16:33:12 +0200 |
---|---|---|
committer | Friedemann Kleint <Friedemann.Kleint@qt.io> | 2020-05-25 16:33:12 +0200 |
commit | 39ac266455cc1c0ae970a47c34d3a6bc7372d750 (patch) | |
tree | 9577fe06bcb0e3096ef85af929a91eb37b037452 /sources/shiboken2/libshiboken/voidptr.cpp | |
parent | 9115712ef3a1be8b401c9cd306792dbc30c89bf0 (diff) | |
parent | 6717d3540fac74c91d9381958a08e60f6532d402 (diff) |
Merge remote-tracking branch 'origin/5.14' into 5.14.2
Change-Id: Id0650ec2b46f3c67eb2c9b400f5b31aab98c3c58
Diffstat (limited to 'sources/shiboken2/libshiboken/voidptr.cpp')
-rw-r--r-- | sources/shiboken2/libshiboken/voidptr.cpp | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/sources/shiboken2/libshiboken/voidptr.cpp b/sources/shiboken2/libshiboken/voidptr.cpp index 46f49b67e..6ac3c131d 100644 --- a/sources/shiboken2/libshiboken/voidptr.cpp +++ b/sources/shiboken2/libshiboken/voidptr.cpp @@ -340,7 +340,7 @@ static PyType_Slot SbkVoidPtrType_slots[] = { {0, nullptr} }; static PyType_Spec SbkVoidPtrType_spec = { - "shiboken2.libshiboken.VoidPtr", + "2:shiboken2.shiboken2.VoidPtr", sizeof(SbkVoidPtrObject), 0, Py_TPFLAGS_DEFAULT, @@ -353,16 +353,15 @@ static PyType_Spec SbkVoidPtrType_spec = { PyTypeObject *SbkVoidPtrTypeF(void) { static PyTypeObject *type = nullptr; - if (!type) - type = reinterpret_cast<PyTypeObject *>(PyType_FromSpec(&SbkVoidPtrType_spec)); - + if (!type) { + type = reinterpret_cast<PyTypeObject *>(SbkType_FromSpec(&SbkVoidPtrType_spec)); #if PY_VERSION_HEX < 0x03000000 - type->tp_as_buffer = &SbkVoidPtrObjectBufferProc; - type->tp_flags |= Py_TPFLAGS_HAVE_NEWBUFFER; + type->tp_as_buffer = &SbkVoidPtrObjectBufferProc; + type->tp_flags |= Py_TPFLAGS_HAVE_NEWBUFFER; #else - PepType_AS_BUFFER(type) = &SbkVoidPtrObjectBufferProc; + PepType_AS_BUFFER(type) = &SbkVoidPtrObjectBufferProc; #endif - + } return type; } |