Mercurial > pytave
diff __py_struct_from_dict__.cc @ 403:3644df6564bc
maint: use C++11 nullptr rather than 0 or NULL
* __py_struct_from_dict__.cc, oct-py-eval.cc, oct-py-eval.h, oct-py-object.h,
oct-py-types.cc, oct-py-util.cc, pycall.cc, pyeval.cc, pyexec.cc: Use C++11
nullptr rather than 0 or NULL.
author | Mike Miller <mtmiller@octave.org> |
---|---|
date | Fri, 28 Apr 2017 14:19:49 -0700 |
parents | 668fcb0f68ef |
children | aef165ff92b0 |
line wrap: on
line diff
--- a/__py_struct_from_dict__.cc Fri Apr 28 14:07:57 2017 -0700 +++ b/__py_struct_from_dict__.cc Fri Apr 28 14:19:49 2017 -0700 @@ -323,7 +323,7 @@ boost::python::numeric::array::set_module_and_type ("numpy", "ndarray"); _import_array (); // FIXME: PyObject *obj = convert argument to Python (args(0)); - PyObject *obj = 0; + PyObject *obj = nullptr; try { boost::python::object arg; @@ -368,7 +368,7 @@ if (PyBytes_Check (obj) || PyUnicode_Check (obj)) str = pytave::extract_py_str (obj); - else if (Py_TYPE (obj)->tp_str != NULL) + else if (Py_TYPE (obj)->tp_str != nullptr) { PyObject *s = PyObject_Str (obj); str = pytave::extract_py_str (s);