-
-
Notifications
You must be signed in to change notification settings - Fork 34.7k
gh-145860: Eliminate unnecessary refcount operations in BUILD_INTERPOLATION and BUILD_TEMPLATE #148201
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 our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
gh-145860: Eliminate unnecessary refcount operations in BUILD_INTERPOLATION and BUILD_TEMPLATE #148201
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -17,6 +17,7 @@ extern PyTypeObject _PyTemplateIter_Type; | |
|
|
||
| extern PyObject *_PyTemplate_Concat(PyObject *self, PyObject *other); | ||
|
|
||
| // Steals references to strings and interpolations (even on failure). | ||
| PyAPI_FUNC(PyObject *) _PyTemplate_Build(PyObject *strings, PyObject *interpolations); | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Add "Steal" suffux |
||
|
|
||
| #ifdef __cplusplus | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,4 @@ | ||
| Eliminate unnecessary reference count operations in ``BUILD_INTERPOLATION`` | ||
| and ``BUILD_TEMPLATE`` bytecode instructions by making | ||
| :c:func:`!_PyInterpolation_Build` and :c:func:`!_PyTemplate_Build` steal | ||
| references to their arguments. |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
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.
If a function steals references, we usually add the "Steal" suffix to the name, to make that clear.