summaryrefslogtreecommitdiff
path: root/Doc/extending/extending.rst
diff options
context:
space:
mode:
authorGeorg Brandl <georg@python.org>2013-10-06 20:46:08 +0200
committerGeorg Brandl <georg@python.org>2013-10-06 20:46:08 +0200
commit5d4ede884991c4b69b89dfc87e0b2e368c83ae91 (patch)
treeabfaea5175ff063adcc3ddf3db66725c81291823 /Doc/extending/extending.rst
parent1f692e23a65162341a8212bfdcae7b0e40ccd5a6 (diff)
downloadcpython-5d4ede884991c4b69b89dfc87e0b2e368c83ae91.tar.gz
Extending example: use Py_RETURN_NONE
Diffstat (limited to 'Doc/extending/extending.rst')
-rw-r--r--Doc/extending/extending.rst4
1 files changed, 1 insertions, 3 deletions
diff --git a/Doc/extending/extending.rst b/Doc/extending/extending.rst
index e7c3f335d2..a559b56748 100644
--- a/Doc/extending/extending.rst
+++ b/Doc/extending/extending.rst
@@ -719,9 +719,7 @@ Philbrick (philbrick@hks.com)::
action, voltage);
printf("-- Lovely plumage, the %s -- It's %s!\n", type, state);
- Py_INCREF(Py_None);
-
- return Py_None;
+ Py_RETURN_NONE;
}
static PyMethodDef keywdarg_methods[] = {