bpo-46481: Implement vectorcall for weakref.ref.__call__ method. (GH-30820)

This commit is contained in:
Dong-hee Na 2022-01-24 00:39:45 +09:00 committed by GitHub
parent 1f715d5bd3
commit 76dc047a0e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 35 additions and 52 deletions

View file

@ -1538,11 +1538,11 @@ class SizeofTest(unittest.TestCase):
# TODO: add check that forces layout of unicodefields
# weakref
import weakref
check(weakref.ref(int), size('2Pn2P'))
check(weakref.ref(int), size('2Pn3P'))
# weakproxy
# XXX
# weakcallableproxy
check(weakref.proxy(int), size('2Pn2P'))
check(weakref.proxy(int), size('2Pn3P'))
def check_slots(self, obj, base, extra):
expected = sys.getsizeof(base) + struct.calcsize(extra)