Skip to content

Commit

Permalink
doc: mention Napi::Env arg for Finalization callback (#1139)
Browse files Browse the repository at this point in the history
  • Loading branch information
extremeheat authored Feb 22, 2022
1 parent 5b51864 commit da8af20
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions doc/array_buffer.md
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ static Napi::ArrayBuffer Napi::ArrayBuffer::New(napi_env env,
- `[in] externalData`: The pointer to the external data to wrap.
- `[in] byteLength`: The length of the `externalData`, in bytes.
- `[in] finalizeCallback`: A function to be called when the `Napi::ArrayBuffer` is
destroyed. It must implement `operator()`, accept a `void*` (which is the
destroyed. It must implement `operator()`, accept an Napi::Env, a `void*` (which is the
`externalData` pointer), and return `void`.
Returns a new `Napi::ArrayBuffer` instance.
Expand All @@ -94,7 +94,7 @@ static Napi::ArrayBuffer Napi::ArrayBuffer::New(napi_env env,
- `[in] externalData`: The pointer to the external data to wrap.
- `[in] byteLength`: The length of the `externalData`, in bytes.
- `[in] finalizeCallback`: The function to be called when the `Napi::ArrayBuffer` is
destroyed. It must implement `operator()`, accept a `void*` (which is the
destroyed. It must implement `operator()`, accept an Napi::Env, a `void*` (which is the
`externalData` pointer) and `Hint*`, and return `void`.
- `[in] finalizeHint`: The hint to be passed as the second parameter of the
finalize callback.
Expand Down
4 changes: 2 additions & 2 deletions doc/buffer.md
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ static Napi::Buffer<T> Napi::Buffer::New(napi_env env,
- `[in] data`: The pointer to the external data to expose.
- `[in] length`: The number of `T` elements in the external data.
- `[in] finalizeCallback`: The function to be called when the `Napi::Buffer` is
destroyed. It must implement `operator()`, accept a `T*` (which is the
destroyed. It must implement `operator()`, accept an Napi::Env, a `T*` (which is the
external data pointer), and return `void`.
Returns a new `Napi::Buffer` object.
Expand All @@ -91,7 +91,7 @@ static Napi::Buffer<T> Napi::Buffer::New(napi_env env,
- `[in] data`: The pointer to the external data to expose.
- `[in] length`: The number of `T` elements in the external data.
- `[in] finalizeCallback`: The function to be called when the `Napi::Buffer` is
destroyed. It must implement `operator()`, accept a `T*` (which is the
destroyed. It must implement `operator()`, accept an Napi::Env, a `T*` (which is the
external data pointer) and `Hint*`, and return `void`.
- `[in] finalizeHint`: The hint to be passed as the second parameter of the
finalize callback.
Expand Down

0 comments on commit da8af20

Please sign in to comment.