From 08729f68a0b97b2d9a945853ffd0ed29e015be08 Mon Sep 17 00:00:00 2001 From: extremeheat Date: Mon, 21 Feb 2022 00:01:38 -0500 Subject: [PATCH] doc: mention Napi::Env arg for Finalization callback --- doc/array_buffer.md | 4 ++-- doc/buffer.md | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/doc/array_buffer.md b/doc/array_buffer.md index b089b0dfe..0c12614f3 100644 --- a/doc/array_buffer.md +++ b/doc/array_buffer.md @@ -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. @@ -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. diff --git a/doc/buffer.md b/doc/buffer.md index 55e26e90b..1b6a3e1d6 100644 --- a/doc/buffer.md +++ b/doc/buffer.md @@ -65,7 +65,7 @@ static Napi::Buffer 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. @@ -91,7 +91,7 @@ static Napi::Buffer 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.