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:
@@ -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()
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user