File tree 1 file changed +3
-2
lines changed
1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -172,7 +172,7 @@ Function pointer type for user-provided native functions which are to be
172
172
exposed to JavaScript via N-API. Callback functions should satisfy the
173
173
following signature:
174
174
``` C
175
- typedef void (* napi_callback)(napi_env, napi_callback_info);
175
+ typedef napi_value (* napi_callback)(napi_env, napi_callback_info);
176
176
```
177
177
178
178
#### *napi_finalize*
@@ -2521,8 +2521,9 @@ In order to expose a function as part of the
2521
2521
add-on's module exports, set the newly created function on the exports
2522
2522
object. A sample module might look as follows:
2523
2523
```C
2524
- void SayHello(napi_env env, napi_callback_info info) {
2524
+ napi_value SayHello(napi_env env, napi_callback_info info) {
2525
2525
printf("Hello\n");
2526
+ return nullptr;
2526
2527
}
2527
2528
2528
2529
void Init(napi_env env, napi_value exports, napi_value module, void* priv) {
You can’t perform that action at this time.
0 commit comments