Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use new string APIs and add memory safety for PyWinObject_AsPARAM #1927

Merged
merged 1 commit into from
Aug 22, 2022

Conversation

mhammond
Copy link
Owner

This shamelessly steals the PARAM handling from @kxrob's #1860 - renamed and reformatted etc, but I Think this looks good.

@mhammond mhammond requested a review from kxrob August 14, 2022 07:15
@kxrob
Copy link
Collaborator

kxrob commented Aug 14, 2022

I cherry-picked my corresponding previous draft patch (and an old pending fixup) on the parent of this PR to see the effective diff:
The new extra PyWinObject_AsSimplePARAM in those ~5 locations are more clear, faster. (The old specific error messages are not necessary.)
The PyWin_PARAMHolder now also can hold a PyWinBufferView from AsPARAM(). See extra review comment regarding potential speed issue.
Otherwise it seems mostly alike and looks good to me.

The first Py3.12 alpha should appear in October on github for testing the #1860 deprecation replacements fully - the PR coverage should be mostly complete.

@mhammond
Copy link
Owner Author

Thanks for the review!

@mhammond mhammond merged commit 39e09b6 into main Aug 22, 2022
@mhammond mhammond deleted the PyWin_PARAMHolder branch August 22, 2022 07:29
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