node-linux-s390x 16.15.0 → 16.17.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (82) hide show
  1. package/CHANGELOG.md +857 -0
  2. package/LICENSE +111 -9
  3. package/README.md +55 -31
  4. package/bin/node +0 -0
  5. package/include/node/common.gypi +6 -2
  6. package/include/node/config.gypi +219 -213
  7. package/include/node/js_native_api.h +383 -390
  8. package/include/node/js_native_api_types.h +15 -9
  9. package/include/node/node.h +15 -3
  10. package/include/node/node_api.h +154 -141
  11. package/include/node/node_api_types.h +8 -11
  12. package/include/node/node_version.h +1 -1
  13. package/include/node/openssl/archs/BSD-x86/asm/crypto/buildinf.h +1 -1
  14. package/include/node/openssl/archs/BSD-x86/asm_avx2/crypto/buildinf.h +1 -1
  15. package/include/node/openssl/archs/BSD-x86/no-asm/crypto/buildinf.h +1 -1
  16. package/include/node/openssl/archs/BSD-x86_64/asm/crypto/buildinf.h +1 -1
  17. package/include/node/openssl/archs/BSD-x86_64/asm_avx2/crypto/buildinf.h +1 -1
  18. package/include/node/openssl/archs/BSD-x86_64/no-asm/crypto/buildinf.h +1 -1
  19. package/include/node/openssl/archs/VC-WIN32/asm/crypto/buildinf.h +1 -1
  20. package/include/node/openssl/archs/VC-WIN32/asm_avx2/crypto/buildinf.h +1 -1
  21. package/include/node/openssl/archs/VC-WIN32/no-asm/crypto/buildinf.h +1 -1
  22. package/include/node/openssl/archs/VC-WIN64-ARM/no-asm/crypto/buildinf.h +1 -1
  23. package/include/node/openssl/archs/VC-WIN64A/asm/crypto/buildinf.h +1 -1
  24. package/include/node/openssl/archs/VC-WIN64A/asm_avx2/crypto/buildinf.h +1 -1
  25. package/include/node/openssl/archs/VC-WIN64A/no-asm/crypto/buildinf.h +1 -1
  26. package/include/node/openssl/archs/aix-gcc/asm/crypto/buildinf.h +1 -1
  27. package/include/node/openssl/archs/aix-gcc/asm_avx2/crypto/buildinf.h +1 -1
  28. package/include/node/openssl/archs/aix-gcc/no-asm/crypto/buildinf.h +1 -1
  29. package/include/node/openssl/archs/aix64-gcc/asm/crypto/buildinf.h +1 -1
  30. package/include/node/openssl/archs/aix64-gcc/asm_avx2/crypto/buildinf.h +1 -1
  31. package/include/node/openssl/archs/aix64-gcc/no-asm/crypto/buildinf.h +1 -1
  32. package/include/node/openssl/archs/darwin-i386-cc/asm/crypto/buildinf.h +1 -1
  33. package/include/node/openssl/archs/darwin-i386-cc/asm_avx2/crypto/buildinf.h +1 -1
  34. package/include/node/openssl/archs/darwin-i386-cc/no-asm/crypto/buildinf.h +1 -1
  35. package/include/node/openssl/archs/darwin64-arm64-cc/asm/crypto/buildinf.h +1 -1
  36. package/include/node/openssl/archs/darwin64-arm64-cc/asm_avx2/crypto/buildinf.h +1 -1
  37. package/include/node/openssl/archs/darwin64-arm64-cc/no-asm/crypto/buildinf.h +1 -1
  38. package/include/node/openssl/archs/darwin64-x86_64-cc/asm/crypto/buildinf.h +1 -1
  39. package/include/node/openssl/archs/darwin64-x86_64-cc/asm_avx2/crypto/buildinf.h +1 -1
  40. package/include/node/openssl/archs/darwin64-x86_64-cc/no-asm/crypto/buildinf.h +1 -1
  41. package/include/node/openssl/archs/linux-aarch64/asm/crypto/buildinf.h +1 -1
  42. package/include/node/openssl/archs/linux-aarch64/asm_avx2/crypto/buildinf.h +1 -1
  43. package/include/node/openssl/archs/linux-aarch64/no-asm/crypto/buildinf.h +1 -1
  44. package/include/node/openssl/archs/linux-armv4/asm/crypto/buildinf.h +1 -1
  45. package/include/node/openssl/archs/linux-armv4/asm_avx2/crypto/buildinf.h +1 -1
  46. package/include/node/openssl/archs/linux-armv4/no-asm/crypto/buildinf.h +1 -1
  47. package/include/node/openssl/archs/linux-elf/asm/crypto/buildinf.h +1 -1
  48. package/include/node/openssl/archs/linux-elf/asm_avx2/crypto/buildinf.h +1 -1
  49. package/include/node/openssl/archs/linux-elf/no-asm/crypto/buildinf.h +1 -1
  50. package/include/node/openssl/archs/linux-ppc/asm/crypto/buildinf.h +1 -1
  51. package/include/node/openssl/archs/linux-ppc/asm_avx2/crypto/buildinf.h +1 -1
  52. package/include/node/openssl/archs/linux-ppc/no-asm/crypto/buildinf.h +1 -1
  53. package/include/node/openssl/archs/linux-ppc64/asm/crypto/buildinf.h +1 -1
  54. package/include/node/openssl/archs/linux-ppc64/asm_avx2/crypto/buildinf.h +1 -1
  55. package/include/node/openssl/archs/linux-ppc64/no-asm/crypto/buildinf.h +1 -1
  56. package/include/node/openssl/archs/linux-ppc64le/asm/crypto/buildinf.h +1 -1
  57. package/include/node/openssl/archs/linux-ppc64le/asm_avx2/crypto/buildinf.h +1 -1
  58. package/include/node/openssl/archs/linux-ppc64le/no-asm/crypto/buildinf.h +1 -1
  59. package/include/node/openssl/archs/linux-x86_64/asm/crypto/buildinf.h +1 -1
  60. package/include/node/openssl/archs/linux-x86_64/asm_avx2/crypto/buildinf.h +1 -1
  61. package/include/node/openssl/archs/linux-x86_64/no-asm/crypto/buildinf.h +1 -1
  62. package/include/node/openssl/archs/linux32-s390x/asm/crypto/buildinf.h +1 -1
  63. package/include/node/openssl/archs/linux32-s390x/asm_avx2/crypto/buildinf.h +1 -1
  64. package/include/node/openssl/archs/linux32-s390x/no-asm/crypto/buildinf.h +1 -1
  65. package/include/node/openssl/archs/linux64-mips64/asm/crypto/buildinf.h +1 -1
  66. package/include/node/openssl/archs/linux64-mips64/asm_avx2/crypto/buildinf.h +1 -1
  67. package/include/node/openssl/archs/linux64-mips64/no-asm/crypto/buildinf.h +1 -1
  68. package/include/node/openssl/archs/linux64-riscv64/no-asm/crypto/buildinf.h +1 -1
  69. package/include/node/openssl/archs/linux64-s390x/asm/crypto/buildinf.h +1 -1
  70. package/include/node/openssl/archs/linux64-s390x/asm_avx2/crypto/buildinf.h +1 -1
  71. package/include/node/openssl/archs/linux64-s390x/no-asm/crypto/buildinf.h +1 -1
  72. package/include/node/openssl/archs/solaris-x86-gcc/asm/crypto/buildinf.h +1 -1
  73. package/include/node/openssl/archs/solaris-x86-gcc/asm_avx2/crypto/buildinf.h +1 -1
  74. package/include/node/openssl/archs/solaris-x86-gcc/no-asm/crypto/buildinf.h +1 -1
  75. package/include/node/openssl/archs/solaris64-x86_64-gcc/asm/crypto/buildinf.h +1 -1
  76. package/include/node/openssl/archs/solaris64-x86_64-gcc/asm_avx2/crypto/buildinf.h +1 -1
  77. package/include/node/openssl/archs/solaris64-x86_64-gcc/no-asm/crypto/buildinf.h +1 -1
  78. package/include/node/openssl/opensslv.h +3 -3
  79. package/include/node/openssl/ssl.h +11 -1
  80. package/include/node/v8-version.h +1 -1
  81. package/package.json +1 -1
  82. package/share/man/man1/node.1 +11 -1
