aboutsummaryrefslogtreecommitdiff
path: root/emscripten.py
diff options
context:
space:
mode:
authorJez Ng <me@jezng.com>2013-07-11 21:02:34 -0700
committerJez Ng <me@jezng.com>2013-07-11 21:02:34 -0700
commit392b7183a978fd1d62c29fc027973943fc440510 (patch)
tree4b402c266e0f07cc5878e0268fae02b03d667590 /emscripten.py
parent470b7da45616f7c72794cf3ced71f21db2ebdc2c (diff)
Account for newlines.
Diffstat (limited to 'emscripten.py')
-rwxr-xr-xemscripten.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/emscripten.py b/emscripten.py
index 30c7a5ae..5c3e28f7 100755
--- a/emscripten.py
+++ b/emscripten.py
@@ -9,7 +9,7 @@ header files (so that the JS compiler can see the constants in those
headers, for the libc implementation in JS).
'''
-import os, sys, json, optparse, subprocess, re, time, multiprocessing, functools
+import os, sys, json, optparse, subprocess, re, time, multiprocessing, string
from tools import shared
from tools import jsrun, cache as cache_module, tempfiles
@@ -627,7 +627,7 @@ Runtime.stackRestore = function(top) { asm['stackRestore'](top) };
if forwarded_json['Variables']['globals'][k]['named']}
for raw in last_forwarded_json['Functions']['tables'].itervalues():
if raw == '': continue
- table = raw[raw.find('[')+1:raw.find(']')].split(",")
+ table = map(string.strip, raw[raw.find('[')+1:raw.find(']')].split(","))
symbol_table.update(map(lambda x: (x[1], x[0]),
filter(lambda x: x[1] != '0', enumerate(table))))
outfile.write("var SYMBOL_TABLE = %s;" % json.dumps(symbol_table))