[Lldb-commits] [PATCH] D49309: No longer pass a StringRef to the Python API

Greg Clayton via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Tue Jul 17 10:17:21 PDT 2018


clayborg added inline comments.


================
Comment at: lldb/trunk/source/Plugins/ScriptInterpreter/Python/ScriptInterpreterPython.cpp:860
                 PyRefType::Owned,
-                Py_BuildValue("(Os)", session_dict.get(), command));
+                Py_BuildValue("(Os)", session_dict.get(), command_str.c_str()));
             if (pargs.IsValid()) {
----------------
Of course this could have been fixed by using "s#" which allows the length to be supplied:

```
Py_BuildValue("(Os#)", session_dict.get(), command.data(), (int)command.size()));
```


Repository:
  rL LLVM

https://reviews.llvm.org/D49309





More information about the lldb-commits mailing list