docs: fix error condition in custom type caster example

This commit is contained in:
gschnabel 2024-10-21 14:20:25 +02:00
parent f7e14e985b
commit 4f75726251

View File

@ -64,7 +64,7 @@ type is explicitly allowed.
value.long_value = PyLong_AsLong(tmp); value.long_value = PyLong_AsLong(tmp);
Py_DECREF(tmp); Py_DECREF(tmp);
/* Ensure return code was OK (to avoid out-of-range errors etc) */ /* Ensure return code was OK (to avoid out-of-range errors etc) */
return !(value.long_value == -1 && !PyErr_Occurred()); return !(value.long_value == -1 && PyErr_Occurred());
} }
/** /**