@@ -72,11 +72,11 @@ void Method(const FunctionCallbackInfo<Value>& args) {
|
72 | 72 | args.GetReturnValue().Set(String::NewFromUtf8(isolate, "world")); |
73 | 73 | } |
74 | 74 | |
75 | | -void init(Local<Object> exports) { |
| 75 | +void Initialize(Local<Object> exports) { |
76 | 76 | NODE_SET_METHOD(exports, "hello", Method); |
77 | 77 | } |
78 | 78 | |
79 | | -NODE_MODULE(NODE_GYP_MODULE_NAME, init) |
| 79 | +NODE_MODULE(NODE_GYP_MODULE_NAME, Initialize) |
80 | 80 | |
81 | 81 | } // namespace demo |
82 | 82 | ``` |
@@ -95,8 +95,8 @@ There is no semi-colon after `NODE_MODULE` as it's not a function (see
|
95 | 95 | The `module_name` must match the filename of the final binary (excluding |
96 | 96 | the `.node` suffix). |
97 | 97 | |
98 | | -In the `hello.cc` example, then, the initialization function is `init` and the |
99 | | -Addon module name is `addon`. |
| 98 | +In the `hello.cc` example, then, the initialization function is `Initialize` |
| 99 | +and the addon module name is `addon`. |
100 | 100 | |
101 | 101 | ### Building |
102 | 102 | |
|