We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 611f1b6 commit fb17c68Copy full SHA for fb17c68
Lib/test/test_ctypes/test_refcounts.py
@@ -99,15 +99,14 @@ def func(a, b):
99
100
@support.refcount_test
101
def test_callback_py_object_none_return(self):
102
- """Test that returning ``None`` from a ``py_object`` callback
103
- does not affect ``None``'s refcount (bpo-36880)."""
+ # bpo-36880: test that returning None from a py_object callback
+ # does not decrement the refcount of None.
104
105
import sys
106
107
for FUNCTYPE in (ctypes.CFUNCTYPE, ctypes.PYFUNCTYPE):
108
with self.subTest(FUNCTYPE=FUNCTYPE):
109
- proto = FUNCTYPE(ctypes.py_object)
110
- @proto
+ @FUNCTYPE(ctypes.py_object)
111
def func():
112
return None
113
0 commit comments