Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork32.2k
gh-135755: Document the newPyFunction_GET_BUILTINS
macro#135934
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Uh oh!
There was an error while loading.Please reload this page.
Changes fromall commits
File filter
Filter by extension
Conversations
Uh oh!
There was an error while loading.Please reload this page.
Jump to
Uh oh!
There was an error while loading.Please reload this page.
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -142,6 +142,16 @@ There are a few functions specific to Python functions. | ||
do not do type checking. Passing anything other than an instance of | ||
:c:data:`PyFunction_Type` is undefined behavior. | ||
.. c:function:: PyObject *PyFunction_GET_BUILTINS(PyObject *op) | ||
Return the dictionary used to look up builtins (which might be ``NULL``) | ||
when calling function *op*. | ||
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. | ||
Comment on lines +150 to +152 There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others.Learn more. Hm, I don't think C API WG would approve. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others.Learn more. It'ssort of tested. I'm not opposed to making it private. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others.Learn more. That looks like it's used in a test -- the test assumes that it's working? cc@ericsnowcurrently, who added There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others.Learn more. I'll put up an alternate PR. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others.Learn more. FWIW, I agree with making it internal-only. | ||
.. versionadded 3.14 | ||
.. c:function:: int PyFunction_AddWatcher(PyFunction_WatchCallback callback) | ||
Uh oh!
There was an error while loading.Please reload this page.