Create an array initialized with the given elements (Python: (c_int * 3)(1, 2, 3)).
Create an array initialized with the given elements.
ReadonlyelementElement type.
ReadonlylengthNumber of elements.
Readonly_Python ctypes alias for the element type.
Readonly_Python ctypes alias for the element count.
Optional__Python 3.14 T.__pointer_type__: the type POINTER(T) returns (undefined before the first POINTER(T)).
CPython from_param: an instance of this array type (or an object whose
_as_parameter_ is one) is returned; other values throw TypeError
expected <name> instance instead of <type>.
Total size in bytes (elementSize * length).
Number of elements.
Element alignment.
Create a new array, optionally initialized with values (a string writes its char codes). Returns a Proxy with index access.
Optionalvalues: string | readonly ArrayElementArg<E>[]Wrap an existing buffer as an array with index access.
Array sharing the memory of source from offset (Python:
(c_int * 3).from_buffer(source, offset)). A negative offset throws
RangeError offset cannot be negative, a short source RangeError
Buffer size too small (N instead of at least M bytes).
Optionaloffset: BufferOffsetArray with a copy of the bytes of source from offset (Python: from_buffer_copy).
Optionaloffset: BufferOffsetArray on the memory at address (Python: (c_int * 3).from_address(address)).
Its _buffer is a Buffer over that memory, as Python's
memoryview((c_char * n).from_address(address)); where
EXTERNAL_BUFFERS is false it is a copy kept in sync by the
array's element accesses.
Array on the exported variable name (Python: (c_int * 3).in_dll(lib, name)).
A missing symbol throws RangeError symbol 'name' not found.
An array type definition created by the array function.
Python equivalent:
c_int * 5. Call it (with or withoutnew) with the initial elements, as Python's(c_int * 5)(1, 2, 3).Example