@@ -8,7 +8,15 @@
8
8
  #include <stdint.h> // NOLINT(modernize-deprecated-headers)
9
9
 
10
10
  #if !defined __cplusplus || (defined(_MSC_VER) && _MSC_VER < 1900)
11
- typedef uint16_t char16_t;
11
+ typedef uint16_t char16_t;
12
+ #endif
13
+
14
+ #ifndef NAPI_CDECL
15
+ #ifdef _WIN32
16
+ #define NAPI_CDECL __cdecl
17
+ #else
18
+ #define NAPI_CDECL
19
+ #endif
12
20
  #endif
13
21
 
14
22
  // JSVM API types are all opaque pointers for ABI stability
@@ -36,9 +44,7 @@ typedef enum {
36
44
  napi_default_method = napi_writable | napi_configurable,
37
45
 
38
46
  // Default for object properties, like in JS obj[prop].
39
- napi_default_jsproperty = napi_writable |
40
- napi_enumerable |
41
- napi_configurable,
47
+ napi_default_jsproperty = napi_writable | napi_enumerable | napi_configurable,
42
48
  #endif // NAPI_VERSION >= 8
43
49
  } napi_property_attributes;
44
50
 
@@ -102,11 +108,11 @@ typedef enum {
102
108
  // * the definition of `napi_status` in doc/api/n-api.md to reflect the newly
103
109
  // added value(s).
104
110
 
105
- typedef napi_value (*napi_callback)(napi_env env,
106
- napi_callback_info info);
107
- typedef void (*napi_finalize)(napi_env env,
108
- void* finalize_data,
109
- void* finalize_hint);
111
+ typedef napi_value(NAPI_CDECL* napi_callback)(napi_env env,
112
+ napi_callback_info info);
113
+ typedef void(NAPI_CDECL* napi_finalize)(napi_env env,
114
+ void* finalize_data,
115
+ void* finalize_hint);
110
116
 
111
117
  typedef struct {
112
118
  // One of utf8name or name should be NULL.
@@ -32,6 +32,16 @@
32
32
  # define NODE_EXTERN __attribute__((visibility("default")))
33
33
  #endif
34
34
 
35
+ // Declarations annotated with NODE_EXTERN_PRIVATE do not form part of
36
+ // the public API. They are implementation details that can and will
37
+ // change between releases, even in semver patch releases. Do not use
38
+ // any such symbol in external code.
39
+ #ifdef NODE_SHARED_MODE
40
+ #define NODE_EXTERN_PRIVATE NODE_EXTERN
41
+ #else
42
+ #define NODE_EXTERN_PRIVATE
43
+ #endif
44
+
35
45
  #ifdef BUILDING_NODE_EXTENSION
36
46
  # undef BUILDING_V8_SHARED
37
47
  # undef BUILDING_UV_SHARED
@@ -824,11 +834,13 @@ extern "C" NODE_EXTERN void node_module_register(void* mod);
824
834
  #endif
825
835
 
826
836
  #if defined(_MSC_VER)
827
- #pragma section(".CRT$XCU", read)
828
837
  #define NODE_C_CTOR(fn) \
829
838
  NODE_CTOR_PREFIX void __cdecl fn(void); \
830
- __declspec(dllexport, allocate(".CRT$XCU")) \
831
- void (__cdecl*fn ## _)(void) = fn; \
839
+ namespace { \
840
+ struct fn##_ { \
841
+ fn##_() { fn(); }; \
842
+ } fn##_v_; \
843
+ } \
832
844
  NODE_CTOR_PREFIX void __cdecl fn(void)
833
845
  #else
834
846
  #define NODE_C_CTOR(fn) \
@@ -2,12 +2,12 @@
2
2
  #define SRC_NODE_API_H_
3
3
 
4
4
  #ifdef BUILDING_NODE_EXTENSION
5
- #ifdef _WIN32
6
- // Building native module against node
7
- #define NAPI_EXTERN __declspec(dllimport)
8
- #elif defined(__wasm32__)
9
- #define NAPI_EXTERN __attribute__((__import_module__("napi")))
10
- #endif
5
+ #ifdef _WIN32
6
+ // Building native module against node
7
+ #define NAPI_EXTERN __declspec(dllimport)
8
+ #elif defined(__wasm32__)
9
+ #define NAPI_EXTERN __attribute__((__import_module__("napi")))
10
+ #endif
11
11
  #endif
12
12
  #include "js_native_api.h"
13
13
  #include "node_api_types.h"
@@ -15,21 +15,21 @@
15
15
  struct uv_loop_s; // Forward declaration.
16
16
 
17
17
  #ifdef _WIN32
18
- # define NAPI_MODULE_EXPORT __declspec(dllexport)
18
+ #define NAPI_MODULE_EXPORT __declspec(dllexport)
19
19
  #else
20
- # define NAPI_MODULE_EXPORT __attribute__((visibility("default")))
20
+ #define NAPI_MODULE_EXPORT __attribute__((visibility("default")))
21
21
  #endif
22
22
 
23
23
  #if defined(__GNUC__)
24
- # define NAPI_NO_RETURN __attribute__((noreturn))
24
+ #define NAPI_NO_RETURN __attribute__((noreturn))
25
25
  #elif defined(_WIN32)
26
- # define NAPI_NO_RETURN __declspec(noreturn)
26
+ #define NAPI_NO_RETURN __declspec(noreturn)
27
27
  #else
28
- # define NAPI_NO_RETURN
28
+ #define NAPI_NO_RETURN
29
29
  #endif
30
30
 
31
- typedef napi_value (*napi_addon_register_func)(napi_env env,
32
- napi_value exports);
31
+ typedef napi_value(NAPI_CDECL* napi_addon_register_func)(napi_env env,
32
+ napi_value exports);
33
33
 
34
34
  typedef struct napi_module {
35
35
  int nm_version;
@@ -41,36 +41,50 @@ typedef struct napi_module {
41
41
  void* reserved[4];
42
42
  } napi_module;
43
43
 
44
- #define NAPI_MODULE_VERSION 1
44
+ #define NAPI_MODULE_VERSION 1
45
45
 
46
46
  #if defined(_MSC_VER)
47
+ #if defined(__cplusplus)
48
+ #define NAPI_C_CTOR(fn) \
49
+ static void NAPI_CDECL fn(void); \
50
+ namespace { \
51
+ struct fn##_ { \
52
+ fn##_() { fn(); } \
53
+ } fn##_v_; \
54
+ } \
55
+ static void NAPI_CDECL fn(void)
56
+ #else // !defined(__cplusplus)
47
57
  #pragma section(".CRT$XCU", read)
48
- #define NAPI_C_CTOR(fn) \
49
- static void __cdecl fn(void); \
50
- __declspec(dllexport, allocate(".CRT$XCU")) void(__cdecl * fn##_)(void) = \
51
- fn; \
52
- static void __cdecl fn(void)
58
+ // The NAPI_C_CTOR macro defines a function fn that is called during CRT
59
+ // initialization.
60
+ // C does not support dynamic initialization of static variables and this code
61
+ // simulates C++ behavior. Exporting the function pointer prevents it from being
62
+ // optimized. See for details:
63
+ // https://docs.microsoft.com/en-us/cpp/c-runtime-library/crt-initialization?view=msvc-170
64
+ #define NAPI_C_CTOR(fn) \
65
+ static void NAPI_CDECL fn(void); \
66
+ __declspec(dllexport, allocate(".CRT$XCU")) void(NAPI_CDECL * fn##_)(void) = \
67
+ fn; \
68
+ static void NAPI_CDECL fn(void)
69
+ #endif // defined(__cplusplus)
53
70
  #else
54
- #define NAPI_C_CTOR(fn) \
55
- static void fn(void) __attribute__((constructor)); \
71
+ #define NAPI_C_CTOR(fn) \
72
+ static void fn(void) __attribute__((constructor)); \
56
73
  static void fn(void)
57
74
  #endif
58
75
 
59
- #define NAPI_MODULE_X(modname, regfunc, priv, flags) \
60
- EXTERN_C_START \
61
- static napi_module _module = \
62
- { \
63
- NAPI_MODULE_VERSION, \
64
- flags, \
65
- __FILE__, \
66
- regfunc, \
67
- #modname, \
68
- priv, \
69
- {0}, \
70
- }; \
71
- NAPI_C_CTOR(_register_ ## modname) { \
72
- napi_module_register(&_module); \
73
- } \
76
+ #define NAPI_MODULE_X(modname, regfunc, priv, flags) \
77
+ EXTERN_C_START \
78
+ static napi_module _module = { \
79
+ NAPI_MODULE_VERSION, \
80
+ flags, \
81
+ __FILE__, \
82
+ regfunc, \
83
+ #modname, \
84
+ priv, \
85
+ {0}, \
86
+ }; \
87
+ NAPI_C_CTOR(_register_##modname) { napi_module_register(&_module); } \
74
88
  EXTERN_C_END
75
89
 
76
90
  #define NAPI_MODULE_INITIALIZER_X(base, version) \
@@ -88,123 +102,124 @@ typedef struct napi_module {
88
102
  } \
89
103
  EXTERN_C_END
90
104
  #else
91
- #define NAPI_MODULE(modname, regfunc) \
105
+ #define NAPI_MODULE(modname, regfunc) \
92
106
  NAPI_MODULE_X(modname, regfunc, NULL, 0) // NOLINT (readability/null_usage)
93
107
  #endif
94
108
 
95
109
  #define NAPI_MODULE_INITIALIZER_BASE napi_register_module_v
96
110
 
97
- #define NAPI_MODULE_INITIALIZER \
98
- NAPI_MODULE_INITIALIZER_X(NAPI_MODULE_INITIALIZER_BASE, \
99
- NAPI_MODULE_VERSION)
111
+ #define NAPI_MODULE_INITIALIZER \
112
+ NAPI_MODULE_INITIALIZER_X(NAPI_MODULE_INITIALIZER_BASE, NAPI_MODULE_VERSION)
100
113
 
101
- #define NAPI_MODULE_INIT() \
102
- EXTERN_C_START \
103
- NAPI_MODULE_EXPORT napi_value \
104
- NAPI_MODULE_INITIALIZER(napi_env env, napi_value exports); \
105
- EXTERN_C_END \
106
- NAPI_MODULE(NODE_GYP_MODULE_NAME, NAPI_MODULE_INITIALIZER) \
107
- napi_value NAPI_MODULE_INITIALIZER(napi_env env, \
108
- napi_value exports)
114
+ #define NAPI_MODULE_INIT() \
115
+ EXTERN_C_START \
116
+ NAPI_MODULE_EXPORT napi_value NAPI_MODULE_INITIALIZER(napi_env env, \
117
+ napi_value exports); \
118
+ EXTERN_C_END \
119
+ NAPI_MODULE(NODE_GYP_MODULE_NAME, NAPI_MODULE_INITIALIZER) \
120
+ napi_value NAPI_MODULE_INITIALIZER(napi_env env, napi_value exports)
109
121
 
110
122
  EXTERN_C_START
111
123
 
112
- NAPI_EXTERN void napi_module_register(napi_module* mod);
124
+ NAPI_EXTERN void NAPI_CDECL napi_module_register(napi_module* mod);
113
125
 
114
- NAPI_EXTERN NAPI_NO_RETURN void napi_fatal_error(const char* location,
115
- size_t location_len,
116
- const char* message,
117
- size_t message_len);
126
+ NAPI_EXTERN NAPI_NO_RETURN void NAPI_CDECL
127
+ napi_fatal_error(const char* location,
128
+ size_t location_len,
129
+ const char* message,
130
+ size_t message_len);
118
131
 
119
132
  // Methods for custom handling of async operations
120
- NAPI_EXTERN napi_status napi_async_init(napi_env env,
121
- napi_value async_resource,
122
- napi_value async_resource_name,
123
- napi_async_context* result);
124
-
125
- NAPI_EXTERN napi_status napi_async_destroy(napi_env env,
126
- napi_async_context async_context);
127
-
128
- NAPI_EXTERN napi_status napi_make_callback(napi_env env,
129
- napi_async_context async_context,
130
- napi_value recv,
131
- napi_value func,
132
- size_t argc,
133
- const napi_value* argv,
134
- napi_value* result);
133
+ NAPI_EXTERN napi_status NAPI_CDECL
134
+ napi_async_init(napi_env env,
135
+ napi_value async_resource,
136
+ napi_value async_resource_name,
137
+ napi_async_context* result);
138
+
139
+ NAPI_EXTERN napi_status NAPI_CDECL
140
+ napi_async_destroy(napi_env env, napi_async_context async_context);
141
+
142
+ NAPI_EXTERN napi_status NAPI_CDECL
143
+ napi_make_callback(napi_env env,
144
+ napi_async_context async_context,
145
+ napi_value recv,
146
+ napi_value func,
147
+ size_t argc,
148
+ const napi_value* argv,
149
+ napi_value* result);
135
150
 
136
151
  // Methods to provide node::Buffer functionality with napi types
137
- NAPI_EXTERN napi_status napi_create_buffer(napi_env env,
138
- size_t length,
139
- void** data,
140
- napi_value* result);
141
- NAPI_EXTERN napi_status napi_create_external_buffer(napi_env env,
142
- size_t length,
143
- void* data,
144
- napi_finalize finalize_cb,
145
- void* finalize_hint,
146
- napi_value* result);
147
- NAPI_EXTERN napi_status napi_create_buffer_copy(napi_env env,
148
- size_t length,
149
- const void* data,
150
- void** result_data,
151
- napi_value* result);
152
- NAPI_EXTERN napi_status napi_is_buffer(napi_env env,
153
- napi_value value,
154
- bool* result);
155
- NAPI_EXTERN napi_status napi_get_buffer_info(napi_env env,
156
- napi_value value,
157
- void** data,
158
- size_t* length);
152
+ NAPI_EXTERN napi_status NAPI_CDECL napi_create_buffer(napi_env env,
153
+ size_t length,
154
+ void** data,
155
+ napi_value* result);
156
+ NAPI_EXTERN napi_status NAPI_CDECL
157
+ napi_create_external_buffer(napi_env env,
158
+ size_t length,
159
+ void* data,
160
+ napi_finalize finalize_cb,
161
+ void* finalize_hint,
162
+ napi_value* result);
163
+ NAPI_EXTERN napi_status NAPI_CDECL napi_create_buffer_copy(napi_env env,
164
+ size_t length,
165
+ const void* data,
166
+ void** result_data,
167
+ napi_value* result);
168
+ NAPI_EXTERN napi_status NAPI_CDECL napi_is_buffer(napi_env env,
169
+ napi_value value,
170
+ bool* result);
171
+ NAPI_EXTERN napi_status NAPI_CDECL napi_get_buffer_info(napi_env env,
172
+ napi_value value,
173
+ void** data,
174
+ size_t* length);
159
175
 
160
176
  // Methods to manage simple async operations
161
- NAPI_EXTERN
162
- napi_status napi_create_async_work(napi_env env,
163
- napi_value async_resource,
164
- napi_value async_resource_name,
165
- napi_async_execute_callback execute,
166
- napi_async_complete_callback complete,
167
- void* data,
168
- napi_async_work* result);
169
- NAPI_EXTERN napi_status napi_delete_async_work(napi_env env,
170
- napi_async_work work);
171
- NAPI_EXTERN napi_status napi_queue_async_work(napi_env env,
172
- napi_async_work work);
173
- NAPI_EXTERN napi_status napi_cancel_async_work(napi_env env,
174
- napi_async_work work);
177
+ NAPI_EXTERN napi_status NAPI_CDECL
178
+ napi_create_async_work(napi_env env,
179
+ napi_value async_resource,
180
+ napi_value async_resource_name,
181
+ napi_async_execute_callback execute,
182
+ napi_async_complete_callback complete,
183
+ void* data,
184
+ napi_async_work* result);
185
+ NAPI_EXTERN napi_status NAPI_CDECL napi_delete_async_work(napi_env env,
186
+ napi_async_work work);
187
+ NAPI_EXTERN napi_status NAPI_CDECL napi_queue_async_work(napi_env env,
188
+ napi_async_work work);
189
+ NAPI_EXTERN napi_status NAPI_CDECL napi_cancel_async_work(napi_env env,
190
+ napi_async_work work);
175
191
 
176
192
  // version management
177
- NAPI_EXTERN
178
- napi_status napi_get_node_version(napi_env env,
179
- const napi_node_version** version);
193
+ NAPI_EXTERN napi_status NAPI_CDECL
194
+ napi_get_node_version(napi_env env, const napi_node_version** version);
180
195
 
181
196
  #if NAPI_VERSION >= 2
182
197
 
183
198
  // Return the current libuv event loop for a given environment
184
- NAPI_EXTERN napi_status napi_get_uv_event_loop(napi_env env,
185
- struct uv_loop_s** loop);
199
+ NAPI_EXTERN napi_status NAPI_CDECL
200
+ napi_get_uv_event_loop(napi_env env, struct uv_loop_s** loop);
186
201
 
187
202
  #endif // NAPI_VERSION >= 2
188
203
 
189
204
  #if NAPI_VERSION >= 3
190
205
 
191
- NAPI_EXTERN napi_status napi_fatal_exception(napi_env env, napi_value err);
206
+ NAPI_EXTERN napi_status NAPI_CDECL napi_fatal_exception(napi_env env,
207
+ napi_value err);
192
208
 
193
- NAPI_EXTERN napi_status napi_add_env_cleanup_hook(napi_env env,
194
- void (*fun)(void* arg),
195
- void* arg);
209
+ NAPI_EXTERN napi_status NAPI_CDECL napi_add_env_cleanup_hook(
210
+ napi_env env, void(NAPI_CDECL* fun)(void* arg), void* arg);
196
211
 
197
- NAPI_EXTERN napi_status napi_remove_env_cleanup_hook(napi_env env,
198
- void (*fun)(void* arg),
199
- void* arg);
212
+ NAPI_EXTERN napi_status NAPI_CDECL napi_remove_env_cleanup_hook(
213
+ napi_env env, void(NAPI_CDECL* fun)(void* arg), void* arg);
200
214
 
201
- NAPI_EXTERN napi_status napi_open_callback_scope(napi_env env,
202
- napi_value resource_object,
203
- napi_async_context context,
204
- napi_callback_scope* result);
215
+ NAPI_EXTERN napi_status NAPI_CDECL
216
+ napi_open_callback_scope(napi_env env,
217
+ napi_value resource_object,
218
+ napi_async_context context,
219
+ napi_callback_scope* result);
205
220
 
206
- NAPI_EXTERN napi_status napi_close_callback_scope(napi_env env,
207
- napi_callback_scope scope);
221
+ NAPI_EXTERN napi_status NAPI_CDECL
222
+ napi_close_callback_scope(napi_env env, napi_callback_scope scope);
208
223
 
209
224
  #endif // NAPI_VERSION >= 3
210
225
 
@@ -212,7 +227,7 @@ NAPI_EXTERN napi_status napi_close_callback_scope(napi_env env,
212
227
 
213
228
  #ifndef __wasm32__
214
229
  // Calling into JS from other threads
215
- NAPI_EXTERN napi_status
230
+ NAPI_EXTERN napi_status NAPI_CDECL
216
231
  napi_create_threadsafe_function(napi_env env,
217
232
  napi_value func,
218
233
  napi_value async_resource,
@@ -225,26 +240,24 @@ napi_create_threadsafe_function(napi_env env,
225
240
  napi_threadsafe_function_call_js call_js_cb,
226
241
  napi_threadsafe_function* result);
227
242
 
228
- NAPI_EXTERN napi_status
229
- napi_get_threadsafe_function_context(napi_threadsafe_function func,
230
- void** result);
243
+ NAPI_EXTERN napi_status NAPI_CDECL napi_get_threadsafe_function_context(
244
+ napi_threadsafe_function func, void** result);
231
245
 
232
- NAPI_EXTERN napi_status
246
+ NAPI_EXTERN napi_status NAPI_CDECL
233
247
  napi_call_threadsafe_function(napi_threadsafe_function func,
234
248
  void* data,
235
249
  napi_threadsafe_function_call_mode is_blocking);
236
250
 
237
- NAPI_EXTERN napi_status
251
+ NAPI_EXTERN napi_status NAPI_CDECL
238
252
  napi_acquire_threadsafe_function(napi_threadsafe_function func);
239
253
 
240
- NAPI_EXTERN napi_status
241
- napi_release_threadsafe_function(napi_threadsafe_function func,
242
- napi_threadsafe_function_release_mode mode);
254
+ NAPI_EXTERN napi_status NAPI_CDECL napi_release_threadsafe_function(
255
+ napi_threadsafe_function func, napi_threadsafe_function_release_mode mode);
243
256
 
244
- NAPI_EXTERN napi_status
257
+ NAPI_EXTERN napi_status NAPI_CDECL
245
258
  napi_unref_threadsafe_function(napi_env env, napi_threadsafe_function func);
246
259
 
247
- NAPI_EXTERN napi_status
260
+ NAPI_EXTERN napi_status NAPI_CDECL
248
261
  napi_ref_threadsafe_function(napi_env env, napi_threadsafe_function func);
249
262
  #endif // __wasm32__
250
263
 
@@ -252,20 +265,20 @@ napi_ref_threadsafe_function(napi_env env, napi_threadsafe_function func);
252
265
 
253
266
  #if NAPI_VERSION >= 8
254
267
 
255
- NAPI_EXTERN napi_status napi_add_async_cleanup_hook(
256
- napi_env env,
257
- napi_async_cleanup_hook hook,
258
- void* arg,
259
- napi_async_cleanup_hook_handle* remove_handle);
268
+ NAPI_EXTERN napi_status NAPI_CDECL
269
+ napi_add_async_cleanup_hook(napi_env env,
270
+ napi_async_cleanup_hook hook,
271
+ void* arg,
272
+ napi_async_cleanup_hook_handle* remove_handle);
260
273
 
261
- NAPI_EXTERN napi_status napi_remove_async_cleanup_hook(
262
- napi_async_cleanup_hook_handle remove_handle);
274
+ NAPI_EXTERN napi_status NAPI_CDECL
275
+ napi_remove_async_cleanup_hook(napi_async_cleanup_hook_handle remove_handle);
263
276
 
264
277
  #endif // NAPI_VERSION >= 8
265
278
 
266
279
  #ifdef NAPI_EXPERIMENTAL
267
280
 
268
- NAPI_EXTERN napi_status
281
+ NAPI_EXTERN napi_status NAPI_CDECL
269
282
  node_api_get_module_file_name(napi_env env, const char** result);
270
283
 
271
284
  #endif // NAPI_EXPERIMENTAL
@@ -22,16 +22,13 @@ typedef enum {
22
22
  } napi_threadsafe_function_call_mode;
23
23
  #endif // NAPI_VERSION >= 4
24
24
 
25
- typedef void (*napi_async_execute_callback)(napi_env env,
26
- void* data);
27
- typedef void (*napi_async_complete_callback)(napi_env env,
28
- napi_status status,
29
- void* data);
25
+ typedef void(NAPI_CDECL* napi_async_execute_callback)(napi_env env, void* data);
26
+ typedef void(NAPI_CDECL* napi_async_complete_callback)(napi_env env,
27
+ napi_status status,
28
+ void* data);
30
29
  #if NAPI_VERSION >= 4
31
- typedef void (*napi_threadsafe_function_call_js)(napi_env env,
32
- napi_value js_callback,
33
- void* context,
34
- void* data);
30
+ typedef void(NAPI_CDECL* napi_threadsafe_function_call_js)(
31
+ napi_env env, napi_value js_callback, void* context, void* data);
35
32
  #endif // NAPI_VERSION >= 4
36
33
 
37
34
  typedef struct {
@@ -43,8 +40,8 @@ typedef struct {
43
40
 
44
41
  #if NAPI_VERSION >= 8
45
42
  typedef struct napi_async_cleanup_hook_handle__* napi_async_cleanup_hook_handle;
46
- typedef void (*napi_async_cleanup_hook)(napi_async_cleanup_hook_handle handle,
47
- void* data);
43
+ typedef void(NAPI_CDECL* napi_async_cleanup_hook)(
44
+ napi_async_cleanup_hook_handle handle, void* data);
48
45
  #endif // NAPI_VERSION >= 8
49
46
 
50
47
  #endif // SRC_NODE_API_TYPES_H_
@@ -23,7 +23,7 @@
23
23
  #define SRC_NODE_VERSION_H_
24
24
 
25
25
  #define NODE_MAJOR_VERSION 16
26
- #define NODE_MINOR_VERSION 15
26
+ #define NODE_MINOR_VERSION 17
27
27
  #define NODE_PATCH_VERSION 0
28
28
 
29
29
  #define NODE_VERSION_IS_LTS 1
@@ -11,7 +11,7 @@
11
11
  */
12
12
 
13
13
  #define PLATFORM "platform: BSD-x86"
14
- #define DATE "built on: Tue Mar 15 19:21:51 2022 UTC"
14
+ #define DATE "built on: Tue Jul 5 15:02:24 2022 UTC"
15
15
 
16
16
  /*
17
17
  * Generate compiler_flags as an array of individual characters. This is a
@@ -11,7 +11,7 @@
11
11
  */
12
12
 
13
13
  #define PLATFORM "platform: BSD-x86"
14
- #define DATE "built on: Tue Mar 15 19:21:54 2022 UTC"
14
+ #define DATE "built on: Tue Jul 5 15:02:26 2022 UTC"
15
15
 
16
16
  /*
17
17
  * Generate compiler_flags as an array of individual characters. This is a
@@ -11,7 +11,7 @@
11
11
  */
12
12
 
13
13
  #define PLATFORM "platform: BSD-x86"
14
- #define DATE "built on: Tue Mar 15 19:21:57 2022 UTC"
14
+ #define DATE "built on: Tue Jul 5 15:02:28 2022 UTC"
15
15
 
16
16
  /*
17
17
  * Generate compiler_flags as an array of individual characters. This is a
@@ -11,7 +11,7 @@
11
11
  */
12
12
 
13
13
  #define PLATFORM "platform: BSD-x86_64"
14
- #define DATE "built on: Tue Mar 15 19:21:59 2022 UTC"
14
+ #define DATE "built on: Tue Jul 5 15:02:29 2022 UTC"
15
15
 
16
16
  /*
17
17
  * Generate compiler_flags as an array of individual characters. This is a
@@ -11,7 +11,7 @@
11
11
  */
12
12
 
13
13
  #define PLATFORM "platform: BSD-x86_64"
14
- #define DATE "built on: Tue Mar 15 19:22:05 2022 UTC"
14
+ #define DATE "built on: Tue Jul 5 15:02:34 2022 UTC"
15
15
 
16
16
  /*
17
17
  * Generate compiler_flags as an array of individual characters. This is a
@@ -11,7 +11,7 @@
11
11
  */
12
12
 
13
13
  #define PLATFORM "platform: BSD-x86_64"
14
- #define DATE "built on: Tue Mar 15 19:22:12 2022 UTC"
14
+ #define DATE "built on: Tue Jul 5 15:02:38 2022 UTC"
15
15
 
16
16
  /*
17
17
  * Generate compiler_flags as an array of individual characters. This is a
@@ -11,7 +11,7 @@
11
11
  */
12
12
 
13
13
  #define PLATFORM "platform: "
14
- #define DATE "built on: Tue Mar 15 19:26:23 2022 UTC"
14
+ #define DATE "built on: Tue Jul 5 15:04:18 2022 UTC"
15
15
 
16
16
  /*
17
17
  * Generate compiler_flags as an array of individual characters. This is a
@@ -11,7 +11,7 @@
11
11
  */
12
12
 
13
13
  #define PLATFORM "platform: "
14
- #define DATE "built on: Tue Mar 15 19:26:29 2022 UTC"
14
+ #define DATE "built on: Tue Jul 5 15:04:20 2022 UTC"
15
15
 
16
16
  /*
17
17
  * Generate compiler_flags as an array of individual characters. This is a
@@ -11,7 +11,7 @@
11
11
  */
12
12
 
13
13
  #define PLATFORM "platform: "
14
- #define DATE "built on: Tue Mar 15 19:26:35 2022 UTC"
14
+ #define DATE "built on: Tue Jul 5 15:04:22 2022 UTC"
15
15
 
16
16
  /*
17
17
  * Generate compiler_flags as an array of individual characters. This is a
@@ -11,7 +11,7 @@
11
11
  */
12
12
 
13
13
  #define PLATFORM "platform: VC-WIN64-ARM"
14
- #define DATE "built on: Tue Mar 15 19:26:38 2022 UTC"
14
+ #define DATE "built on: Tue Jul 5 15:04:23 2022 UTC"
15
15
 
16
16
  /*
17
17
  * Generate compiler_flags as an array of individual characters. This is a
@@ -11,7 +11,7 @@
11
11
  */
12
12
 
13
13
  #define PLATFORM "platform: "
14
- #define DATE "built on: Tue Mar 15 19:25:52 2022 UTC"
14
+ #define DATE "built on: Tue Jul 5 15:04:08 2022 UTC"
15
15
 
16
16
  /*
17
17
  * Generate compiler_flags as an array of individual characters. This is a