diff options
author | Alon Zakai <alonzakai@gmail.com> | 2012-11-20 17:23:54 +0100 |
---|---|---|
committer | Alon Zakai <alonzakai@gmail.com> | 2012-11-20 17:23:54 +0100 |
commit | 37adac3b78a564ecf12c45fe8ca5d180b24b3f44 (patch) | |
tree | aaa69997dfbe413616cb4c218a470bf6f17d4982 /src/jsifier.js | |
parent | d1142231b2fac92a8ca651e61aad579292c21b85 (diff) |
EXPORT_ALL option
Diffstat (limited to 'src/jsifier.js')
-rw-r--r-- | src/jsifier.js | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/jsifier.js b/src/jsifier.js index 7960115f..2791c65b 100644 --- a/src/jsifier.js +++ b/src/jsifier.js @@ -332,7 +332,7 @@ function JSify(data, functionsOnly, givenFunctions) { if (item.ident.substr(0, 5) == '__ZTV') { js += '\n' + makePointer('[0]', null, BUILD_AS_SHARED_LIB ? 'ALLOC_NORMAL' : 'ALLOC_STATIC', ['void*']) + ';'; } - if (item.ident in EXPORTED_GLOBALS) { + if (EXPORT_ALL || (item.ident in EXPORTED_GLOBALS)) { js += '\nModule["' + item.ident + '"] = ' + item.ident + ';'; } if (BUILD_AS_SHARED_LIB == 2 && !item.private_) { @@ -442,7 +442,7 @@ function JSify(data, functionsOnly, givenFunctions) { } var text = (deps ? '\n' + deps.map(addFromLibrary).filter(function(x) { return x != '' }).join('\n') : ''); text += isFunction ? snippet : 'var ' + ident + '=' + snippet + ';'; - if (ident in EXPORTED_FUNCTIONS) { + if (EXPORT_ALL || (ident in EXPORTED_FUNCTIONS)) { text += '\nModule["' + ident + '"] = ' + ident + ';'; } return text; @@ -702,7 +702,7 @@ function JSify(data, functionsOnly, givenFunctions) { func.JS += '\n//FUNCTION_END_MARKER_OF_SOURCE_FILE_' + associatedSourceFile + '\n'; } - if (func.ident in EXPORTED_FUNCTIONS) { + if (EXPORT_ALL || (func.ident in EXPORTED_FUNCTIONS)) { func.JS += 'Module["' + func.ident + '"] = ' + func.ident + ';'; } |