summaryrefslogtreecommitdiff
path: root/tools/js2c.py
diff options
context:
space:
mode:
authorBen Noordhuis <info@bnoordhuis.nl>2013-07-24 18:13:25 +0200
committerBen Noordhuis <info@bnoordhuis.nl>2013-07-24 21:49:34 +0200
commit457d52924152c6f2baf2fddbe76a03bca7bdde7c (patch)
tree6fd8aba9681deeaeaebad428eb0b8e4896f8a3e0 /tools/js2c.py
parent4b279f00921b251f58ff7213c6a1518c66281747 (diff)
downloadandroid-node-v8-457d52924152c6f2baf2fddbe76a03bca7bdde7c.tar.gz
android-node-v8-457d52924152c6f2baf2fddbe76a03bca7bdde7c.tar.bz2
android-node-v8-457d52924152c6f2baf2fddbe76a03bca7bdde7c.zip
tools: fix js2c macro expansion bug
If the same macro was used twice in close proximity, the second one didn't get expanded.
Diffstat (limited to 'tools/js2c.py')
-rwxr-xr-xtools/js2c.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/tools/js2c.py b/tools/js2c.py
index 772a0f5f69..bbbccb289a 100755
--- a/tools/js2c.py
+++ b/tools/js2c.py
@@ -150,9 +150,10 @@ def ExpandMacros(lines, macros):
result = macro.expand(mapping)
# Replace the occurrence of the macro with the expansion
lines = lines[:start] + result + lines[end:]
- start = lines.find(name + '(', end)
+ start = lines.find(name + '(', start)
return lines
+
class TextMacro:
def __init__(self, args, body):
self.args = args