diff options
author | Enrico Granata <egranata@apple.com> | 2012-03-19 22:58:49 +0000 |
---|---|---|
committer | Enrico Granata <egranata@apple.com> | 2012-03-19 22:58:49 +0000 |
commit | 86cc982974a5689047016981932a69a3987cf027 (patch) | |
tree | f21c71327240584482718bec5dda27d897ecfe6a /lldb/scripts/Python | |
parent | f9be693369134de1307db75310e71476fb76a017 (diff) | |
download | bcm5719-llvm-86cc982974a5689047016981932a69a3987cf027.tar.gz bcm5719-llvm-86cc982974a5689047016981932a69a3987cf027.zip |
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
llvm-svn: 153061
Diffstat (limited to 'lldb/scripts/Python')
-rw-r--r-- | lldb/scripts/Python/python-wrapper.swig | 18 |
1 files changed, 13 insertions, 5 deletions
diff --git a/lldb/scripts/Python/python-wrapper.swig b/lldb/scripts/Python/python-wrapper.swig index 3277e780e26..1442608d6bb 100644 --- a/lldb/scripts/Python/python-wrapper.swig +++ b/lldb/scripts/Python/python-wrapper.swig @@ -258,7 +258,7 @@ LLDBSwigPythonCreateSyntheticProvider // 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 @@ LLDBSwigPython_GetIndexOfChildWithName 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 @@ LLDBSwigPython_UpdateSynthProviderInstance if (pmeth == NULL || pmeth == Py_None) { Py_XDECREF(pmeth); - return; + return ret_val; } if (PyCallable_Check(pmeth) == 0) @@ -490,7 +493,7 @@ LLDBSwigPython_UpdateSynthProviderInstance } Py_XDECREF(pmeth); - return; + return ret_val; } if (PyErr_Occurred()) @@ -509,8 +512,13 @@ LLDBSwigPython_UpdateSynthProviderInstance PyErr_Print(); PyErr_Clear(); } + + if (py_return == Py_True) + ret_val = true; Py_XDECREF(py_return); + + return ret_val; } |