diff options
author | Alon Zakai <alonzakai@gmail.com> | 2013-01-22 11:37:18 -0800 |
---|---|---|
committer | Alon Zakai <alonzakai@gmail.com> | 2013-01-22 11:37:18 -0800 |
commit | 6f3e1629f8a97cbe2aa2ad430df32cc13c616889 (patch) | |
tree | 69135b30cd01bee76772530d20421913f6b3cbca | |
parent | 783f679a99fd89878896cfb42d9fbb75e5da33e1 (diff) |
make function indexing replacements JSON-friendly
-rwxr-xr-x | emscripten.py | 2 | ||||
-rw-r--r-- | src/modules.js | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/emscripten.py b/emscripten.py index dd6a3ebd..780d3541 100755 --- a/emscripten.py +++ b/emscripten.py @@ -270,7 +270,7 @@ def emscript(infile, settings, outfile, libraries=[]): indexing = forwarded_json['Functions']['indexedFunctions'] def indexize(js): - return re.sub(r'"{{ FI_([\w\d_$]+) }}"', lambda m: str(indexing.get(m.groups(0)[0]) or 0), js) + return re.sub(r"'{{ FI_([\w\d_$]+) }}'", lambda m: str(indexing.get(m.groups(0)[0]) or 0), js) blockaddrs = forwarded_json['Functions']['blockAddresses'] def blockaddrsize(js): diff --git a/src/modules.js b/src/modules.js index e7779b94..435fb894 100644 --- a/src/modules.js +++ b/src/modules.js @@ -247,7 +247,7 @@ var Functions = { } if (phase != 'post' && singlePhase) { if (!doNotCreate) this.indexedFunctions[ident] = 0; // tell python we need this indexized - return '"{{ FI_' + ident + ' }}"'; // something python will replace later + return "'{{ FI_" + ident + " }}'"; // something python will replace later } else { var ret = this.indexedFunctions[ident]; if (!ret) { |