Back to index

python3.2  3.2.2
Public Member Functions
ctypes.test.test_refcounts.AnotherLeak Class Reference

List of all members.

Public Member Functions

def test_callback

Detailed Description

Definition at line 84 of file test_refcounts.py.


Member Function Documentation

Definition at line 85 of file test_refcounts.py.

00085 
00086     def test_callback(self):
00087         import sys
00088 
00089         proto = ctypes.CFUNCTYPE(ctypes.c_int, ctypes.c_int, ctypes.c_int)
00090         def func(a, b):
00091             return a * b * 2
00092         f = proto(func)
00093 
00094         a = sys.getrefcount(ctypes.c_int)
00095         f(1, 2)
00096         self.assertEqual(sys.getrefcount(ctypes.c_int), a)

Here is the call graph for this function:


The documentation for this class was generated from the following file: