aboutsummaryrefslogtreecommitdiff
path: root/emscripten.py
diff options
context:
space:
mode:
authorAlon Zakai <alonzakai@gmail.com>2013-05-05 18:05:44 -0700
committerAlon Zakai <alonzakai@gmail.com>2013-05-05 18:05:44 -0700
commitfc41fce2f5e9ac88939bb55d3391fbedbaafbf6a (patch)
tree37ffed9715167c23c41fd10d9d6867fc07be90fa /emscripten.py
parent2a85aa178d7b14ff689c061361bf50ab85d2573a (diff)
generate empty function tables of proper size
Diffstat (limited to 'emscripten.py')
-rwxr-xr-xemscripten.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/emscripten.py b/emscripten.py
index 924012af..7352b293 100755
--- a/emscripten.py
+++ b/emscripten.py
@@ -371,7 +371,7 @@ def emscript(infile, settings, outfile, libraries=[], compiler_engine=None,
sig = use[8:len(use)-4]
if sig not in last_forwarded_json['Functions']['tables']:
if DEBUG: print >> sys.stderr, 'add empty function table', sig
- last_forwarded_json['Functions']['tables'][sig] = 'var FUNCTION_TABLE_' + sig + ' = [0,0];\n'
+ last_forwarded_json['Functions']['tables'][sig] = 'var FUNCTION_TABLE_' + sig + ' = [' + ','.join(['0']*forwarded_json['Functions']['nextIndex']) + '];\n'
def make_table(sig, raw):
i = Counter.i