Python LP() / LP(obj): a NULL pointer, or a pointer to a ctypes
instance (a pointer instance is pointed at through its slot).
p instanceof LP holds for the instances of this type. The type can also
be called without new (LP(obj)); only the construct signature is
declared, so that [POINTER(T)] keeps the inference of callback argument types.
Optionalvalue: PointerConstructTargetReadonlynamePython type name (LP_c_int32).
ReadonlyprototypeReadonly_The resolved base type, including for lazy pointer declarations; null for an incomplete POINTER('Name') type.
Readonly_Python ctypes alias for the resolved base type (undefined for an incomplete type).
Optional__Python 3.14 T.__pointer_type__: the type POINTER(T) returns for this pointer type (undefined before the first one).
Readonly_Size of the pointed-to type.
ReadonlysizePointer size (always 8 on 64-bit).
Python Pointer.from_param: null, a compatible pointer or array,
byref() of a compatible instance, or an instance of the pointee type
(passed by reference); otherwise a TypeError.
Python P.set_type(T): completes an incomplete POINTER('Name') type,
or retargets this pointer type (its existing pointers included).
T.__pointer_type__ is set only when T has none. A value that is not a
ctypes type is a TypeError (_type_ must be a type).
Create a pointer: NULL without an argument (or with null), to a ctypes
instance or Buffer, or to a raw address (Number/BigInt, a Node extension
kept from 2.x; Python's constructor takes no address).
Optionalvalue: number | bigint | PointerTargetInstanceCreate a pointer from an existing buffer (points to that buffer's memory).
Buffer to point to
Create a pointer from a raw memory address.
Use this to create typed access to native memory, especially useful with
c_void_p struct fields that point to arrays of structs.
Memory address as BigInt or number
Python POINTER(T).from_buffer(source, offset): a pointer whose own slot
(the void * value) is the memory of source at offset, so writing
.contents updates source (unlike fromBuffer, which points to
the Buffer). A short source throws RangeError
Buffer size too small (N instead of at least M bytes).
Optionaloffset: number | booleanPython POINTER(T).from_buffer_copy(source, offset): a pointer whose slot is a copy of the pointer value in source.
Optionaloffset: number | booleanPython POINTER(T).from_address(address): the pointer stored at
address (unlike fromAddress, which points to address).
Python POINTER(T).in_dll(lib, name): the exported pointer variable
name. A missing symbol throws RangeError symbol 'name' not found.
A pointer type created by POINTER.
Example