Core: replace PyObject_IsTrue with Base::asBoolean
This commit is contained in:
@@ -229,7 +229,7 @@ PyObject* TypePy::createInstanceByName (PyObject *args)
|
||||
if (!PyArg_ParseTuple(args, "s|O!", &name, &PyBool_Type, &load))
|
||||
return nullptr;
|
||||
|
||||
bool bLoad = PyObject_IsTrue(load) ? true : false;
|
||||
bool bLoad = Base::asBoolean(load);
|
||||
Base::Type type = Base::Type::getTypeIfDerivedFrom(name, Base::BaseClass::getClassTypeId(), bLoad);
|
||||
if (type.isBad())
|
||||
Py_Return;
|
||||
|
||||
Reference in New Issue
Block a user