On success, return ``0``. On error, raise an exception and return ``-1``.
- Return ``-1`` if *value* is ``NULL``. It must be called with an exception
- raised in this case.
-
Example usage::
static int
return res;
}
+ To be convenient, the function accepts ``NULL`` *value* with an exception
+ set. In this case, return ``-1`` and just leave the raised exception
+ unchanged.
+
The example can also be written without checking explicitly if *obj* is
``NULL``::