Python3 doesn't seem to allow you to tell whether an object is a class
PyClass_Check and everything it relied on seems gone from Python3.7. So I won't check whether it is a class first... Also cleaned up a couple of warnings. llvm-svn: 373679
This commit is contained in:
@@ -892,8 +892,6 @@ PythonCallable::ArgInfo PythonCallable::GetNumInitArguments() const {
|
||||
if (!IsValid())
|
||||
return result;
|
||||
PyObject *py_func_obj = m_py_obj;
|
||||
if (!PyClass_Check(m_py_obj))
|
||||
return result;
|
||||
|
||||
PythonObject __init__ = GetAttributeValue("__init__");
|
||||
if (__init__.IsValid() ) {
|
||||
|
||||
Reference in New Issue
Block a user