[wasm-api] Bind buffer_reverse

This commit is contained in:
Behdad Esfahbod 2023-02-24 12:03:53 -07:00
parent 863ec70e12
commit b3b6e8da86
3 changed files with 13 additions and 0 deletions

View File

@ -137,6 +137,15 @@ buffer_get_direction (HB_WASM_EXEC_ENV
return (direction_t) hb_buffer_get_direction (buffer);
}
void
buffer_reverse (HB_WASM_EXEC_ENV
ptr_t(buffer_t) bufferref)
{
HB_REF2OBJ (buffer);
hb_buffer_reverse (buffer);
}
void
buffer_reverse_clusters (HB_WASM_EXEC_ENV
ptr_t(buffer_t) bufferref)

View File

@ -60,6 +60,7 @@ static NativeSymbol _hb_wasm_native_symbols[] =
NATIVE_SYMBOL ("(ii)", buffer_copy_contents),
NATIVE_SYMBOL ("(ii)i", buffer_set_contents),
NATIVE_SYMBOL ("(i)i", buffer_get_direction),
NATIVE_SYMBOL ("(i)", buffer_reverse),
NATIVE_SYMBOL ("(i)", buffer_reverse_clusters),
/* face */

View File

@ -148,6 +148,9 @@ HB_WASM_API (bool_t, buffer_set_contents) (HB_WASM_EXEC_ENV
HB_WASM_API (direction_t, buffer_get_direction) (HB_WASM_EXEC_ENV
ptr_t(buffer_t));
HB_WASM_API (void, buffer_reverse) (HB_WASM_EXEC_ENV
ptr_t(buffer_t));
HB_WASM_API (void, buffer_reverse_clusters) (HB_WASM_EXEC_ENV
ptr_t(buffer_t));