Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

doc: mention Napi::Env arg for Finalization callbacks #1139

Merged
merged 1 commit into from Feb 22, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 2 additions & 2 deletions doc/array_buffer.md
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
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