Skip to content

Commit c4ecd68

Browse files
committed
fix: compiler error
1 parent 1deba98 commit c4ecd68

File tree

3 files changed

+7
-3
lines changed

3 files changed

+7
-3
lines changed

include/napi-inl.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2847,7 +2847,7 @@ inline void ArrayBuffer::Detach() {
28472847
void *data = nullptr;
28482848
size_t length = 0;
28492849
napi_status status = napi_get_buffer_info(_env, _value, &data, &length);
2850-
NAPI_THROW_IF_FAILED(_env, status, Buffer<T>());
2850+
NAPI_THROW_IF_FAILED(_env, status, 0);
28512851
return length;
28522852
}
28532853

@@ -2856,7 +2856,7 @@ inline void ArrayBuffer::Detach() {
28562856
void *data = nullptr;
28572857
size_t length = 0;
28582858
napi_status status = napi_get_buffer_info(_env, _value, &data, &length);
2859-
NAPI_THROW_IF_FAILED(_env, status, Buffer<T>());
2859+
NAPI_THROW_IF_FAILED(_env, status, 0);
28602860
return reinterpret_cast<T*>(data);
28612861
}
28622862

package/CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
# 0.0.4
2+
- Fix compiler error
3+
4+
---
15
# 0.0.3
26
- The length of a TypedArray should be divided by its element length.
37

package/oh-package.json5

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
name: "@ohos-rs/node-addon-api",
55
description: "Node-addon-api for OpenHarmony/HarmonyNext",
66
main: "index.ets",
7-
version: "0.0.3",
7+
version: "0.0.4",
88
types: "libs/index.d.ts",
99
dependencies: {}
1010
}

0 commit comments

Comments
 (0)