Debian Codegraph @

cpython27/Lib/test/leakers/test_ctypes.py

raw symbols SCIP
1
2 # Taken from Lib/ctypes/test/test_keeprefs.py, PointerToStructure.test().
3
4 from ctypes import Structure, c_int, POINTER
5 import gc
6
7 def leak_inner():
8 class POINT(Structure):
9 _fields_ = [("x", c_int)]
10 class RECT(Structure):
11 _fields_ = [("a", POINTER(POINT))]
12
13 def leak():
14 leak_inner()
15 gc.collect()