[LLDB][Python] remove ArgInfo::count
Summary: This patch updates the last user of ArgInfo::count and deletes it. I also delete `GetNumInitArguments()` and `GetInitArgInfo()`. Classess are callables and `GetArgInfo()` should work on them. On python 3 it already works, of course. `inspect` is good. On python 2 we have to add yet another special case. But hey if python 2 wasn't crufty we wouln't need python 3. I also delete `is_bound_method` becuase it is unused. This path is tested in `TestStepScripted.py` Reviewers: labath, mgorny, JDevlieghere Reviewed By: labath, JDevlieghere Subscribers: lldb-commits Tags: #lldb Differential Revision: https://reviews.llvm.org/D69742
This commit is contained in:
@@ -807,8 +807,10 @@ ScriptInterpreterPythonImpl::GetMaxPositionalArgumentsForCallable(
|
||||
llvm::inconvertibleErrorCode(),
|
||||
"can't find callable: %s", callable_name.str().c_str());
|
||||
}
|
||||
PythonCallable::ArgInfo arg_info = pfunc.GetNumArguments();
|
||||
return arg_info.max_positional_args;
|
||||
llvm::Expected<PythonCallable::ArgInfo> arg_info = pfunc.GetArgInfo();
|
||||
if (!arg_info)
|
||||
return arg_info.takeError();
|
||||
return arg_info.get().max_positional_args;
|
||||
}
|
||||
|
||||
static std::string GenerateUniqueName(const char *base_name_wanted,
|
||||
|
||||
Reference in New Issue
Block a user