Massive enumeration name changes: a number of enums in ValueObject were not following the naming pattern
Changes to synthetic children:
- the update(self): function can now (optionally) return a value - if it returns boolean value True, ValueObjectSyntheticFilter will not clear its caches across stop-points
this should allow better performance for Python-based synthetic children when one can be sure that the child ValueObjects have not changed
- making a difference between a synthetic VO and a VO with a synthetic value: now a ValueObjectSyntheticFilter will not return itself as its own synthetic value, but will (correctly)
claim to itself be synthetic
- cleared up the internal synthetic children architecture to make a more consistent use of pointers and references instead of shared pointers when possible
- major cleanup of unnecessary #include, data and functions in ValueObjectSyntheticFilter itself
- removed the SyntheticValueType enum and replaced it with a plain boolean (to which it was equivalent in the first place)
Some clean ups to the summary generation code
Centralized the code that clears out user-visible strings and data in ValueObject
More efficient summaries for libc++ containers
git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@153061 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/scripts/Python/python-wrapper.swig b/scripts/Python/python-wrapper.swig
index 3277e78..1442608 100644
--- a/scripts/Python/python-wrapper.swig
+++ b/scripts/Python/python-wrapper.swig
@@ -258,7 +258,7 @@
// has ownership of it and will manage memory for this object by itself
lldb::SBValue *valobj_sb = new lldb::SBValue(valobj_sp);
- PyObject *ValObj_PyObj = SWIG_NewPointerObj((void *)valobj_sb, SWIGTYPE_p_lldb__SBValue, SWIG_POINTER_OWN);
+ PyObject *ValObj_PyObj = SWIG_NewPointerObj((void *)valobj_sb, SWIGTYPE_p_lldb__SBValue, 0);
if (ValObj_PyObj == NULL)
Py_RETURN_NONE;
@@ -456,16 +456,19 @@
return 0;
}
-SWIGEXPORT void
+SWIGEXPORT bool
LLDBSwigPython_UpdateSynthProviderInstance
(
PyObject *implementor
)
{
+
+ bool ret_val = false;
+
static char callee_name[] = "update";
if (implementor == NULL || implementor == Py_None)
- return;
+ return ret_val;
// all this code is here because update is optional, so we don't want to bother trying to call it unless it's been def:ined for us
// other synth provider calls are mandatory, so we want to fail in a very obvious way if they are missing!
@@ -479,7 +482,7 @@
if (pmeth == NULL || pmeth == Py_None)
{
Py_XDECREF(pmeth);
- return;
+ return ret_val;
}
if (PyCallable_Check(pmeth) == 0)
@@ -490,7 +493,7 @@
}
Py_XDECREF(pmeth);
- return;
+ return ret_val;
}
if (PyErr_Occurred())
@@ -509,8 +512,13 @@
PyErr_Print();
PyErr_Clear();
}
+
+ if (py_return == Py_True)
+ ret_val = true;
Py_XDECREF(py_return);
+
+ return ret_val;
}