Back to index

python3.2  3.2.2
Public Member Functions
ctypes.test.test_keeprefs.ArrayTestCase Class Reference

List of all members.

Public Member Functions

def test_cint_array

Detailed Description

Definition at line 67 of file test_keeprefs.py.


Member Function Documentation

Definition at line 68 of file test_keeprefs.py.

00068 
00069     def test_cint_array(self):
00070         INTARR = c_int * 3
00071 
00072         ia = INTARR()
00073         self.assertEqual(ia._objects, None)
00074         ia[0] = 1
00075         ia[1] = 2
00076         ia[2] = 3
00077         self.assertEqual(ia._objects, None)
00078 
00079         class X(Structure):
00080             _fields_ = [("x", c_int),
00081                         ("a", INTARR)]
00082 
00083         x = X()
00084         x.x = 1000
00085         x.a[0] = 42
00086         x.a[1] = 96
00087         self.assertEqual(x._objects, None)
00088         x.a = ia
00089         self.assertEqual(x._objects, {'1': {}})

Here is the call graph for this function:


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