aboutsummaryrefslogtreecommitdiff
path: root/source
diff options
context:
space:
mode:
authorJim Ingham <jingham@apple.com>2019-10-03 23:57:34 +0000
committerJim Ingham <jingham@apple.com>2019-10-03 23:57:34 +0000
commit61057d9cc0ead439693af821a35fb80f0d686267 (patch)
tree834d018f715f06c2be6a7479addeb0346fff6e8b /source
parent4481c464269ef866368deb0d81a0a72ea7b41823 (diff)
downloadlldb-61057d9cc0ead439693af821a35fb80f0d686267.tar.gz
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. git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@373679 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'source')
-rw-r--r--source/Interpreter/OptionGroupPythonClassWithDict.cpp3
-rw-r--r--source/Plugins/ScriptInterpreter/Python/PythonDataObjects.cpp2
2 files changed, 1 insertions, 4 deletions
diff --git a/source/Interpreter/OptionGroupPythonClassWithDict.cpp b/source/Interpreter/OptionGroupPythonClassWithDict.cpp
index 225a0a8d1..9a893ec53 100644
--- a/source/Interpreter/OptionGroupPythonClassWithDict.cpp
+++ b/source/Interpreter/OptionGroupPythonClassWithDict.cpp
@@ -18,7 +18,7 @@ OptionGroupPythonClassWithDict::OptionGroupPythonClassWithDict
int class_option,
int key_option,
int value_option,
- char *class_long_option,
+ const char *class_long_option,
const char *key_long_option,
const char *value_long_option,
bool required) {
@@ -77,7 +77,6 @@ Status OptionGroupPythonClassWithDict::SetOptionValue(
llvm::StringRef option_arg,
ExecutionContext *execution_context) {
Status error;
- const int short_option = m_option_definition[option_idx].short_option;
switch (option_idx) {
case 0: {
m_class_name.assign(option_arg);
diff --git a/source/Plugins/ScriptInterpreter/Python/PythonDataObjects.cpp b/source/Plugins/ScriptInterpreter/Python/PythonDataObjects.cpp
index 1862bbd92..180de988d 100644
--- a/source/Plugins/ScriptInterpreter/Python/PythonDataObjects.cpp
+++ b/source/Plugins/ScriptInterpreter/Python/PythonDataObjects.cpp
@@ -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() ) {