summaryrefslogtreecommitdiffstats
path: root/lldb/scripts/Python/python-wrapper.swig
diff options
context:
space:
mode:
authorGreg Clayton <gclayton@apple.com>2013-01-16 19:53:55 +0000
committerGreg Clayton <gclayton@apple.com>2013-01-16 19:53:55 +0000
commitb14bed80cb459643e0b788e9a3875cdf643e90a7 (patch)
treec753cf4274384998cfd5d973f7b78776411bf763 /lldb/scripts/Python/python-wrapper.swig
parentce26df829f648d2c889eda592ba894d83dac5e4e (diff)
downloadbcm5719-llvm-b14bed80cb459643e0b788e9a3875cdf643e90a7.tar.gz
bcm5719-llvm-b14bed80cb459643e0b788e9a3875cdf643e90a7.zip
Remove std::string input arguments and replace with "const char *".
llvm-svn: 172647
Diffstat (limited to 'lldb/scripts/Python/python-wrapper.swig')
-rw-r--r--lldb/scripts/Python/python-wrapper.swig21
1 files changed, 12 insertions, 9 deletions
diff --git a/lldb/scripts/Python/python-wrapper.swig b/lldb/scripts/Python/python-wrapper.swig
index 283d9119248..2189193cfbb 100644
--- a/lldb/scripts/Python/python-wrapper.swig
+++ b/lldb/scripts/Python/python-wrapper.swig
@@ -267,6 +267,8 @@ LLDBSwigPythonCallTypeScript
{
lldb::SBValue sb_value (valobj_sp);
+ retval.clear();
+
PyObject *ValObj_PyObj = SWIG_NewPointerObj((void *) &sb_value, SWIGTYPE_p_lldb__SBValue, 0);
if (ValObj_PyObj == NULL)
@@ -323,14 +325,14 @@ LLDBSwigPythonCallTypeScript
SWIGEXPORT void*
LLDBSwigPythonCreateSyntheticProvider
(
- const std::string python_class_name,
+ const char *python_class_name,
const char *session_dictionary_name,
const lldb::ValueObjectSP& valobj_sp
)
{
PyObject* retval = NULL;
- if (python_class_name.empty() || !session_dictionary_name)
+ if (python_class_name == NULL || python_class_name[0] == '\0' || !session_dictionary_name)
Py_RETURN_NONE;
// I do not want the SBValue to be deallocated when going out of scope because python
@@ -343,7 +345,7 @@ LLDBSwigPythonCreateSyntheticProvider
if (ValObj_PyObj == NULL)
Py_RETURN_NONE;
- const char* python_function_name = python_class_name.c_str();
+ const char* python_function_name = python_class_name;
PyObject *session_dict, *pfunc;
PyObject *pvalue;
@@ -778,14 +780,14 @@ LLDBSwigPythonCallCommand
SWIGEXPORT void*
LLDBSWIGPythonCreateOSPlugin
(
- const std::string python_class_name,
+ const char *python_class_name,
const char *session_dictionary_name,
const lldb::ProcessSP& process_sp
)
{
PyObject* retval = NULL;
- if (python_class_name.empty() || !session_dictionary_name)
+ if (python_class_name == NULL || python_class_name[0] == '\0' || !session_dictionary_name)
Py_RETURN_NONE;
// I do not want the SBValue to be deallocated when going out of scope because python
@@ -797,7 +799,7 @@ LLDBSWIGPythonCreateOSPlugin
if (SBProc_PyObj == NULL)
Py_RETURN_NONE;
- const char* python_function_name = python_class_name.c_str();
+ const char* python_function_name = python_class_name;
PyObject *session_dict, *pfunc;
PyObject *pvalue;
@@ -875,7 +877,7 @@ LLDBSWIGPythonCreateOSPlugin
SWIGEXPORT bool
LLDBSwigPythonCallModuleInit
(
- const std::string python_module_name,
+ const char *python_module_name,
const char *session_dictionary_name,
lldb::DebuggerSP& debugger
)
@@ -890,7 +892,7 @@ LLDBSwigPythonCallModuleInit
if (DebuggerObj_PyObj == NULL)
return retval;
- if (!(python_module_name.length()) || !session_dictionary_name)
+ if (python_module_name == NULL || python_module_name[0] == '\0' || !session_dictionary_name)
return retval;
PyObject *session_dict, *pfunc;
@@ -898,7 +900,8 @@ LLDBSwigPythonCallModuleInit
session_dict = FindSessionDictionary (session_dictionary_name);
- std::string python_function_name_string = python_module_name + (".__lldb_init_module");
+ std::string python_function_name_string = python_module_name;
+ python_function_name_string += ".__lldb_init_module";
const char* python_function_name = python_function_name_string.c_str();
if (session_dict != NULL)
OpenPOWER on IntegriCloud