From a365f296e61e030175eb48b5dd1aaff36bade63e Mon Sep 17 00:00:00 2001 From: Enrico Granata Date: Thu, 11 Aug 2011 19:20:44 +0000 Subject: Fixed an issue where LLDB was complaining about the lack of 'update' in a synthetic provider, despite it being optional llvm-svn: 137330 --- lldb/scripts/Python/python-wrapper.swig | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'lldb/scripts/Python/python-wrapper.swig') diff --git a/lldb/scripts/Python/python-wrapper.swig b/lldb/scripts/Python/python-wrapper.swig index 35aa7514e4c..e147e653f4c 100644 --- a/lldb/scripts/Python/python-wrapper.swig +++ b/lldb/scripts/Python/python-wrapper.swig @@ -523,6 +523,11 @@ LLDBSwigPython_UpdateSynthProviderInstance // other synth provider calls are mandatory, so we want to fail in a very obvious way if they are missing! PyObject* pmeth = PyObject_GetAttrString(implementor, callee_name); + if (PyErr_Occurred()) + { + PyErr_Clear(); + } + if (pmeth == NULL || pmeth == Py_None) { Py_XDECREF(pmeth); @@ -531,10 +536,20 @@ LLDBSwigPython_UpdateSynthProviderInstance if (PyCallable_Check(pmeth) == 0) { + if (PyErr_Occurred()) + { + PyErr_Clear(); + } + Py_XDECREF(pmeth); return; } + if (PyErr_Occurred()) + { + PyErr_Clear(); + } + Py_XDECREF(pmeth); // right now we know this function exists and is callable.. -- cgit v1.2.3