diff options
author | Shyamnath Premnadh <Shyamnath.Premnadh@qt.io> | 2022-02-16 15:35:40 +0100 |
---|---|---|
committer | Qt Cherry-pick Bot <cherrypick_bot@qt-project.org> | 2022-02-17 16:55:08 +0000 |
commit | b2eabfd3964833bdf5afab5eacb16f7c7636e3f8 (patch) | |
tree | 64869dce9e40a979e116b33bf87a6900227cb8e5 | |
parent | cf1de15c2bf0e2dc9d48ceb7394f0a6123c297c6 (diff) |
shiboken6: nullptr_t converter - remove unnecessary converters
- toCpp and OtherToCpp are the same in this case.
Change-Id: I9476714035279c4de2771e4115e8b5eb7f695cf3
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
(cherry picked from commit e1fe202c3c9720ff08b6a606ad3f193a7d522c6a)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
-rw-r--r-- | sources/shiboken6/libshiboken/sbkconverter_p.h | 12 |
1 files changed, 1 insertions, 11 deletions
diff --git a/sources/shiboken6/libshiboken/sbkconverter_p.h b/sources/shiboken6/libshiboken/sbkconverter_p.h index 3a1689d93..acfaea67a 100644 --- a/sources/shiboken6/libshiboken/sbkconverter_p.h +++ b/sources/shiboken6/libshiboken/sbkconverter_p.h @@ -516,7 +516,7 @@ struct Primitive<std::string> : TwoPrimitive<std::string> // nullptr_t template <> -struct Primitive<std::nullptr_t> : TwoPrimitive<std::nullptr_t> +struct Primitive<std::nullptr_t> : OnePrimitive<std::nullptr_t> { static PyObject *toPython(const void * /* cppIn */) { @@ -532,16 +532,6 @@ struct Primitive<std::nullptr_t> : TwoPrimitive<std::nullptr_t> return toCpp; return nullptr; } - static void otherToCpp(PyObject * /* pyIn */, void *cppOut) - { - *reinterpret_cast<std::nullptr_t *>(cppOut) = nullptr; - } - static PythonToCppFunc isOtherConvertible(PyObject *pyIn) - { - if (pyIn == nullptr) - return otherToCpp; - return nullptr; - } }; namespace Shiboken { |