You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Macro for registering a Node-API module exporting an interface invoking a quaternary function accepting a double-precision floating-point number and three signed 32-bit integers and returning a double-precision floating-point number.
172
+
173
+
```c
174
+
static double add( const double x, const int32_t y, const int32_t z, const int32_t w ) {
Invokes a quaternary function accepting a double-precision floating-point number and three signed 32-bit integers and returning a double-precision floating-point number.
193
+
194
+
```c
195
+
#include<node_api.h>
196
+
197
+
// ...
198
+
199
+
staticdoubleadd( const double x, const int32_t y, const int32_t z, const int32_t w ) {
200
+
return x + y + z + w;
201
+
}
202
+
203
+
// ...
204
+
205
+
/**
206
+
* Receives JavaScript callback invocation data.
207
+
*
208
+
*@param env environment under which the function is invoked
209
+
*@param info callback data
210
+
*@return Node-API value
211
+
*/
212
+
napi_value addon( napi_env env, napi_callback_info info ) {
Macro for registering a Node-API module exporting an interface for invoking a quaternary function accepting and returning single-precision floating-point numbers.
0 commit comments