2021-11-03 18:15:46 -04:00
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include "quickjs.h"
|
|
|
|
|
|
|
|
void tf_util_register(JSContext* context);
|
|
|
|
JSValue tf_util_utf8_decode(JSContext* context, JSValue value);
|
2021-11-03 18:28:25 -04:00
|
|
|
uint8_t* tf_util_try_get_array_buffer(JSContext* context, size_t* psize, JSValueConst obj);
|
|
|
|
JSValue tf_util_try_get_typed_array_buffer(JSContext* context, JSValueConst obj, size_t* pbyte_offset, size_t* pbyte_length, size_t* pbytes_per_element);
|
2021-12-27 16:48:16 -05:00
|
|
|
bool tf_util_report_error(JSContext* context, JSValue value);
|