]> git.proxmox.com Git - mirror_edk2.git/blobdiff - AppPkg/Applications/Python/Python-2.7.2/Lib/lib2to3/fixes/fix_long.py
AppPkg/Applications/Python: Add Python 2.7.2 sources since the release of Python...
[mirror_edk2.git] / AppPkg / Applications / Python / Python-2.7.2 / Lib / lib2to3 / fixes / fix_long.py
diff --git a/AppPkg/Applications/Python/Python-2.7.2/Lib/lib2to3/fixes/fix_long.py b/AppPkg/Applications/Python/Python-2.7.2/Lib/lib2to3/fixes/fix_long.py
new file mode 100644 (file)
index 0000000..0869b65
--- /dev/null
@@ -0,0 +1,19 @@
+# Copyright 2006 Google, Inc. All Rights Reserved.\r
+# Licensed to PSF under a Contributor Agreement.\r
+\r
+"""Fixer that turns 'long' into 'int' everywhere.\r
+"""\r
+\r
+# Local imports\r
+from lib2to3 import fixer_base\r
+from lib2to3.fixer_util import is_probably_builtin\r
+\r
+\r
+class FixLong(fixer_base.BaseFix):\r
+    BM_compatible = True\r
+    PATTERN = "'long'"\r
+\r
+    def transform(self, node, results):\r
+        if is_probably_builtin(node):\r
+            node.value = u"int"\r
+            node.changed()\r