Ejemplo n.º 1
0
 def newint(self, intval):
     if self.config.objspace.std.withsmalllong and isinstance(intval, base_int):
         from pypy.objspace.std.smalllongobject import W_SmallLongObject
         from rpython.rlib.rarithmetic import r_longlong, r_ulonglong
         from rpython.rlib.rarithmetic import longlongmax
         if (not isinstance(intval, r_ulonglong)
             or intval <= r_ulonglong(longlongmax)):
             return W_SmallLongObject(r_longlong(intval))
     intval = widen(intval)
     if not isinstance(intval, int):
         return W_LongObject.fromrarith_int(intval)
     return wrapint(self, intval)
Ejemplo n.º 2
0
 def newint(self, intval):
     return wrapint(self, intval)
Ejemplo n.º 3
0
 def newint(self, intval):
     return wrapint(self, intval)