JSObjectMakeArrayBufferWithBytesNoCopy top-level property

JSObjectRef Function(JSContextRef ctx, Pointer<Void> bytes, int byteLength, Pointer<NativeFunction<JSTypedArrayBytesDeallocator>> bytesDeallocator, Pointer<Void> deallocatorContext, Pointer<JSValueRef> exception) JSObjectMakeArrayBufferWithBytesNoCopy
final

MacOS 10.12, iOS 10.0 Creates a JavaScript Array Buffer object from an existing pointer. ctx The execution context to use. bytes A pointer to the byte buffer to be used as the backing store of the Typed Array object. byteLength The number of bytes pointed to by the parameter bytes. bytesDeallocator The allocator to use to deallocate the external buffer when the Typed Array data object is deallocated. deallocatorContext A pointer to pass back to the deallocator. exception A pointer to a JSValueRef in which to store an exception, if any. Pass NULL if you do not care to store an exception. @result A JSObjectRef Array Buffer whose backing store is the same as the one pointed to by bytes or NULL if there was an error. @discussion If an exception is thrown during this function the bytesDeallocator will always be called.

Implementation

final JSObjectRef Function(
        JSContextRef ctx, Pointer<Void> bytes, int byteLength, Pointer<NativeFunction<JSTypedArrayBytesDeallocator>> bytesDeallocator, Pointer<Void> deallocatorContext, Pointer<JSValueRef> exception)
    JSObjectMakeArrayBufferWithBytesNoCopy = jscLib
        .lookup<
            NativeFunction<
                JSObjectRef Function(JSContextRef ctx, Pointer<Void> bytes, Size byteLength, Pointer<NativeFunction<JSTypedArrayBytesDeallocator>> bytesDeallocator, Pointer<Void> deallocatorContext,
                    Pointer<JSValueRef> exception)>>('JSObjectMakeArrayBufferWithBytesNoCopy')
        .asFunction();