예제 #1
0
파일: objspace.py 프로젝트: xen0n/pypy
 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)
예제 #2
0
 def newint(self, intval):
     return wrapint(self, intval)
예제 #3
0
파일: objspace.py 프로젝트: Qointum/pypy
 def newint(self, intval):
     return wrapint(self, intval)