File tree Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -58,10 +58,12 @@ Napi::Object Init(Napi::Env env, Napi::Object exports) {
58
58
/**
59
59
* This code defines the entry- point for the Node addon, it tells Node where to go
60
60
* once the library has been loaded into active memory. The first argument must
61
- * match the " target" in our * binding.gyp* . The second argument points to the
62
- * function to invoke.
61
+ * match the " target" in our * binding.gyp* . Using NODE_GYP_MODULE_NAME ensures
62
+ * that the argument will be correct, as long as the module is built with
63
+ * node- gyp (which is the usual way of building modules). The second argument
64
+ * points to the function to invoke. The function must not be namespaced.
63
65
*/
64
- NODE_API_MODULE(myModule , Init)
66
+ NODE_API_MODULE(NODE_GYP_MODULE_NAME , Init)
65
67
```
66
68
67
69
# # **node-gyp** reference
You can’t perform that action at this time.
0 commit comments