lawrence_danna added inline comments.
================ Comment at: lldb/bindings/python/python-wrapper.swig:585-597 + llvm::Expected<PythonObject> result = pfunc.Call(PythonString(child_name)); - if (!result.IsAllocated()) - return UINT32_MAX; + long long retval = unwrapOrSetPythonException(As<long long>(std::move(result))); - PythonInteger int_result = result.AsType<PythonInteger>(); - if (!int_result.IsAllocated()) + if (PyErr_Occurred()) { + PyErr_Clear(); // FIXME print this? do something else return UINT32_MAX; ---------------- labath wrote: > If you don't print this, then you could definitely do something like: > ``` > Expected<long long> result = As<long > long>(pfunc.Call(PythonString(child_name)); > if (result) > return std::max<long long>(*result, 0); > consumeError(result.takeError()); > return UINT32_MAX; > ``` aparently this function is not even used... I'll put up a new diff to remove it Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D78462/new/ https://reviews.llvm.org/D78462 _______________________________________________ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits