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

@@ -9514,7 +9514,7 @@ super_init_without_args(_PyInterpreterFrame *cframe, PyCodeObject *co,

// Look for __class__ in the free vars.
PyTypeObject *type = NULL;
int i =co->co_nlocals + co->co_nplaincellvars;
int i =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
@@ -1119,7 +1119,7 @@ frame_init_get_vars(_PyInterpreterFrame *frame)

/* Free vars have not been initialized -- Do that */
PyObject *closure = ((PyFunctionObject *)frame->f_funcobj)->func_closure;
int offset =co->co_nlocals + co->co_nplaincellvars;
int offset =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?

@@ -2260,7 +2260,7 @@ compiler_make_closure(struct compiler *c, location loc,
qualname = co->co_name;

if (co->co_nfreevars) {
int i =co->co_nlocals + co->co_nplaincellvars;
int i =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

@obatakuobatakuobataku left review comments

@iritkatrieliritkatrieliritkatriel approved these changes

@ericsnowcurrentlyericsnowcurrentlyAwaiting requested review from ericsnowcurrentlyericsnowcurrently is a code owner

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