Index: tools/js2c.py |
diff --git a/tools/js2c.py b/tools/js2c.py |
index fa559f362c4f865cf50f5bdcfa74afd469779053..d06cbe47a951127db4e64c04e64b56ce2fc3372b 100644 |
--- a/tools/js2c.py |
+++ b/tools/js2c.py |
@@ -1,6 +1,6 @@ |
#!/usr/bin/env python |
# |
-# Copyright 2006-2008 the V8 project authors. All rights reserved. |
+# Copyright 2012 the V8 project authors. All rights reserved. |
# Redistribution and use in source and binary forms, with or without |
# modification, are permitted provided that the following conditions are |
# met: |
@@ -195,14 +195,14 @@ def ReadMacros(lines): |
macro_match = MACRO_PATTERN.match(line) |
if macro_match: |
name = macro_match.group(1) |
- args = map(string.strip, macro_match.group(2).split(',')) |
+ args = [match.strip() for match in macro_match.group(2).split(',')] |
body = macro_match.group(3).strip() |
macros.append((re.compile("\\b%s\\(" % name), TextMacro(args, body))) |
else: |
python_match = PYTHON_MACRO_PATTERN.match(line) |
if python_match: |
name = python_match.group(1) |
- args = map(string.strip, python_match.group(2).split(',')) |
+ args = [match.strip() for match in python_match.group(2).split(',')] |
body = python_match.group(3).strip() |
fun = eval("lambda " + ",".join(args) + ': ' + body) |
macros.append((re.compile("\\b%s\\(" % name), PythonMacro(args, fun))) |