summaryrefslogtreecommitdiffstats
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
commitebaa3eb127632851e3b7dbcceb98c0a2155c6324 (patch)
tree452f48fe0470029ccb277038e0d7b02faf927ad7
parent71662116fd9626b398a03283406a5e28c807f57c (diff)
downloadbcm5719-llvm-ebaa3eb127632851e3b7dbcceb98c0a2155c6324.tar.gz
bcm5719-llvm-ebaa3eb127632851e3b7dbcceb98c0a2155c6324.zip
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
-rw-r--r--lldb/include/lldb/Interpreter/OptionGroupPythonClassWithDict.h2
-rw-r--r--lldb/source/Interpreter/OptionGroupPythonClassWithDict.cpp3
-rw-r--r--lldb/source/Plugins/ScriptInterpreter/Python/PythonDataObjects.cpp2
3 files changed, 2 insertions, 5 deletions
diff --git a/lldb/include/lldb/Interpreter/OptionGroupPythonClassWithDict.h b/lldb/include/lldb/Interpreter/OptionGroupPythonClassWithDict.h
index 061e88e2a01..6aec7eb0f0b 100644
--- a/lldb/include/lldb/Interpreter/OptionGroupPythonClassWithDict.h
+++ b/lldb/include/lldb/Interpreter/OptionGroupPythonClassWithDict.h
@@ -27,7 +27,7 @@ public:
int class_option = 'C',
int key_option = 'k',
int value_option = 'v',
- char *class_long_option = "python-class",
+ const char *class_long_option = "python-class",
const char *key_long_option = "python-class-key",
const char *value_long_option = "python-class-value",
bool required = false);
diff --git a/lldb/source/Interpreter/OptionGroupPythonClassWithDict.cpp b/lldb/source/Interpreter/OptionGroupPythonClassWithDict.cpp
index 225a0a8d11b..9a893ec5362 100644
--- a/lldb/source/Interpreter/OptionGroupPythonClassWithDict.cpp
+++ b/lldb/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/lldb/source/Plugins/ScriptInterpreter/Python/PythonDataObjects.cpp b/lldb/source/Plugins/ScriptInterpreter/Python/PythonDataObjects.cpp
index 1862bbd9298..180de988d83 100644
--- a/lldb/source/Plugins/ScriptInterpreter/Python/PythonDataObjects.cpp
+++ b/lldb/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() ) {
OpenPOWER on IntegriCloud