PyDocs

Nav

Generic Operating System Services

_CData

ctypes

class
This non-public class is the common base class of all ctypes data types. Among other things, all ctypes type instances contain a memory block that hold C compatible data; the address of the memory block is returned by the addressof() helper function. Another instance variable is exposed as _objects; this contains other Python objects that need to be kept alive in case the memory block contains pointers.
Members of _CData

_

__pointer_type__
The pointer type that was created by calling POINTER() for corresponding ctypes data type.
_b_base_
Sometimes ctypes data instances do not own the memory block they contain, instead they share part of the memory block of a base object.
_b_needsfree_
This read-only variable is true when the ctypes data instance has allocated the memory block itself, false otherwise.
_objects
This member is either None or a dictionary containing Python objects that need to be kept alive so that the memory block contents is kept valid.

f

from_address
This method returns a ctypes type instance using the memory specified by address which must be an integer.
from_buffer
This method returns a ctypes instance that shares the buffer of the source object.
from_buffer_copy
This method creates a ctypes instance, copying the buffer from the source object buffer which must be readable.
from_param
This method adapts obj to a ctypes type.

i

in_dll
This method returns a ctypes type instance exported by a shared library.
0 Examples
No examples for ctypes/_CData.
See Also
No see-alsos for ctypes/_CData
0 Notes
No notes for _CData