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-100719: Remove theco_nplaincellvars field from code objects.#100721

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
markshannon merged 4 commits intopython:mainfromfaster-cpython:trim-code-object
Jan 4, 2023

Conversation

@markshannon
Copy link
Member

@markshannonmarkshannon commentedJan 3, 2023
edited by bedevere-bot
Loading

// Look for __class__ in the free vars.
PyTypeObject*type=NULL;
inti=co->co_nlocals+co->co_nplaincellvars;
inti=PyCode_GetFirstFree(co);
Copy link
Member

Choose a reason for hiding this comment

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

Py_ssize_t?

Copy link
MemberAuthor

@markshannonmarkshannonJan 4, 2023
edited
Loading

Choose a reason for hiding this comment

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

This should be an int. I'll changePyCode_GetFirstFree.

Choose a reason for hiding this comment

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

@markshannon why should it beint?

wrongnull reacted with thumbs up emoji
/* Free vars have not been initialized -- Do that */
PyObject*closure= ((PyFunctionObject*)frame->f_funcobj)->func_closure;
intoffset=co->co_nlocals+co->co_nplaincellvars;
intoffset=PyCode_GetFirstFree(co);
Copy link
Member

Choose a reason for hiding this comment

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

Py_ssize_t?


if (co->co_nfreevars) {
inti=co->co_nlocals+co->co_nplaincellvars;
inti=PyCode_GetFirstFree(co);
Copy link
Member

Choose a reason for hiding this comment

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

Py_ssize_t?

Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

@iritkatrieliritkatrieliritkatriel approved these changes

@ericsnowcurrentlyericsnowcurrentlyAwaiting requested review from ericsnowcurrentlyericsnowcurrently is a code owner

+1 more reviewer

@obatakuobatakuobataku left review comments

Reviewers whose approvals may not affect merge requirements

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

4 participants

@markshannon@iritkatriel@obataku@bedevere-bot

[8]ページ先頭

©2009-2025 Movatter.jp