Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 465d02b

Browse filesBrowse files
mhdawsonaddaleax
authored andcommitted
src: add NAPI_VERSION_EXPERIMENTAL
Refs: nodejs/node-addon-api#421 Define NAPI_VERSION_EXPERIMENTAL so that it can be used to guard code in addons that need to check if a function they want to use is available. PR-URL: #25319 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
1 parent 379260e commit 465d02b
Copy full SHA for 465d02b

File tree

Expand file treeCollapse file tree

1 file changed

+3
-2
lines changed
Open diff view settings
Filter options
Expand file treeCollapse file tree

1 file changed

+3
-2
lines changed
Open diff view settings
Collapse file

‎src/js_native_api.h‎

Copy file name to clipboardExpand all lines: src/js_native_api.h
+3-2Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,11 @@
55
#include <stdbool.h>
66
#include "js_native_api_types.h"
77

8+
// Use INT_MAX, this should only be consumed by the pre-processor anyway.
9+
#define NAPI_VERSION_EXPERIMENTAL 2147483647
810
#ifndef NAPI_VERSION
911
#ifdef NAPI_EXPERIMENTAL
10-
// Use INT_MAX, this should only be consumed by the pre-processor anyway.
11-
#define NAPI_VERSION 2147483647
12+
#define NAPI_VERSION NAPI_VERSION_EXPERIMENTAL
1213
#else
1314
// The baseline version for N-API
1415
#define NAPI_VERSION 3

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.