Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
vstinner merged 4 commits intopython:mainfromwrongnull:patch-3
Feb 21, 2024
Merged
Changes fromall commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletionsDoc/c-api/code.rst
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -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.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

@vstinner, I think this is the suggested style:

Suggested change
Return the number of free variables inacode object.
Return the number of free variables in code object *co*.

Copy link
Member

Choose a reason for hiding this comment

The 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 PRgh-115752 backport? I let you decide :-)

Copy link
Contributor

Choose a reason for hiding this comment

The 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 ;)

Eclips4 reacted with thumbs up emoji

.. c:function:: int PyCode_GetFirstFree(PyCodeObject *co)

Return the position of the first free variable in a code object.

.. 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)

Expand Down

[8]ページ先頭

©2009-2025 Movatter.jp