Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork32.1k
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
Uh oh!
There was an error while loading.Please reload this page.
Conversation
@@ -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); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
Py_ssize_t?
markshannonJan 4, 2023 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
There was a problem hiding this comment.
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
.
There was a problem hiding this comment.
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
?
@@ -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); |
There was a problem hiding this comment.
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); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
Py_ssize_t?
Uh oh!
There was an error while loading.Please reload this page.
Removes a redundant field