Skip to content

Commit

Permalink
docs: fix error condition in custom type caster example
Browse files Browse the repository at this point in the history
  • Loading branch information
gschnabel committed Oct 21, 2024
1 parent f7e14e9 commit 4f75726
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion docs/advanced/cast/custom.rst
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ type is explicitly allowed.
value.long_value = PyLong_AsLong(tmp);
Py_DECREF(tmp);
/* 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());
}
/**
Expand Down

0 comments on commit 4f75726

Please sign in to comment.