Skip to content

Commit

Permalink
replace NODE_MODULE with NODE_MODULE_INIT macro (mendsley#20)
Browse files Browse the repository at this point in the history
  • Loading branch information
gaetandezeiraud committed Oct 17, 2021
1 parent aa939f7 commit 01dae9b
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/Main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -105,13 +105,15 @@ namespace bsdpNode {
Nan::ThrowError(error);
}

void init(Local<Object> exports, Local<Object> module) {
void init(Local<Object> exports) {
NODE_SET_METHOD(exports, "diff", diff);
NODE_SET_METHOD(exports, "diffSync", diffSync);

NODE_SET_METHOD(exports, "patch", patch);
NODE_SET_METHOD(exports, "patchSync", patchSync);
}

NODE_MODULE(bsdp, init)
NODE_MODULE_INIT() {
init(exports);
}
}

0 comments on commit 01dae9b

Please sign in to comment.