Skip to content

Add missing error handling for PyModule_FromSlotsAndSpec#5915

Merged
ngoldbaum merged 1 commit intoPyO3:mainfrom
ngoldbaum:missing-error-handling
Mar 26, 2026
Merged

Add missing error handling for PyModule_FromSlotsAndSpec#5915
ngoldbaum merged 1 commit intoPyO3:mainfrom
ngoldbaum:missing-error-handling

Conversation

@ngoldbaum
Copy link
Copy Markdown
Contributor

Currently, we call PyModule_SetDocString without doing any error handling on the result of PyModule_FromSlotsAndSpec. It had been a while since I wrote code dealing with raw FFI pointers when I wrote this and then it got missed in review during review of #5753. I don't think there are any other raw FFI calls where I made a similar mistake in that PR.

@ngoldbaum ngoldbaum added the CI-skip-changelog Skip checking changelog entry label Mar 26, 2026
@ngoldbaum ngoldbaum added this pull request to the merge queue Mar 26, 2026
Merged via the queue into PyO3:main with commit 68b719f Mar 26, 2026
47 checks passed
@ngoldbaum ngoldbaum deleted the missing-error-handling branch March 26, 2026 21:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CI-skip-changelog Skip checking changelog entry

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants