8000
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 6186021 commit a764546Copy full SHA for a764546
Doc/c-api/module.rst
@@ -496,9 +496,6 @@ state:
496
497
On success, return ``0``. On error, raise an exception and return ``-1``.
498
499
- Return ``-1`` if *value* is ``NULL``. It must be called with an exception
500
- raised in this case.
501
-
502
Example usage::
503
504
static int
@@ -513,6 +510,10 @@ state:
513
510
return res;
514
511
}
515
512
+ To be convenient, the function accepts ``NULL`` *value* with an exception
+ set. In this case, return ``-1`` and just leave the raised exception
+ unchanged.
516
+
517
The example can also be written without checking explicitly if *obj* is
518
``NULL``::
519
0 commit comments