Uh oh!
There was an error while loading. Please reload this page.
gh-135755: Document the new PyFunction_GET_BUILTINS macro - #135934
gh-135755: Document the new PyFunction_GET_BUILTINS macro#135934ZeroIntensity wants to merge 2 commits into
PyFunction_GET_BUILTINS macro#135934Conversation
| This function cannot fail and does not do error checking; passing anything | ||
| other than an instance of :c:data:`PyFunction_Type` is undefined behavior. | ||
| There is no ``PyFunction_Get*`` equivalent for this function. |
There was a problem hiding this comment.
Hm, I don't think C API WG would approve.
Should this function be in a private header (and with an underscore) instead? It looks untested as well.
There was a problem hiding this comment.
It's sort of tested. I'm not opposed to making it private.
There was a problem hiding this comment.
That looks like it's used in a test -- the test assumes that it's working?
Yeah, the more I look into it, the better making it private seems.
cc @ericsnowcurrently, who added PyFunction_GET_BUILTINS in #133128
There was a problem hiding this comment.
I'll put up an alternate PR.
There was a problem hiding this comment.
FWIW, I agree with making it internal-only.
encukou
commented
Jun 26, 2025
Superseded by #135938 |
📚 Documentation preview 📚: https://cpython-previews--135934.org.readthedocs.build/