Mercurial > pytave
changeset 401:3a64a336d214
maint: fix coding style on method declarations
* oct-py-object.h: Insert a line break after the return type and space after
the "operator" keyword in method declarations.
author | Mike Miller <mtmiller@octave.org> |
---|---|
date | Fri, 28 Apr 2017 14:04:58 -0700 |
parents | 6c316b5f30f7 |
children | c4b78e449c62 |
files | oct-py-object.h |
diffstat | 1 files changed, 10 insertions(+), 6 deletions(-) [+] |
line wrap: on
line diff
--- a/oct-py-object.h Fri Apr 28 10:34:18 2017 -0700 +++ b/oct-py-object.h Fri Apr 28 14:04:58 2017 -0700 @@ -21,7 +21,7 @@ */ #if ! defined (pytave_oct_py_object_h) -#define pytave_oct_py_object_h +#define pytave_oct_py_object_h 1 #include <Python.h> @@ -51,7 +51,8 @@ Py_DECREF (pyobj); } - python_object& operator= (const python_object& oth) + python_object& + operator = (const python_object& oth) { if (isowned) Py_DECREF (pyobj); @@ -62,7 +63,8 @@ return *this; } - python_object& operator= (PyObject *obj) + python_object& + operator = (PyObject *obj) { if (isowned) Py_DECREF (pyobj); @@ -78,17 +80,19 @@ return isowned; } - operator PyObject *() + operator PyObject * () { return pyobj; } - bool is_none () + bool + is_none () const { return pyobj && pyobj == Py_None; } - PyObject *release () + PyObject * + release () { isowned = false; PyObject *ret = pyobj;