-
-
Notifications
You must be signed in to change notification settings - Fork 30.3k
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
gh-98410: move getbufferproc and releasebufferproc to buffer.h #31158
Conversation
17e73b3
to
7c6bb60
Compare
Closing as the buffer protocol is available in 3.11 in Limited C API. |
@kumaraditya303 can I please push for you to consider reopening and reviewing this patch? The point that the buffer protocol is available in 3.11 is exactly why I think this should be merged. As of current 3.11 release on the limited API I can call (And equivalent for |
@davidhewitt Sorry for closing your PR. I reopened it and you are correct that the function typedefs are not exposed. I would suggest you to create issue for this issue to discuss this first, nobody looked at this because no issue was mentioned and there are conflicts and and this can't be fixed in 3.11 as the rc is out and final is about to be released. There are conflicts in this PR, I would suggest you create a new PR with fixed conflicts but it's your choice if you want to continue with this one. |
@kumaraditya303 thanks very much - I have opened #98410 and I'm happy to spend the time to rebase this PR once someone has suggested that a change of this nature would potentially be suitable to merge. |
Thanks for the catch! Let me know if you want more info, or if you'd prefer to leave this to me. |
Thanks - I'll do my best to find a moment to tidy this up tonight! |
7c6bb60
to
a11ce47
Compare
@encukou how does that look? |
75b0e16
to
eae6de2
Compare
eae6de2
to
a768db1
Compare
rebased |
Looks good, thank you!
but with typedefs, we can relax this rule a little: they'll be available to people building for 3.11 using 3.12. |
After #29991 it is possible to set
Py_bf_getbuffer
andPy_bf_releasebuffer
slots from the stable API.This PR moves the corresponding typedefs for the function pointer types corresponding to these slots from
Include/cpython/object.h
to be alongside other typedefs inInclude/pybuffer.h
.This may be useful for users who wish to cast to these function pointer types.
getbufferproc
andreleasebufferproc
to the limited API headers #98410