コード例 #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)