Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork32k
GH-133372: C implementation of types._GeneratorWrapper is added.#133373
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
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.
I don't think this should go in the generator object implementation._types
should implement it on its own.
Py_CLEAR(gw->gw_gen); | ||
Py_CLEAR(gw->gw_name); | ||
Py_CLEAR(gw->gw_qualname); | ||
if (gw->gw_weakreflist != NULL) |
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.
Per PEP 7, allif
clauses are supposed to have braces.
"__name__ must be set to a string object"); | ||
return -1; | ||
} | ||
Py_XSETREF(gw->gw_name, Py_NewRef(value)); |
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.
We need a critical section if we're going to modify this in methods.
efimov-mikhailMay 9, 2025 • 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.
Could you please give me some additional context on it?
I've just copied this code fromgen_set_name
function.
Does this mean that critical section is also needed in that func?
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.
I close this because of#134563 |
Uh oh!
There was an error while loading.Please reload this page.