Skip to content

Commit

Permalink
visibility=hidden to not pollute the global symbol space
Browse files Browse the repository at this point in the history
  • Loading branch information
mmomtchev committed Oct 29, 2023
1 parent 860acc2 commit 217393e
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions binding.gyp
Original file line number Diff line number Diff line change
Expand Up @@ -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' ],
Expand Down
4 changes: 2 additions & 2 deletions src/main.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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)

0 comments on commit 217393e

Please sign in to comment.