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
This commit is contained in:
Zachary Turner
2015-10-14 16:59:44 +00:00
parent 60c24f70fe
commit 87f4772985
2 changed files with 13 additions and 5 deletions

View File

@@ -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()
{