about summary refs log blame commit diff stats
path: root/src/js/arraybuffer.nim
blob: ff9fa24de6a858f793d400880bf710ecf8e4286d (plain) (tree)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18

















                                             
import bindings/quickjs

type
  JSArrayBuffer* = object
    p*: ptr UncheckedArray[uint8]
    len*: csize_t
    dealloc*: JSFreeArrayBufferDataFunc

  JSArrayBufferView* = object
    abuf*: JSArrayBuffer
    offset*: csize_t # offset into the buffer
    nmemb*: csize_t # number of members
    nsize*: csize_t # member size

  JSUint8Array* = object
    abuf*: JSArrayBuffer
    offset*: csize_t # offset into the buffer
    nmemb*: csize_t # number of members