[pypy-svn] r72529 - pypy/trunk/pypy/translator/cli/src

arigo at codespeak.net arigo at codespeak.net
Mon Mar 22 12:04:45 CET 2010


Author: arigo
Date: Mon Mar 22 12:04:44 2010
New Revision: 72529

Modified:
   pypy/trunk/pypy/translator/cli/src/pypylib.cs
Log:
Add the case of receiving a CLI 'long' (i.e. a PyPy 'long long').


Modified: pypy/trunk/pypy/translator/cli/src/pypylib.cs
==============================================================================
--- pypy/trunk/pypy/translator/cli/src/pypylib.cs	(original)
+++ pypy/trunk/pypy/translator/cli/src/pypylib.cs	Mon Mar 22 12:04:44 2010
@@ -422,6 +422,16 @@
             return Convert.ToString(n, base_);
         }
 
+        public static string OOString(long n, int base_)
+        {
+            if (base_ == -1)
+                base_ = 10;
+            if (n<0 && base_ != 10)
+                return "-" + Convert.ToString(-n, base_);
+            else
+                return Convert.ToString(n, base_);
+        }
+
         public static string OOString(double d, int base_)
         {
             return d.ToString();



More information about the Pypy-commit mailing list