node-ctypes - v2.17.1
    Preparing search index...

    Class Array

    Abstract base of the array types (Python ctypes.Array; not the native ArrayType). Importing it as Array shadows the global Array in that module (import { Array as CArray } from "node-ctypes" avoids it).

    class T extends Array { static _type_ = c_int; static _length_ = 13 } is an array type with the layout of ARRAY(c_int, 13), built when the class is first used (CPython: when it is defined): then a missing _length_ / _type_ throws AttributeError class must define a '_length_' attribute, a non-integer _length_ TypeError, a negative or unsafe one RangeError. new T(...elements) returns its array instance (instanceof T, the methods of T). x instanceof Array holds for every ctypes array; the base itself has no instances (TypeError abstract class).

    Indexable

    • [index: number]: any
    Index
    length: number

    Number of elements.

    _type_: any
    _length_: number
    _buffer: Buffer
    __pointer_type__?: PointerTypeDef<any>

    Python 3.14 T.__pointer_type__: the type POINTER(T) returns (undefined before the first POINTER(T)).

    • Parameters

      • value: unknown

      Returns any

    • Parameters

      • source: ArrayBufferView<ArrayBufferLike> | { _buffer: Buffer }
      • Optionaloffset: BufferOffset

      Returns any

    • Parameters

      • source: ReadonlyMemoryView | ArrayBufferView<ArrayBufferLike> | { _buffer: Buffer }
      • Optionaloffset: BufferOffset

      Returns any

    • Parameters

      • address: number | bigint

      Returns any