@@ -256,7 +256,7 return Py_None; | |||
|
256 | 256 | |
|
257 | 257 | void* PythonQtConv::ConvertPythonToQt(const PythonQtMethodInfo::ParameterInfo& info, PyObject* obj, bool strict, PythonQtClassInfo* /*classInfo*/, void* alreadyAllocatedCPPObject) |
|
258 | 258 | { |
|
259 | bool ok; | |
|
259 | bool ok = false; | |
|
260 | 260 | void* ptr = NULL; |
|
261 | 261 | if (PyObject_TypeCheck(obj, &PythonQtInstanceWrapper_Type) && info.typeId != PythonQtMethodInfo::Variant) { |
|
262 | 262 | // if we have a Qt wrapper object and if we do not need a QVariant, we do the following: |
@@ -264,7 +264,6 return Py_None; | |||
|
264 | 264 | |
|
265 | 265 | // a C++ wrapper (can be passed as pointer or reference) |
|
266 | 266 | PythonQtInstanceWrapper* wrap = (PythonQtInstanceWrapper*)obj; |
|
267 | bool ok; | |
|
268 | 267 | void* object = castWrapperTo(wrap, info.name, ok); |
|
269 | 268 | if (ok) { |
|
270 | 269 | if (info.isPointer) { |
@@ -460,6 +459,7 return Py_None; | |||
|
460 | 459 | // check for enum case |
|
461 | 460 | if (info.enumWrapper) { |
|
462 | 461 | unsigned int val; |
|
462 | ok = false; | |
|
463 | 463 | if ((PyObject*)obj->ob_type == info.enumWrapper) { |
|
464 | 464 | // we have a exact enum type match: |
|
465 | 465 | val = PyInt_AS_LONG(obj); |
General Comments 0
You need to be logged in to leave comments.
Login now