Skip to content

Commit

Permalink
Remove optimization for single var-positional parameter.
Browse files Browse the repository at this point in the history
  • Loading branch information
serhiy-storchaka committed Aug 13, 2024
1 parent 7b54189 commit a9396c4
Show file tree
Hide file tree
Showing 8 changed files with 257 additions and 57 deletions.
2 changes: 1 addition & 1 deletion Lib/test/test_clinic.py
Original file line number Diff line number Diff line change
Expand Up @@ -2694,7 +2694,7 @@ def test_cli_force(self):
# Verify by checking the checksum.
checksum = (
"/*[clinic end generated code: "
"output=843576e3ffe85e2d input=9543a8d2da235301]*/\n"
"output=0acbef4794cb933e input=9543a8d2da235301]*/\n"
)
with open(fn, encoding='utf-8') as f:
generated = f.read()
Expand Down
8 changes: 4 additions & 4 deletions Modules/_testclinic.c
Original file line number Diff line number Diff line change
Expand Up @@ -970,8 +970,8 @@ varpos
[clinic start generated code]*/

static PyObject *
varpos(PyObject *module, PyObject *args)
/*[clinic end generated code: output=174bb88a5a80ed51 input=f87cd674145d394c]*/
varpos_impl(PyObject *module, PyObject *args)
/*[clinic end generated code: output=7b0b9545872bdca4 input=f87cd674145d394c]*/
{
return Py_NewRef(args);
}
Expand Down Expand Up @@ -1176,8 +1176,8 @@ Proof-of-concept of GH-99233 refcount error bug.
[clinic start generated code]*/

static PyObject *
gh_99233_refcount(PyObject *module, PyObject *args)
/*[clinic end generated code: output=4a8facb62b9a98bb input=eecfdc2092d90dc3]*/
gh_99233_refcount_impl(PyObject *module, PyObject *args)
/*[clinic end generated code: output=585855abfbca9a7f input=eecfdc2092d90dc3]*/
{
Py_RETURN_NONE;
}
Expand Down
50 changes: 47 additions & 3 deletions Modules/clinic/_testclinic.c.h

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

51 changes: 48 additions & 3 deletions Modules/clinic/gcmodule.c.h

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 4 additions & 4 deletions Modules/gcmodule.c
Original file line number Diff line number Diff line change
Expand Up @@ -221,8 +221,8 @@ Return the list of objects that directly refer to any of 'objs'.
[clinic start generated code]*/

static PyObject *
gc_get_referrers(PyObject *module, PyObject *args)
/*[clinic end generated code: output=e11e352b7e0cdce0 input=bae96961b14a0922]*/
gc_get_referrers_impl(PyObject *module, PyObject *args)
/*[clinic end generated code: output=296a09587f6a86b5 input=bae96961b14a0922]*/
{
if (PySys_Audit("gc.get_referrers", "(O)", args) < 0) {
return NULL;
Expand Down Expand Up @@ -269,8 +269,8 @@ Return the list of objects that are directly referred to by 'objs'.
[clinic start generated code]*/

static PyObject *
gc_get_referents(PyObject *module, PyObject *args)
/*[clinic end generated code: output=9efb544e74953e38 input=b3ceab0c34038cbf]*/
gc_get_referents_impl(PyObject *module, PyObject *args)
/*[clinic end generated code: output=d47dc02cefd06fe8 input=b3ceab0c34038cbf]*/
{
if (PySys_Audit("gc.get_referents", "(O)", args) < 0) {
return NULL;
Expand Down
147 changes: 140 additions & 7 deletions Objects/clinic/setobject.c.h

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit a9396c4

Please sign in to comment.