diff --git a/binding.gyp b/binding.gyp index e9ec495..86eebc1 100644 --- a/binding.gyp +++ b/binding.gyp @@ -99,6 +99,7 @@ 'MACOSX_DEPLOYMENT_TARGET': '10.7', 'OTHER_CPLUSPLUSFLAGS': [ '-std=c++14' ] }, + 'cflags': [ '-fvisibility=hidden '], 'cflags_cc': [ '-std=c++14' ], 'cflags!': [ '-fno-exceptions' ], 'cflags_cc!': [ '-fno-exceptions' ], diff --git a/src/main.cc b/src/main.cc index 99f174f..9740d8c 100644 --- a/src/main.cc +++ b/src/main.cc @@ -110,7 +110,7 @@ static void InitDebug() { } #endif -Napi::Object Pymp_Init(Env env, Object exports) { +static Napi::Object PympInit(Env env, Object exports) { #ifdef DEBUG InitDebug(); #endif @@ -223,4 +223,4 @@ Napi::Object Pymp_Init(Env env, Object exports) { return exports; } -NODE_API_MODULE(pymport, Pymp_Init) +NODE_API_MODULE(pymport, PympInit)