-
Notifications
You must be signed in to change notification settings - Fork 30k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
src: add NAPI_VERSION_EXPERIMENTAL #25319
Conversation
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.
src/js_native_api.h
Outdated
@@ -5,10 +5,11 @@ | |||
#include <stdbool.h> | |||
#include "js_native_api_types.h" | |||
|
|||
#define NAPI_VERSION_EXPERIMENTAL 2147483647 | |||
#ifndef NAPI_VERSION | |||
#ifdef NAPI_EXPERIMENTAL | |||
// Use INT_MAX, this should only be consumed by the pre-processor anyway. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should this comment be also updated/moved?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
good point, will update
@lpinca fixed. |
CI run good, will land once 48 hours is up later today. |
Landed in 992c8ab |
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>
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>
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: nodejs#25319 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
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: nodejs#25319 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
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.
Checklist
make -j4 test
(UNIX), orvcbuild test
(Windows) passes