Fixed an issue where LLDB was complaining about the lack of 'update' in a synthetic provider, despite it being optional
llvm-svn: 137330
This commit is contained in:
@@ -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..
|
||||
|
||||
Reference in New Issue
Block a user