diff options
author | max99x <max99x@gmail.com> | 2011-08-25 08:26:39 +0300 |
---|---|---|
committer | max99x <max99x@gmail.com> | 2011-08-25 08:30:25 +0300 |
commit | 96189e4f02f5e78481925ab2add6044a2a55fa5e (patch) | |
tree | 2231ea6c49170f880be59f6df9ed7d7eecd6a24b /src/jsifier.js | |
parent | 96a5349290b327f024f05b906886aa4af6ed08b3 (diff) |
Fixed usage of parent global vars inside shared libs.
Diffstat (limited to 'src/jsifier.js')
-rw-r--r-- | src/jsifier.js | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/jsifier.js b/src/jsifier.js index 1e02555f..76e4ec9e 100644 --- a/src/jsifier.js +++ b/src/jsifier.js @@ -186,7 +186,12 @@ function JSify(data, functionsOnly, givenFunctions, givenGlobalVariables) { '\n}\n'; return ret; } else { - item.JS = 'var ' + item.ident + ';'; + if (item.external && BUILD_AS_SHARED_LIB) { + // External variables in shared libraries should not be declared. + item.JS = ''; + } else { + item.JS = 'var ' + item.ident + ';'; + } var constant = null; if (item.external) { return ret; |