[pypy-svn] r72530 - pypy/trunk/pypy/translator/jvm/src/pypy

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


Author: arigo
Date: Mon Mar 22 12:07:20 2010
New Revision: 72530

Modified:
   pypy/trunk/pypy/translator/jvm/src/pypy/PyPy.java
Log:
Add the case of receiving a Java 'long' (i.e. a PyPy 'long long').


Modified: pypy/trunk/pypy/translator/jvm/src/pypy/PyPy.java
==============================================================================
--- pypy/trunk/pypy/translator/jvm/src/pypy/PyPy.java	(original)
+++ pypy/trunk/pypy/translator/jvm/src/pypy/PyPy.java	Mon Mar 22 12:07:20 2010
@@ -839,6 +839,15 @@
             return Integer.toString(n, base_);
     }
 
+    public String oostring(long n, int base_) {
+        if (base_ == -1)
+            base_ = 10;
+        if (n < 0 && base_ != 10)
+            return "-" + Long.toString(-n, base_);
+        else
+            return Long.toString(n, base_);
+    }
+
     public String oostring(double d, int base_) {
         if (d == Double.POSITIVE_INFINITY)
             return "inf";



More information about the Pypy-commit mailing list