forked from OSchip/llvm-project
Add more robustness - use PyString_CheckExact(pvalue) to check whether pvalue is a Python string before
calling PyString_AsString(pvalue). Similar to http://llvm.org/viewvc/llvm-project?rev=146584&view=rev. llvm-svn: 146606
This commit is contained in:
parent
a8aa30b620
commit
a2b514a3f2
|
@ -234,7 +234,7 @@ LLDBSwigPythonCallTypeScript
|
|||
|
||||
if (pvalue != NULL)
|
||||
{
|
||||
if (pvalue != Py_None)
|
||||
if (pvalue != Py_None && PyString_CheckExact(pvalue))
|
||||
retval = std::string(PyString_AsString(pvalue));
|
||||
else
|
||||
retval = "None";
|
||||
|
|
Loading…
Reference in New Issue