From 7902fdc882c254f0ebf5adce63d04b845ec77f42 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Thu, 17 Oct 2024 00:02:48 +0000 Subject: [PATCH] feat: update headers from nodejs/node tag v23.0.0 --- include/js_native_api_types.h | 16 ---------------- include/node_api.h | 2 ++ 2 files changed, 2 insertions(+), 16 deletions(-) diff --git a/include/js_native_api_types.h b/include/js_native_api_types.h index 43e7bb7..7853a8d 100644 --- a/include/js_native_api_types.h +++ b/include/js_native_api_types.h @@ -43,14 +43,7 @@ typedef struct napi_env__* napi_env; // basic APIs (unless the user explicitly casts the environment), we achieve // the ability to ensure at compile time that we do not call APIs that affect // the state of the JS engine from a synchronous (basic) finalizer. -#if !defined(NAPI_EXPERIMENTAL) || \ - (defined(NAPI_EXPERIMENTAL) && \ - (defined(NODE_API_EXPERIMENTAL_NOGC_ENV_OPT_OUT) || \ - defined(NODE_API_EXPERIMENTAL_BASIC_ENV_OPT_OUT))) typedef struct napi_env__* node_api_nogc_env; -#else -typedef const struct napi_env__* node_api_nogc_env; -#endif typedef node_api_nogc_env node_api_basic_env; typedef struct napi_value__* napi_value; @@ -147,16 +140,7 @@ typedef void(NAPI_CDECL* napi_finalize)(napi_env env, void* finalize_data, void* finalize_hint); -#if !defined(NAPI_EXPERIMENTAL) || \ - (defined(NAPI_EXPERIMENTAL) && \ - (defined(NODE_API_EXPERIMENTAL_NOGC_ENV_OPT_OUT) || \ - defined(NODE_API_EXPERIMENTAL_BASIC_ENV_OPT_OUT))) typedef napi_finalize node_api_nogc_finalize; -#else -typedef void(NAPI_CDECL* node_api_nogc_finalize)(node_api_nogc_env env, - void* finalize_data, - void* finalize_hint); -#endif typedef node_api_nogc_finalize node_api_basic_finalize; typedef struct { diff --git a/include/node_api.h b/include/node_api.h index 526cdd5..80a0f45 100644 --- a/include/node_api.h +++ b/include/node_api.h @@ -135,6 +135,8 @@ napi_create_external_buffer(napi_env env, void* finalize_hint, napi_value* result); #endif // NODE_API_NO_EXTERNAL_BUFFERS_ALLOWED + + NAPI_EXTERN napi_status NAPI_CDECL napi_create_buffer_copy(napi_env env, size_t length, const void* data,