From 6beac4fcf9e5327f07c0fefd527180124438096a Mon Sep 17 00:00:00 2001 From: emaste Date: Tue, 18 Feb 2014 16:23:10 +0000 Subject: Import lldb as of SVN r201577 (git 2bdc2f6) (A number of files not required for the FreeBSD build have been removed.) Sponsored by: DARPA, AFRL --- include/lldb/Interpreter/PythonDataObjects.h | 25 ++++++++++--------------- 1 file changed, 10 insertions(+), 15 deletions(-) (limited to 'include/lldb/Interpreter/PythonDataObjects.h') diff --git a/include/lldb/Interpreter/PythonDataObjects.h b/include/lldb/Interpreter/PythonDataObjects.h index 2762d45..55df4fd 100644 --- a/include/lldb/Interpreter/PythonDataObjects.h +++ b/include/lldb/Interpreter/PythonDataObjects.h @@ -31,7 +31,7 @@ namespace lldb_private { { } - PythonObject (PyObject* py_obj) : + explicit PythonObject (PyObject* py_obj) : m_py_obj(NULL) { Reset (py_obj); @@ -43,7 +43,7 @@ namespace lldb_private { Reset (rhs.m_py_obj); } - PythonObject (const lldb::ScriptInterpreterObjectSP &script_object_sp); + explicit PythonObject (const lldb::ScriptInterpreterObjectSP &script_object_sp); virtual ~PythonObject () @@ -51,18 +51,10 @@ namespace lldb_private { Reset (NULL); } - const PythonObject & - operator = (const PythonObject &rhs) - { - if (this != &rhs) - Reset (rhs.m_py_obj); - return *this; - } - bool Reset (const PythonObject &object) { - return Reset(object.GetPythonObject()); + return Reset(object.get()); } virtual bool @@ -90,11 +82,11 @@ namespace lldb_private { Dump (Stream &strm) const; PyObject* - GetPythonObject () const + get () const { return m_py_obj; } - + PythonString Repr (); @@ -159,7 +151,7 @@ namespace lldb_private { { public: - PythonList (); + PythonList (bool create_empty); PythonList (PyObject* py_obj); PythonList (const PythonObject &object); PythonList (const lldb::ScriptInterpreterObjectSP &script_object_sp); @@ -186,7 +178,7 @@ namespace lldb_private { { public: - PythonDictionary (); + explicit PythonDictionary (bool create_empty); PythonDictionary (PyObject* object); PythonDictionary (const PythonObject &object); PythonDictionary (const lldb::ScriptInterpreterObjectSP &script_object_sp); @@ -221,6 +213,9 @@ namespace lldb_private { GetValueAtPosition (uint32_t pos) const; void + SetItemForKey (const PythonString &key, PyObject *value); + + void SetItemForKey (const PythonString &key, const PythonObject& value); }; -- cgit v1.1