Skip to content

Commit 0008a10

Browse files
committed
Use Py_RETURN_NONE where suitable
This is more idiomatic style and available as of Python 2.4, which is our minimum.
1 parent 19de0ab commit 0008a10

File tree

3 files changed

+3
-6
lines changed

3 files changed

+3
-6
lines changed

src/pl/plpython/plpy_cursorobject.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -509,6 +509,5 @@ PLy_cursor_close(PyObject *self, PyObject *unused)
509509
cursor->closed = true;
510510
}
511511

512-
Py_INCREF(Py_None);
513-
return Py_None;
512+
Py_RETURN_NONE;
514513
}

src/pl/plpython/plpy_plpymodule.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -575,6 +575,5 @@ PLy_output(volatile int level, PyObject *self, PyObject *args, PyObject *kw)
575575
/*
576576
* return a legal object so the interpreter will continue on its merry way
577577
*/
578-
Py_INCREF(Py_None);
579-
return Py_None;
578+
Py_RETURN_NONE;
580579
}

src/pl/plpython/plpy_subxactobject.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -212,6 +212,5 @@ PLy_subtransaction_exit(PyObject *self, PyObject *args)
212212
CurrentResourceOwner = subxactdata->oldowner;
213213
pfree(subxactdata);
214214

215-
Py_INCREF(Py_None);
216-
return Py_None;
215+
Py_RETURN_NONE;
217216
}

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy