Back to index

python3.2  3.2.2
Classes | Functions | Variables
ctypes.test.test_prototypes Namespace Reference

Classes

class  CharPointersTestCase
class  WCharPointersTestCase
class  ArrayTest

Functions

def positive_address
def c_wbuffer

Variables

tuple testdll = CDLL(_ctypes_test.__file__)

Function Documentation

Definition at line 40 of file test_prototypes.py.

00040 
00041 def c_wbuffer(init):
00042     n = len(init) + 1
00043     return (c_wchar * n)(*init)

Here is the caller graph for this function:

Definition at line 30 of file test_prototypes.py.

00030 
00031 def positive_address(a):
00032     if a >= 0:
00033         return a
00034     # View the bits in `a` as unsigned instead.
00035     import struct
00036     num_bits = struct.calcsize("P") * 8 # num bits in native machine address
00037     a += 1 << num_bits
00038     assert a >= 0
00039     return a

Here is the caller graph for this function:


Variable Documentation

tuple ctypes.test.test_prototypes.testdll = CDLL(_ctypes_test.__file__)

Definition at line 25 of file test_prototypes.py.