[Lldb-commits] [PATCH] D78462: get rid of PythonInteger::GetInteger()
Lawrence D'Anna via Phabricator via lldb-commits
lldb-commits at lists.llvm.org
Mon Apr 20 12:27:42 PDT 2020
lawrence_danna added inline comments.
================
Comment at: lldb/source/Plugins/ScriptInterpreter/Python/ScriptInterpreterPython.cpp:3153-3159
+ long long py_return = unwrapOrSetPythonException(
+ As<long long>(implementor.CallMethod(callee_name)));
// if it fails, print the error but otherwise go on
if (PyErr_Occurred()) {
PyErr_Print();
PyErr_Clear();
----------------
labath wrote:
> This converts the Expected into a python exception, only to clear (and print) it at the next line. Is there a more direct way of doing it?
I don't know, what did you have in mind? It could just call the Python C API directly and not bother converting it into an Expected, but would that be better?
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D78462/new/
https://reviews.llvm.org/D78462
More information about the lldb-commits
mailing list