summaryrefslogtreecommitdiff
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
commita072de14be1e8cd992404f300f0104fccedecaa9 (patch)
treeb498843500bf4ad8c077eea257f5768f49452f96
parent29fc4bf5c7b54bcbebd0f41796a2a28c3dc56d79 (diff)
downloadcpython-git-a072de14be1e8cd992404f300f0104fccedecaa9.tar.gz
Extending example: use Py_RETURN_NONE
-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[] = {