Created
July 28, 2011 13:35
-
-
Save jschementi/1111557 to your computer and use it in GitHub Desktop.
Patch to make IronPython build for .NET 2.0
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/Languages/IronPython/IronPython.Modules/_csv.cs b/Languages/IronPython/IronPython.Modules/_csv.cs | |
index 982a735..9eef957 100644 | |
--- a/Languages/IronPython/IronPython.Modules/_csv.cs | |
+++ b/Languages/IronPython/IronPython.Modules/_csv.cs | |
@@ -739,7 +739,11 @@ in CSV format.")] | |
_state = State.StartRecord; | |
_fields.Clear(); | |
_is_numeric_field = false; | |
+#if !CLR2 | |
_field.Clear(); | |
+#else | |
+ _field = new StringBuilder(); | |
+#endif | |
} | |
#endregion | |
@@ -982,7 +986,11 @@ in CSV format.")] | |
else | |
_fields.Add(field); | |
+#if !CLR2 | |
_field.Clear(); | |
+#else | |
+ _field = new StringBuilder(); | |
+#endif | |
} | |
} | |
diff --git a/Languages/IronPython/IronPython/Modules/_ast.cs b/Languages/IronPython/IronPython/Modules/_ast.cs | |
index f486239..935649d 100644 | |
--- a/Languages/IronPython/IronPython/Modules/_ast.cs | |
+++ b/Languages/IronPython/IronPython/Modules/_ast.cs | |
@@ -301,7 +301,11 @@ namespace IronPython.Modules | |
if (expr.Value == null) | |
return new Name("None", Load.Instance); | |
- if (expr.Value is int || expr.Value is double || expr.Value is Int64 || expr.Value is BigInteger || expr.Value is Complex) | |
+ if (expr.Value is int || expr.Value is double || expr.Value is Int64 || expr.Value is BigInteger | |
+#if !CLR2 | |
+ || expr.Value is Complex | |
+#endif | |
+ ) | |
ast = new Num(expr.Value); | |
else if (expr.Value is string) | |
ast = new Str((string)expr.Value); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment