-
-
Notifications
You must be signed in to change notification settings - Fork 7.9k
Use pybind11 in _c_internal_utils module #26794
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
Conversation
6270f03
to
0fca6f9
Compare
0fca6f9
to
79c080b
Compare
I think changing to a capsule is a good idea (maybe we want an API change note?). I lean to leaving the name. Even though it is cpp, Python still calls them "C-extensions" so being a bit imprecise and leaving the name as |
It is private at least, so no need? |
79c080b
to
bdcff91
Compare
This requires a minor bit of typecasting as in the `_tkagg.cpp` file. This is a separate commit from the pybind11 change to improve rename detection.
bdcff91
to
a567006
Compare
a567006
to
f33f6cf
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd be inclined to remove the 4 uses of void
in function argument lists now that these functions are C++ rather than C, but I don't feel strongly about this.
Let's merge this and the voids can possibly be handled later. |
PR summary
I changed to a C++ file, in order to use pybind11, though I'm not sure if the name should change. I also made the
HWND
into a capsule so we could check types a bit more stringently, though this is assuming no-one ever wants to callSetForegroundWindow
with a handle obtained elsewhere.This depends on the Meson PR, as it was much easier to iterate with its automatic re-compile in editable installs.
PR checklist