Skip to content

Conversation

MightyJosip
Copy link
Member

In #2371 we added support for one liner for setting exception and returning the value from the functions. If the return value is NULL, we have the same support for 10+ years. In this PR I replaced all the calls to PyErr_SetString (and returning the value) with those macros. There is still work to be done with PyErr_Format, but that would make this commit too big, so I will do that in the future.

@MightyJosip MightyJosip requested a review from a team as a code owner June 7, 2025 21:08
Copy link
Member

@ankith26 ankith26 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Overall I really like this idea but I think we should only introduce the macro for the return -1 case. The current raise could remain RAISE as it is a better shorthand.

@ankith26 ankith26 marked this pull request as draft August 17, 2025 17:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants