]> granicus.if.org Git - python/commitdiff
Extending example: use Py_RETURN_NONE
authorGeorg Brandl <georg@python.org>
Sun, 6 Oct 2013 18:46:08 +0000 (20:46 +0200)
committerGeorg Brandl <georg@python.org>
Sun, 6 Oct 2013 18:46:08 +0000 (20:46 +0200)
Doc/extending/extending.rst

index e7c3f335d25fc8caec8399e9562d9edaa4d25827..a559b56748ddbb7501b9e3c4b6c406e8fb21e28b 100644 (file)
@@ -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[] = {