mirror of
https://github.com/python/cpython.git
synced 2025-11-02 06:31:29 +00:00
[3.14] gh-139525: Don't specialize functions which have a modified vectorcall (GH-139524) (#139709)
Don't specialize functions which have a modified vectorcall
This commit is contained in:
parent
1c1a0bdfdc
commit
81dc8b12f0
3 changed files with 37 additions and 0 deletions
|
|
@ -567,6 +567,14 @@ def test(default=None):
|
|||
with self.assertRaises(RecursionError):
|
||||
test()
|
||||
|
||||
def test_dont_specialize_custom_vectorcall(self):
|
||||
def f():
|
||||
raise Exception("no way")
|
||||
|
||||
_testinternalcapi.set_vectorcall_nop(f)
|
||||
for _ in range(_testinternalcapi.SPECIALIZATION_THRESHOLD):
|
||||
f()
|
||||
|
||||
|
||||
def make_deferred_ref_count_obj():
|
||||
"""Create an object that uses deferred reference counting.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue