Skip to content

Commit

Permalink
Rename Init function to work around node-addon-api bug
Browse files Browse the repository at this point in the history
  • Loading branch information
addaleax committed May 11, 2021
1 parent 63a04a1 commit b5b91b3
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions binding.cc
Original file line number Diff line number Diff line change
Expand Up @@ -499,7 +499,7 @@ void Lookup(const CallbackInfo& args) {

} // anonymous namespace

static Object Init(Env env, Object exports) {
static Object InitOSDnsNative(Env env, Object exports) {
exports["lookup"] = Function::New(env, Lookup);
Object constants = Object::New(env);
constants["INTERNET"] = Number::New(env, static_cast<int>(QueryClass::INTERNET));
Expand All @@ -512,4 +512,4 @@ static Object Init(Env env, Object exports) {
return exports;
}

NODE_API_MODULE(os_dns_native, Init)
NODE_API_MODULE(os_dns_native, InitOSDnsNative)

0 comments on commit b5b91b3

Please sign in to comment.