@@ -742,8 +742,10 bool PythonQtConv::PyObjGetBool(PyObject* val, bool strict, bool &ok) { | |||
|
742 | 742 | d = true; |
|
743 | 743 | ok = true; |
|
744 | 744 | } else if (!strict) { |
|
745 | d = PyObjGetInt(val, false, ok)!=0; | |
|
746 | ok = true; | |
|
745 | int result = PyObject_IsTrue(val); | |
|
746 | d = (result == 1); | |
|
747 | // the result is -1 if an error occurred, handle this: | |
|
748 | ok = (result != -1); | |
|
747 | 749 | } |
|
748 | 750 | return d; |
|
749 | 751 | } |
General Comments 0
You need to be logged in to leave comments.
Login now