diff options
author | Friedemann Kleint <Friedemann.Kleint@qt.io> | 2020-06-19 17:24:07 +0200 |
---|---|---|
committer | Friedemann Kleint <Friedemann.Kleint@qt.io> | 2020-06-19 21:39:08 +0200 |
commit | 42c4179d3cb451db88bfa5d228e81b6b91e553e8 (patch) | |
tree | 65f88b767ec304a972c13c97457c3c4442597b23 /sources/shiboken2/tests/samplebinding/typesystem_sample.xml | |
parent | ab9033719f0ee6319c5f2a4b474aac0eb1ad2ac2 (diff) |
typesystem_sample.xml: Expand tabs
Change-Id: I64479f27828cfb574427b457223c97176c8646ad
Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
Diffstat (limited to 'sources/shiboken2/tests/samplebinding/typesystem_sample.xml')
-rw-r--r-- | sources/shiboken2/tests/samplebinding/typesystem_sample.xml | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/sources/shiboken2/tests/samplebinding/typesystem_sample.xml b/sources/shiboken2/tests/samplebinding/typesystem_sample.xml index 3cd318ceb..5754b3047 100644 --- a/sources/shiboken2/tests/samplebinding/typesystem_sample.xml +++ b/sources/shiboken2/tests/samplebinding/typesystem_sample.xml @@ -44,15 +44,15 @@ <inject-code class="native" position="beginning"> static bool Check2TupleOfNumbers(PyObject* pyIn) { - if (!PySequence_Check(pyIn) || !(PySequence_Size(pyIn) == 2)) - return false; - Shiboken::AutoDecRef pyReal(PySequence_GetItem(pyIn, 0)); - if (!SbkNumber_Check(pyReal)) - return false; - Shiboken::AutoDecRef pyImag(PySequence_GetItem(pyIn, 1)); - if (!SbkNumber_Check(pyImag)) - return false; - return true; + if (!PySequence_Check(pyIn) || !(PySequence_Size(pyIn) == 2)) + return false; + Shiboken::AutoDecRef pyReal(PySequence_GetItem(pyIn, 0)); + if (!SbkNumber_Check(pyReal)) + return false; + Shiboken::AutoDecRef pyImag(PySequence_GetItem(pyIn, 1)); + if (!SbkNumber_Check(pyImag)) + return false; + return true; } </inject-code> <primitive-type name="Complex" target-lang-api-name="PyComplex"> @@ -70,8 +70,8 @@ %out = %OUTTYPE(real, imag); </add-conversion> <add-conversion type="PySequence" check="Check2TupleOfNumbers(%in)"> - Shiboken::AutoDecRef pyReal(PySequence_GetItem(%in, 0)); - Shiboken::AutoDecRef pyImag(PySequence_GetItem(%in, 1)); + Shiboken::AutoDecRef pyReal(PySequence_GetItem(%in, 0)); + Shiboken::AutoDecRef pyImag(PySequence_GetItem(%in, 1)); double real = %CONVERTTOCPP[double](pyReal); double imag = %CONVERTTOCPP[double](pyImag); %out = %OUTTYPE(real, imag); |