Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit0008a10

Browse files
committed
Use Py_RETURN_NONE where suitable
This is more idiomatic style and available as of Python 2.4, which isour minimum.
1 parent19de0ab commit0008a10

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-
returnPy_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-
returnPy_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-
returnPy_None;
215+
Py_RETURN_NONE;
217216
}

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp