gh-90370: avoid temporary tuple creation for vararg in AC by skirpichev · Pull Request #126064 · python/cpython · GitHub
Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
48 changes: 21 additions & 27 deletions Lib/test/clinic.test.c
4 changes: 2 additions & 2 deletions Lib/test/test_clinic.py
Original file line number Diff line number Diff line change
Expand Up @@ -3381,8 +3381,8 @@ def test_keyword_only_parameter(self):
def test_varpos(self):
# fn(*args)
fn = ac_tester.varpos
self.assertEqual(fn(), ())
self.assertEqual(fn(1, 2), (1, 2))
self.assertEqual(fn(), ((),))
self.assertEqual(fn(1, 2), ((1, 2),))

def test_posonly_varpos(self):
# fn(a, b, /, *args)
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
Avoid temporary tuple creation for vararg in argument passing with Argument
Clinic generated code (if arguments either vararg or positional-only).
43 changes: 35 additions & 8 deletions Modules/_testclinic.c
51 changes: 17 additions & 34 deletions Modules/clinic/_testclinic.c.h

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

36 changes: 13 additions & 23 deletions Modules/clinic/gcmodule.c.h

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

Loading