summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/js_native_api.h2
-rw-r--r--src/node_api.h4
-rw-r--r--src/node_api_types.h12
-rw-r--r--src/node_version.h2
4 files changed, 10 insertions, 10 deletions
diff --git a/src/js_native_api.h b/src/js_native_api.h
index 60f209f948..acb7316d2d 100644
--- a/src/js_native_api.h
+++ b/src/js_native_api.h
@@ -12,7 +12,7 @@
#define NAPI_VERSION NAPI_VERSION_EXPERIMENTAL
#else
// The baseline version for N-API
-#define NAPI_VERSION 3
+#define NAPI_VERSION 4
#endif
#endif
diff --git a/src/node_api.h b/src/node_api.h
index b36f6d4b7a..a37ee06ce1 100644
--- a/src/node_api.h
+++ b/src/node_api.h
@@ -192,7 +192,7 @@ NAPI_EXTERN napi_status napi_close_callback_scope(napi_env env,
#endif // NAPI_VERSION >= 3
-#ifdef NAPI_EXPERIMENTAL
+#if NAPI_VERSION >= 4
// Calling into JS from other threads
NAPI_EXTERN napi_status
@@ -230,7 +230,7 @@ napi_unref_threadsafe_function(napi_env env, napi_threadsafe_function func);
NAPI_EXTERN napi_status
napi_ref_threadsafe_function(napi_env env, napi_threadsafe_function func);
-#endif // NAPI_EXPERIMENTAL
+#endif // NAPI_VERSION >= 4
EXTERN_C_END
diff --git a/src/node_api_types.h b/src/node_api_types.h
index ab4f7ac58c..d740bb9358 100644
--- a/src/node_api_types.h
+++ b/src/node_api_types.h
@@ -6,11 +6,11 @@
typedef struct napi_callback_scope__* napi_callback_scope;
typedef struct napi_async_context__* napi_async_context;
typedef struct napi_async_work__* napi_async_work;
-#ifdef NAPI_EXPERIMENTAL
+#if NAPI_VERSION >= 4
typedef struct napi_threadsafe_function__* napi_threadsafe_function;
-#endif // NAPI_EXPERIMENTAL
+#endif // NAPI_VERSION >= 4
-#ifdef NAPI_EXPERIMENTAL
+#ifdef NAPI_VERSION >= 4
typedef enum {
napi_tsfn_release,
napi_tsfn_abort
@@ -20,19 +20,19 @@ typedef enum {
napi_tsfn_nonblocking,
napi_tsfn_blocking
} napi_threadsafe_function_call_mode;
-#endif // NAPI_EXPERIMENTAL
+#endif // NAPI_VERSION >= 4
typedef void (*napi_async_execute_callback)(napi_env env,
void* data);
typedef void (*napi_async_complete_callback)(napi_env env,
napi_status status,
void* data);
-#ifdef NAPI_EXPERIMENTAL
+#ifdef NAPI_VERSION >= 4
typedef void (*napi_threadsafe_function_call_js)(napi_env env,
napi_value js_callback,
void* context,
void* data);
-#endif // NAPI_EXPERIMENTAL
+#endif // NAPI_VERSION >= 4
typedef struct {
uint32_t major;
diff --git a/src/node_version.h b/src/node_version.h
index b3f4808bf1..f64aa2aad7 100644
--- a/src/node_version.h
+++ b/src/node_version.h
@@ -118,6 +118,6 @@
#define NODE_MODULE_VERSION 68
// the NAPI_VERSION provided by this version of the runtime
-#define NAPI_VERSION 3
+#define NAPI_VERSION 4
#endif // SRC_NODE_VERSION_H_