aboutsummaryrefslogtreecommitdiff
path: root/src/jsifier.js
diff options
context:
space:
mode:
authorkripken <alonzakai@gmail.com>2011-08-05 20:49:16 -0700
committerkripken <alonzakai@gmail.com>2011-08-05 20:49:16 -0700
commitcca5278aff73c0c593baa36320daa812550e4911 (patch)
tree8c937405d2b2789775b7d0b3fe3ec9ff27b90521 /src/jsifier.js
parentb37f0ce62244d16cb216b1f125d7dc76c90c066e (diff)
parent869dd298eb0a61b882688cb9e79c4df729b64a54 (diff)
Merge pull request #63 from max99x/master
Various fixes resulting form Python testing
Diffstat (limited to 'src/jsifier.js')
-rw-r--r--src/jsifier.js4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/jsifier.js b/src/jsifier.js
index c0f7ccb1..c6f73d50 100644
--- a/src/jsifier.js
+++ b/src/jsifier.js
@@ -212,7 +212,9 @@ function JSify(data, functionsOnly, givenFunctions, givenGlobalVariables) {
});
constant = '[' + constant.join(', ') + ']';
}
- constant = makePointer(constant, null, 'ALLOC_STATIC', item.type);
+ // NOTE: This is the only place that could potentially create static
+ // allocations in a shared library.
+ constant = makePointer(constant, null, BUILD_AS_SHARED_LIB ? 'ALLOC_NORMAL' : 'ALLOC_STATIC', item.type);
var js = item.ident + '=' + constant + ';';
if (item.ident in EXPORTED_GLOBALS) {