From 87f47729850f0cd3f18a7c7c1edb615556956892 Mon Sep 17 00:00:00 2001 From: Zachary Turner Date: Wed, 14 Oct 2015 16:59:44 +0000 Subject: 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 --- .../Plugins/ScriptInterpreter/Python/PythonDataObjects.h | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) (limited to 'lldb/source/Plugins/ScriptInterpreter/Python/PythonDataObjects.h') diff --git a/lldb/source/Plugins/ScriptInterpreter/Python/PythonDataObjects.h b/lldb/source/Plugins/ScriptInterpreter/Python/PythonDataObjects.h index 17ece25c9d3..7d95d576945 100644 --- a/lldb/source/Plugins/ScriptInterpreter/Python/PythonDataObjects.h +++ b/lldb/source/Plugins/ScriptInterpreter/Python/PythonDataObjects.h @@ -215,10 +215,10 @@ class PythonString : public PythonObject { public: PythonString(); - PythonString(PyRefType type, PyObject *o); - PythonString(const PythonString &object); explicit PythonString(llvm::StringRef string); explicit PythonString(const char *string); + PythonString(PyRefType type, PyObject *o); + PythonString(const PythonString &object); ~PythonString() override; static bool Check(PyObject *py_obj); @@ -243,9 +243,9 @@ class PythonInteger : public PythonObject { public: PythonInteger(); + explicit PythonInteger(int64_t value); PythonInteger(PyRefType type, PyObject *o); PythonInteger(const PythonInteger &object); - explicit PythonInteger(int64_t value); ~PythonInteger() override; static bool Check(PyObject *py_obj); @@ -266,7 +266,8 @@ public: class PythonList : public PythonObject { public: - PythonList(PyInitialValue value); + explicit PythonList(PyInitialValue value); + explicit PythonList(int list_size); PythonList(PyRefType type, PyObject *o); PythonList(const PythonList &list); ~PythonList() override; @@ -292,7 +293,7 @@ public: class PythonDictionary : public PythonObject { public: - PythonDictionary(PyInitialValue value); + explicit PythonDictionary(PyInitialValue value); PythonDictionary(PyRefType type, PyObject *o); PythonDictionary(const PythonDictionary &dict); ~PythonDictionary() override; @@ -313,6 +314,7 @@ public: StructuredData::DictionarySP CreateStructuredDictionary() const; }; + } // namespace lldb_private #endif // LLDB_PLUGINS_SCRIPTINTERPRETER_PYTHON_PYTHONDATAOBJECTS_H -- cgit v1.2.3