1
0
mirror of https://github.com/postgres/postgres.git synced 2025-06-08 22:02:03 +03:00

Use Py_RETURN_NONE where suitable

This is more idiomatic style and available as of Python 2.4, which is
our minimum.
This commit is contained in:
Peter Eisentraut 2017-09-29 16:50:01 -04:00
parent 19de0ab23c
commit 0008a106d4
3 changed files with 3 additions and 6 deletions

View File

@ -509,6 +509,5 @@ PLy_cursor_close(PyObject *self, PyObject *unused)
cursor->closed = true; cursor->closed = true;
} }
Py_INCREF(Py_None); Py_RETURN_NONE;
return Py_None;
} }

View File

@ -575,6 +575,5 @@ PLy_output(volatile int level, PyObject *self, PyObject *args, PyObject *kw)
/* /*
* return a legal object so the interpreter will continue on its merry way * return a legal object so the interpreter will continue on its merry way
*/ */
Py_INCREF(Py_None); Py_RETURN_NONE;
return Py_None;
} }

View File

@ -212,6 +212,5 @@ PLy_subtransaction_exit(PyObject *self, PyObject *args)
CurrentResourceOwner = subxactdata->oldowner; CurrentResourceOwner = subxactdata->oldowner;
pfree(subxactdata); pfree(subxactdata);
Py_INCREF(Py_None); Py_RETURN_NONE;
return Py_None;
} }