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:
Jim Ingham
2019-10-03 23:57:34 +00:00
parent 71662116fd
commit ebaa3eb127
3 changed files with 2 additions and 5 deletions

View File

@@ -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() ) {