From d78c9576cafa6dd17aa0833bb9202549ebfc3739 Mon Sep 17 00:00:00 2001 From: Ed Maste Date: Sun, 20 Apr 2014 00:31:37 +0000 Subject: Switch NULL to C++11 nullptr in source/Interpreter Patch by Robert Matusewicz llvm-svn: 206711 --- lldb/source/Interpreter/PythonDataObjects.cpp | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) (limited to 'lldb/source/Interpreter/PythonDataObjects.cpp') diff --git a/lldb/source/Interpreter/PythonDataObjects.cpp b/lldb/source/Interpreter/PythonDataObjects.cpp index 053ff34b9d7..3ea6c0dbe3e 100644 --- a/lldb/source/Interpreter/PythonDataObjects.cpp +++ b/lldb/source/Interpreter/PythonDataObjects.cpp @@ -31,7 +31,7 @@ using namespace lldb; // PythonObject //---------------------------------------------------------------------- PythonObject::PythonObject (const lldb::ScriptInterpreterObjectSP &script_object_sp) : - m_py_obj (NULL) + m_py_obj (nullptr) { if (script_object_sp) Reset ((PyObject *)script_object_sp->GetObject()); @@ -133,8 +133,8 @@ PythonString::Reset (PyObject *py_obj) if (py_obj && PyString_Check(py_obj)) return PythonObject::Reset(py_obj); - PythonObject::Reset(NULL); - return py_obj == NULL; + PythonObject::Reset(nullptr); + return py_obj == nullptr; } const char* @@ -142,7 +142,7 @@ PythonString::GetString() const { if (m_py_obj) return PyString_AsString(m_py_obj); - return NULL; + return nullptr; } size_t @@ -202,8 +202,8 @@ PythonInteger::Reset (PyObject *py_obj) return PythonObject::Reset(py_obj); } - PythonObject::Reset(NULL); - return py_obj == NULL; + PythonObject::Reset(nullptr); + return py_obj == nullptr; } int64_t @@ -230,7 +230,7 @@ PythonInteger::SetInteger (int64_t value) //---------------------------------------------------------------------- PythonList::PythonList (bool create_empty) : - PythonObject(create_empty ? PyList_New(0) : NULL) + PythonObject(create_empty ? PyList_New(0) : nullptr) { } @@ -269,8 +269,8 @@ PythonList::Reset (PyObject *py_obj) if (py_obj && PyList_Check(py_obj)) return PythonObject::Reset(py_obj); - PythonObject::Reset(NULL); - return py_obj == NULL; + PythonObject::Reset(nullptr); + return py_obj == nullptr; } uint32_t @@ -308,7 +308,7 @@ PythonList::AppendItem (const PythonObject &object) //---------------------------------------------------------------------- PythonDictionary::PythonDictionary (bool create_empty) : -PythonObject(create_empty ? PyDict_New() : NULL) +PythonObject(create_empty ? PyDict_New() : nullptr) { } @@ -342,8 +342,8 @@ PythonDictionary::Reset (PyObject *py_obj) if (py_obj && PyDict_Check(py_obj)) return PythonObject::Reset(py_obj); - PythonObject::Reset(NULL); - return py_obj == NULL; + PythonObject::Reset(nullptr); + return py_obj == nullptr; } uint32_t -- cgit v1.2.3