aboutsummaryrefslogtreecommitdiff
path: root/lldb/source/Plugins/ScriptInterpreter/Python/PythonDataObjects.cpp
diff options
context:
space:
mode:
authorZachary Turner <zturner@google.com>2015-10-14 16:59:44 +0000
committerZachary Turner <zturner@google.com>2015-10-14 16:59:44 +0000
commit87f47729850f0cd3f18a7c7c1edb615556956892 (patch)
treefd9a1ee92b74146e0796a164cf9996561a81e5c6 /lldb/source/Plugins/ScriptInterpreter/Python/PythonDataObjects.cpp
parent60c24f70fe1f7f37ae34e0ff47cd60db39094a88 (diff)
downloadllvm-87f47729850f0cd3f18a7c7c1edb615556956892.zip
llvm-87f47729850f0cd3f18a7c7c1edb615556956892.tar.gz
llvm-87f47729850f0cd3f18a7c7c1edb615556956892.tar.bz2
Minor cleanup on PythonDataObject constructors.
Added a constructor that takes list_size for `PythonList`. Made all single-argument constructors explicit. Re-ordered constructors to be consistent with other classes. llvm-svn: 250304
Diffstat (limited to 'lldb/source/Plugins/ScriptInterpreter/Python/PythonDataObjects.cpp')
-rw-r--r--lldb/source/Plugins/ScriptInterpreter/Python/PythonDataObjects.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/lldb/source/Plugins/ScriptInterpreter/Python/PythonDataObjects.cpp b/lldb/source/Plugins/ScriptInterpreter/Python/PythonDataObjects.cpp
index d90e12c..1ab5e4a 100644
--- a/lldb/source/Plugins/ScriptInterpreter/Python/PythonDataObjects.cpp
+++ b/lldb/source/Plugins/ScriptInterpreter/Python/PythonDataObjects.cpp
@@ -378,6 +378,12 @@ PythonList::PythonList(PyInitialValue value)
Reset(PyRefType::Owned, PyList_New(0));
}
+PythonList::PythonList(int list_size)
+ : PythonObject()
+{
+ Reset(PyRefType::Owned, PyList_New(list_size));
+}
+
PythonList::PythonList(PyRefType type, PyObject *py_obj)
: PythonObject()
{