Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nodejs/node.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorGabriel Schulhof <gabriel.schulhof@intel.com>2019-09-05 19:33:47 +0300
committerBeth Griggs <Bethany.Griggs@uk.ibm.com>2019-10-01 21:38:58 +0300
commitc74c6a5ccf8a9c4b3775c7c8950dd16282f41c39 (patch)
tree42e1036942a0a7e96998d7f1c62bea7b2ab8f1e7 /src
parent7735824d2cf88f88f811934834ee28bd575f5326 (diff)
n-api: mark version 5 N-APIs as stable
PR-URL: https://github.com/nodejs/node/pull/29401 Backport-PR-URL: https://github.com/nodejs/node/pull/29458 Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
Diffstat (limited to 'src')
-rw-r--r--src/node_api.h22
-rw-r--r--src/node_version.h2
2 files changed, 15 insertions, 9 deletions
diff --git a/src/node_api.h b/src/node_api.h
index f00e66ac15d..740e26e5d2b 100644
--- a/src/node_api.h
+++ b/src/node_api.h
@@ -10,7 +10,7 @@
#define NAPI_VERSION 2147483647
#else
// The baseline version for N-API
-#define NAPI_VERSION 4
+#define NAPI_VERSION 5
#endif
#endif
@@ -674,7 +674,7 @@ napi_ref_threadsafe_function(napi_env env, napi_threadsafe_function func);
#endif // NAPI_VERSION >= 4
-#ifdef NAPI_EXPERIMENTAL
+#if NAPI_VERSION >= 5
// Dates
NAPI_EXTERN napi_status napi_create_date(napi_env env,
@@ -689,6 +689,18 @@ NAPI_EXTERN napi_status napi_get_date_value(napi_env env,
napi_value value,
double* result);
+// Add finalizer for pointer
+NAPI_EXTERN napi_status napi_add_finalizer(napi_env env,
+ napi_value js_object,
+ void* native_object,
+ napi_finalize finalize_cb,
+ void* finalize_hint,
+ napi_ref* result);
+
+#endif // NAPI_VERSION >= 5
+
+#ifdef NAPI_EXPERIMENTAL
+
// BigInt
NAPI_EXTERN napi_status napi_create_bigint_int64(napi_env env,
int64_t value,
@@ -714,12 +726,6 @@ NAPI_EXTERN napi_status napi_get_value_bigint_words(napi_env env,
int* sign_bit,
size_t* word_count,
uint64_t* words);
-NAPI_EXTERN napi_status napi_add_finalizer(napi_env env,
- napi_value js_object,
- void* native_object,
- napi_finalize finalize_cb,
- void* finalize_hint,
- napi_ref* result);
#endif // NAPI_EXPERIMENTAL
EXTERN_C_END
diff --git a/src/node_version.h b/src/node_version.h
index 94c0c4c1087..98aa9871cda 100644
--- a/src/node_version.h
+++ b/src/node_version.h
@@ -114,6 +114,6 @@
#define NODE_MODULE_VERSION 64
// the NAPI_VERSION provided by this version of the runtime
-#define NAPI_VERSION 4
+#define NAPI_VERSION 5
#endif // SRC_NODE_VERSION_H_