-
-
Notifications
You must be signed in to change notification settings - Fork 32k
gh-115653: Add docs for the PyCode_GetFirstFree and correct return type for the PyCode_GetNumFree #115654
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-115653: Add docs for the PyCode_GetFirstFree and correct return type for the PyCode_GetNumFree #115654
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
|
@@ -30,9 +30,13 @@ bound into a function. | |||||
Return true if *co* is a :ref:`code object <code-objects>`. | ||||||
This function always succeeds. | ||||||
|
||||||
.. c:function:: int PyCode_GetNumFree(PyCodeObject *co) | ||||||
.. c:function:: Py_ssize_t PyCode_GetNumFree(PyCodeObject *co) | ||||||
|
||||||
Return the number of free variables in *co*. | ||||||
Return the number of free variables in a code object. | ||||||
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. @vstinner, I think this is the suggested style:
Suggested change
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. Ah, I just merged the change. Is it worth it to change the style, or is it ok to merge PR gh-115752 backport? I let you decide :-) 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. No, it's not worth it to change the style, but I think we should try to keep it in mind for next time ;) |
||||||
|
||||||
.. c:function:: int PyCode_GetFirstFree(PyCodeObject *co) | ||||||
|
||||||
Return the position of the first free variable in a code object. | ||||||
erlend-aasland marked this conversation as resolved.
Show resolved
Hide resolved
|
||||||
|
||||||
.. c:function:: PyCodeObject* PyUnstable_Code_New(int argcount, int kwonlyargcount, int nlocals, int stacksize, int flags, PyObject *code, PyObject *consts, PyObject *names, PyObject *varnames, PyObject *freevars, PyObject *cellvars, PyObject *filename, PyObject *name, PyObject *qualname, int firstlineno, PyObject *linetable, PyObject *exceptiontable) | ||||||
|
||||||
|
Uh oh!
There was an error while loading. Please reload this page.