Rip out 'long' and 'L'-suffixed integer literals.
(Rough first cut.)
This commit is contained in:
parent
fc7bb8c786
commit
e2a383d062
|
@ -331,12 +331,12 @@ class BaseHTTPRequestHandler(SocketServer.StreamRequestHandler):
|
|||
"""
|
||||
|
||||
try:
|
||||
short, long = self.responses[code]
|
||||
shortmsg, longmsg = self.responses[code]
|
||||
except KeyError:
|
||||
short, long = '???', '???'
|
||||
shortmsg, longmsg = '???', '???'
|
||||
if message is None:
|
||||
message = short
|
||||
explain = long
|
||||
message = shortmsg
|
||||
explain = longmsg
|
||||
self.log_error("code %d, message %s", code, message)
|
||||
# using _quote_html to prevent Cross Site Scripting attacks (see bug #1100201)
|
||||
content = (self.error_message_format %
|
||||
|
|
|
@ -20,7 +20,7 @@ class UserString:
|
|||
def __str__(self): return str(self.data)
|
||||
def __repr__(self): return repr(self.data)
|
||||
def __int__(self): return int(self.data)
|
||||
def __long__(self): return long(self.data)
|
||||
def __long__(self): return int(self.data)
|
||||
def __float__(self): return float(self.data)
|
||||
def __complex__(self): return complex(self.data)
|
||||
def __hash__(self): return hash(self.data)
|
||||
|
|
|
@ -142,7 +142,7 @@ __all__ = ["Error","open","openfp"]
|
|||
class Error(Exception):
|
||||
pass
|
||||
|
||||
_AIFC_version = 0xA2805140L # Version 1 of AIFF-C
|
||||
_AIFC_version = 0xA2805140 # Version 1 of AIFF-C
|
||||
|
||||
_skiplist = 'COMT', 'INST', 'MIDI', 'AESD', \
|
||||
'APPL', 'NAME', 'AUTH', '(c) ', 'ANNO'
|
||||
|
@ -191,7 +191,7 @@ def _read_float(f): # 10 bytes
|
|||
f = _HUGE_VAL
|
||||
else:
|
||||
expon = expon - 16383
|
||||
f = (himant * 0x100000000L + lomant) * pow(2.0, expon - 63)
|
||||
f = (himant * 0x100000000 + lomant) * pow(2.0, expon - 63)
|
||||
return sign * f
|
||||
|
||||
def _write_short(f, x):
|
||||
|
@ -233,10 +233,10 @@ def _write_float(f, x):
|
|||
expon = expon | sign
|
||||
fmant = math.ldexp(fmant, 32)
|
||||
fsmant = math.floor(fmant)
|
||||
himant = long(fsmant)
|
||||
himant = int(fsmant)
|
||||
fmant = math.ldexp(fmant - fsmant, 32)
|
||||
fsmant = math.floor(fmant)
|
||||
lomant = long(fsmant)
|
||||
lomant = int(fsmant)
|
||||
_write_short(f, expon)
|
||||
_write_long(f, himant)
|
||||
_write_long(f, lomant)
|
||||
|
|
|
@ -105,7 +105,7 @@ class async_chat (asyncore.dispatcher):
|
|||
# no terminator, collect it all
|
||||
self.collect_incoming_data (self.ac_in_buffer)
|
||||
self.ac_in_buffer = ''
|
||||
elif isinstance(terminator, int) or isinstance(terminator, long):
|
||||
elif isinstance(terminator, int) or isinstance(terminator, int):
|
||||
# numeric terminator
|
||||
n = terminator
|
||||
if lb < n:
|
||||
|
|
|
@ -129,7 +129,7 @@ _b32alphabet = {
|
|||
_b32tab = _b32alphabet.items()
|
||||
_b32tab.sort()
|
||||
_b32tab = [v for k, v in _b32tab]
|
||||
_b32rev = dict([(v, long(k)) for k, v in _b32alphabet.items()])
|
||||
_b32rev = dict([(v, int(k)) for k, v in _b32alphabet.items()])
|
||||
|
||||
|
||||
def b32encode(s):
|
||||
|
|
|
@ -99,7 +99,7 @@ _copy_dispatch = d = {}
|
|||
|
||||
def _copy_immutable(x):
|
||||
return x
|
||||
for t in (type(None), int, long, float, bool, str, tuple,
|
||||
for t in (type(None), int, int, float, bool, str, tuple,
|
||||
frozenset, type, xrange, types.ClassType,
|
||||
types.BuiltinFunctionType,
|
||||
types.FunctionType):
|
||||
|
@ -178,7 +178,7 @@ def _deepcopy_atomic(x, memo):
|
|||
return x
|
||||
d[type(None)] = _deepcopy_atomic
|
||||
d[int] = _deepcopy_atomic
|
||||
d[long] = _deepcopy_atomic
|
||||
d[int] = _deepcopy_atomic
|
||||
d[float] = _deepcopy_atomic
|
||||
d[bool] = _deepcopy_atomic
|
||||
try:
|
||||
|
@ -315,7 +315,7 @@ class _EmptyClass:
|
|||
pass
|
||||
|
||||
def _test():
|
||||
l = [None, 1, 2L, 3.14, 'xyzzy', (1, 2L), [3.14, 'abc'],
|
||||
l = [None, 1, 2, 3.14, 'xyzzy', (1, 2), [3.14, 'abc'],
|
||||
{'abc': 'ABC'}, (), [], {}]
|
||||
l1 = copy(l)
|
||||
print l1==l
|
||||
|
|
|
@ -369,7 +369,7 @@ class Sniffer:
|
|||
|
||||
for col in columnTypes.keys():
|
||||
|
||||
for thisType in [int, long, float, complex]:
|
||||
for thisType in [int, int, float, complex]:
|
||||
try:
|
||||
thisType(row[col])
|
||||
break
|
||||
|
@ -380,7 +380,7 @@ class Sniffer:
|
|||
thisType = len(row[col])
|
||||
|
||||
# treat longs as ints
|
||||
if thisType == long:
|
||||
if thisType == int:
|
||||
thisType = int
|
||||
|
||||
if thisType != columnTypes[col]:
|
||||
|
|
|
@ -66,7 +66,7 @@ def create_string_buffer(init, size=None):
|
|||
buf = buftype()
|
||||
buf.value = init
|
||||
return buf
|
||||
elif isinstance(init, (int, long)):
|
||||
elif isinstance(init, (int, int)):
|
||||
buftype = c_char * init
|
||||
buf = buftype()
|
||||
return buf
|
||||
|
@ -285,7 +285,7 @@ else:
|
|||
buf = buftype()
|
||||
buf.value = init
|
||||
return buf
|
||||
elif isinstance(init, (int, long)):
|
||||
elif isinstance(init, (int, int)):
|
||||
buftype = c_wchar * init
|
||||
buf = buftype()
|
||||
return buf
|
||||
|
@ -356,7 +356,7 @@ class CDLL(object):
|
|||
|
||||
def __getitem__(self, name_or_ordinal):
|
||||
func = self._FuncPtr((name_or_ordinal, self))
|
||||
if not isinstance(name_or_ordinal, (int, long)):
|
||||
if not isinstance(name_or_ordinal, (int, int)):
|
||||
func.__name__ = name_or_ordinal
|
||||
return func
|
||||
|
||||
|
|
|
@ -133,7 +133,7 @@ class BasicWrapTestCase(unittest.TestCase):
|
|||
f.argtypes = [c_longlong, MyCallback]
|
||||
|
||||
def callback(value):
|
||||
self.failUnless(isinstance(value, (int, long)))
|
||||
self.failUnless(isinstance(value, (int, int)))
|
||||
return value & 0x7FFFFFFF
|
||||
|
||||
cb = MyCallback(callback)
|
||||
|
|
|
@ -291,7 +291,7 @@ class FunctionTestCase(unittest.TestCase):
|
|||
f.argtypes = [c_longlong, MyCallback]
|
||||
|
||||
def callback(value):
|
||||
self.failUnless(isinstance(value, (int, long)))
|
||||
self.failUnless(isinstance(value, (int, int)))
|
||||
return value & 0x7FFFFFFF
|
||||
|
||||
cb = MyCallback(callback)
|
||||
|
|
|
@ -93,7 +93,7 @@ class NumberTestCase(unittest.TestCase):
|
|||
for t in float_types:
|
||||
self.failUnlessEqual(t(2.0).value, 2.0)
|
||||
self.failUnlessEqual(t(2).value, 2.0)
|
||||
self.failUnlessEqual(t(2L).value, 2.0)
|
||||
self.failUnlessEqual(t(2).value, 2.0)
|
||||
|
||||
def test_integers(self):
|
||||
# integers cannot be constructed from floats
|
||||
|
|
|
@ -5,8 +5,8 @@ import _ctypes_test
|
|||
|
||||
ctype_types = [c_byte, c_ubyte, c_short, c_ushort, c_int, c_uint,
|
||||
c_long, c_ulong, c_longlong, c_ulonglong, c_double, c_float]
|
||||
python_types = [int, int, int, int, int, long,
|
||||
int, long, long, long, float, float]
|
||||
python_types = [int, int, int, int, int, int,
|
||||
int, int, int, int, float, float]
|
||||
|
||||
class PointersTestCase(unittest.TestCase):
|
||||
|
||||
|
@ -160,16 +160,16 @@ class PointersTestCase(unittest.TestCase):
|
|||
def test_c_void_p(self):
|
||||
# http://sourceforge.net/tracker/?func=detail&aid=1518190&group_id=5470&atid=105470
|
||||
if sizeof(c_void_p) == 4:
|
||||
self.failUnlessEqual(c_void_p(0xFFFFFFFFL).value,
|
||||
self.failUnlessEqual(c_void_p(0xFFFFFFFF).value,
|
||||
c_void_p(-1).value)
|
||||
self.failUnlessEqual(c_void_p(0xFFFFFFFFFFFFFFFFL).value,
|
||||
self.failUnlessEqual(c_void_p(0xFFFFFFFFFFFFFFFF).value,
|
||||
c_void_p(-1).value)
|
||||
elif sizeof(c_void_p) == 8:
|
||||
self.failUnlessEqual(c_void_p(0xFFFFFFFFL).value,
|
||||
0xFFFFFFFFL)
|
||||
self.failUnlessEqual(c_void_p(0xFFFFFFFFFFFFFFFFL).value,
|
||||
self.failUnlessEqual(c_void_p(0xFFFFFFFF).value,
|
||||
0xFFFFFFFF)
|
||||
self.failUnlessEqual(c_void_p(0xFFFFFFFFFFFFFFFF).value,
|
||||
c_void_p(-1).value)
|
||||
self.failUnlessEqual(c_void_p(0xFFFFFFFFFFFFFFFFFFFFFFFFL).value,
|
||||
self.failUnlessEqual(c_void_p(0xFFFFFFFFFFFFFFFFFFFFFFFF).value,
|
||||
c_void_p(-1).value)
|
||||
|
||||
self.assertRaises(TypeError, c_void_p, 3.14) # make sure floats are NOT accepted
|
||||
|
|
|
@ -33,7 +33,7 @@ def positive_address(a):
|
|||
# View the bits in `a` as unsigned instead.
|
||||
import struct
|
||||
num_bits = struct.calcsize("P") * 8 # num bits in native machine address
|
||||
a += 1L << num_bits
|
||||
a += 1 << num_bits
|
||||
assert a >= 0
|
||||
return a
|
||||
|
||||
|
|
|
@ -545,7 +545,7 @@ class Decimal(object):
|
|||
return self
|
||||
|
||||
# From an integer
|
||||
if isinstance(value, (int,long)):
|
||||
if isinstance(value, (int,int)):
|
||||
if value >= 0:
|
||||
self._sign = 0
|
||||
else:
|
||||
|
@ -561,7 +561,7 @@ class Decimal(object):
|
|||
if value[0] not in (0,1):
|
||||
raise ValueError, 'Invalid sign'
|
||||
for digit in value[1]:
|
||||
if not isinstance(digit, (int,long)) or digit < 0:
|
||||
if not isinstance(digit, (int,int)) or digit < 0:
|
||||
raise ValueError, "The second value in the tuple must be composed of non negative integer elements."
|
||||
|
||||
self._sign = value[0]
|
||||
|
@ -740,32 +740,32 @@ class Decimal(object):
|
|||
return 1
|
||||
|
||||
def __eq__(self, other):
|
||||
if not isinstance(other, (Decimal, int, long)):
|
||||
if not isinstance(other, (Decimal, int, int)):
|
||||
return NotImplemented
|
||||
return self.__cmp__(other) == 0
|
||||
|
||||
def __ne__(self, other):
|
||||
if not isinstance(other, (Decimal, int, long)):
|
||||
if not isinstance(other, (Decimal, int, int)):
|
||||
return NotImplemented
|
||||
return self.__cmp__(other) != 0
|
||||
|
||||
def __lt__(self, other):
|
||||
if not isinstance(other, (Decimal, int, long)):
|
||||
if not isinstance(other, (Decimal, int, int)):
|
||||
return NotImplemented
|
||||
return self.__cmp__(other) < 0
|
||||
|
||||
def __le__(self, other):
|
||||
if not isinstance(other, (Decimal, int, long)):
|
||||
if not isinstance(other, (Decimal, int, int)):
|
||||
return NotImplemented
|
||||
return self.__cmp__(other) <= 0
|
||||
|
||||
def __gt__(self, other):
|
||||
if not isinstance(other, (Decimal, int, long)):
|
||||
if not isinstance(other, (Decimal, int, int)):
|
||||
return NotImplemented
|
||||
return self.__cmp__(other) > 0
|
||||
|
||||
def __ge__(self, other):
|
||||
if not isinstance(other, (Decimal, int, long)):
|
||||
if not isinstance(other, (Decimal, int, int)):
|
||||
return NotImplemented
|
||||
return self.__cmp__(other) >= 0
|
||||
|
||||
|
@ -1529,7 +1529,7 @@ class Decimal(object):
|
|||
|
||||
Equivalent to long(int(self))
|
||||
"""
|
||||
return long(self.__int__())
|
||||
return int(self.__int__())
|
||||
|
||||
def _fix(self, context):
|
||||
"""Round if it is necessary to keep self within prec precision.
|
||||
|
@ -2986,7 +2986,7 @@ def _convert_other(other):
|
|||
"""
|
||||
if isinstance(other, Decimal):
|
||||
return other
|
||||
if isinstance(other, (int, long)):
|
||||
if isinstance(other, (int, int)):
|
||||
return Decimal(other)
|
||||
return NotImplemented
|
||||
|
||||
|
|
|
@ -86,7 +86,7 @@ def disassemble(co, lasti=-1):
|
|||
extended_arg = 0
|
||||
i = i+2
|
||||
if op == EXTENDED_ARG:
|
||||
extended_arg = oparg*65536L
|
||||
extended_arg = oparg*65536
|
||||
print repr(oparg).rjust(5),
|
||||
if op in hasconst:
|
||||
print '(' + repr(co.co_consts[oparg]) + ')',
|
||||
|
|
|
@ -41,8 +41,8 @@ Hello World! =?iso-2022-jp?b?GyRCJU8lbSE8JW8hPCVrJUkhKhsoQg==?=
|
|||
[('Hello World!', None),
|
||||
('\x1b$B%O%m!<%o!<%k%I!*\x1b(B', 'iso-2022-jp'),
|
||||
('Gr\xfc\xdf Gott!', 'iso-8859-1')])
|
||||
long = 'test-ja \xa4\xd8\xc5\xea\xb9\xc6\xa4\xb5\xa4\xec\xa4\xbf\xa5\xe1\xa1\xbc\xa5\xeb\xa4\xcf\xbb\xca\xb2\xf1\xbc\xd4\xa4\xce\xbe\xb5\xc7\xa7\xa4\xf2\xc2\xd4\xa4\xc3\xa4\xc6\xa4\xa4\xa4\xde\xa4\xb9'
|
||||
h = Header(long, j, header_name="Subject")
|
||||
int = 'test-ja \xa4\xd8\xc5\xea\xb9\xc6\xa4\xb5\xa4\xec\xa4\xbf\xa5\xe1\xa1\xbc\xa5\xeb\xa4\xcf\xbb\xca\xb2\xf1\xbc\xd4\xa4\xce\xbe\xb5\xc7\xa7\xa4\xf2\xc2\xd4\xa4\xc3\xa4\xc6\xa4\xa4\xa4\xde\xa4\xb9'
|
||||
h = Header(int, j, header_name="Subject")
|
||||
# test a very long header
|
||||
enc = h.encode()
|
||||
# TK: splitting point may differ by codec design and/or Header encoding
|
||||
|
@ -50,7 +50,7 @@ Hello World! =?iso-2022-jp?b?GyRCJU8lbSE8JW8hPCVrJUkhKhsoQg==?=
|
|||
=?iso-2022-jp?b?dGVzdC1qYSAbJEIkWEVqOUYkNSRsJD8lYSE8JWskTztKGyhC?=
|
||||
=?iso-2022-jp?b?GyRCMnE8VCROPjVHJyRyQlQkQyRGJCQkXiQ5GyhC?=""")
|
||||
# TK: full decode comparison
|
||||
eq(h.__unicode__().encode('euc-jp'), long)
|
||||
eq(h.__unicode__().encode('euc-jp'), int)
|
||||
|
||||
def test_payload_encoding(self):
|
||||
jhello = '\xa5\xcf\xa5\xed\xa1\xbc\xa5\xef\xa1\xbc\xa5\xeb\xa5\xc9\xa1\xaa'
|
||||
|
|
|
@ -41,8 +41,8 @@ Hello World! =?iso-2022-jp?b?GyRCJU8lbSE8JW8hPCVrJUkhKhsoQg==?=
|
|||
[('Hello World!', None),
|
||||
('\x1b$B%O%m!<%o!<%k%I!*\x1b(B', 'iso-2022-jp'),
|
||||
('Gr\xfc\xdf Gott!', 'iso-8859-1')])
|
||||
long = 'test-ja \xa4\xd8\xc5\xea\xb9\xc6\xa4\xb5\xa4\xec\xa4\xbf\xa5\xe1\xa1\xbc\xa5\xeb\xa4\xcf\xbb\xca\xb2\xf1\xbc\xd4\xa4\xce\xbe\xb5\xc7\xa7\xa4\xf2\xc2\xd4\xa4\xc3\xa4\xc6\xa4\xa4\xa4\xde\xa4\xb9'
|
||||
h = Header(long, j, header_name="Subject")
|
||||
int = 'test-ja \xa4\xd8\xc5\xea\xb9\xc6\xa4\xb5\xa4\xec\xa4\xbf\xa5\xe1\xa1\xbc\xa5\xeb\xa4\xcf\xbb\xca\xb2\xf1\xbc\xd4\xa4\xce\xbe\xb5\xc7\xa7\xa4\xf2\xc2\xd4\xa4\xc3\xa4\xc6\xa4\xa4\xa4\xde\xa4\xb9'
|
||||
h = Header(int, j, header_name="Subject")
|
||||
# test a very long header
|
||||
enc = h.encode()
|
||||
# TK: splitting point may differ by codec design and/or Header encoding
|
||||
|
@ -50,7 +50,7 @@ Hello World! =?iso-2022-jp?b?GyRCJU8lbSE8JW8hPCVrJUkhKhsoQg==?=
|
|||
=?iso-2022-jp?b?dGVzdC1qYSAbJEIkWEVqOUYkNSRsJD8lYSE8JWskTztKGyhC?=
|
||||
=?iso-2022-jp?b?GyRCMnE8VCROPjVHJyRyQlQkQyRGJCQkXiQ5GyhC?=""")
|
||||
# TK: full decode comparison
|
||||
eq(h.__unicode__().encode('euc-jp'), long)
|
||||
eq(h.__unicode__().encode('euc-jp'), int)
|
||||
|
||||
def test_payload_encoding(self):
|
||||
jhello = '\xa5\xcf\xa5\xed\xa1\xbc\xa5\xef\xa1\xbc\xa5\xeb\xa5\xc9\xa1\xaa'
|
||||
|
|
|
@ -514,7 +514,7 @@ class FTP:
|
|||
try:
|
||||
return int(s)
|
||||
except (OverflowError, ValueError):
|
||||
return long(s)
|
||||
return int(s)
|
||||
|
||||
def mkd(self, dirname):
|
||||
'''Make a directory, return its full pathname.'''
|
||||
|
@ -564,7 +564,7 @@ def parse150(resp):
|
|||
try:
|
||||
return int(s)
|
||||
except (OverflowError, ValueError):
|
||||
return long(s)
|
||||
return int(s)
|
||||
|
||||
|
||||
_227_re = None
|
||||
|
|
|
@ -256,8 +256,8 @@ class NullTranslations:
|
|||
|
||||
class GNUTranslations(NullTranslations):
|
||||
# Magic number of .mo files
|
||||
LE_MAGIC = 0x950412deL
|
||||
BE_MAGIC = 0xde120495L
|
||||
LE_MAGIC = 0x950412de
|
||||
BE_MAGIC = 0xde120495
|
||||
|
||||
def _parse(self, fp):
|
||||
"""Override this method to support alternative .mo formats."""
|
||||
|
|
|
@ -21,12 +21,12 @@ def U32(i):
|
|||
If it's >= 2GB when viewed as a 32-bit unsigned int, return a long.
|
||||
"""
|
||||
if i < 0:
|
||||
i += 1L << 32
|
||||
i += 1 << 32
|
||||
return i
|
||||
|
||||
def LOWU32(i):
|
||||
"""Return the low-order 32 bits of an int, as a non-negative int."""
|
||||
return i & 0xFFFFFFFFL
|
||||
return i & 0xFFFFFFFF
|
||||
|
||||
def write32(output, value):
|
||||
output.write(struct.pack("<l", value))
|
||||
|
@ -148,7 +148,7 @@ class GzipFile:
|
|||
if fname:
|
||||
flags = FNAME
|
||||
self.fileobj.write(chr(flags))
|
||||
write32u(self.fileobj, long(time.time()))
|
||||
write32u(self.fileobj, int(time.time()))
|
||||
self.fileobj.write('\002')
|
||||
self.fileobj.write('\377')
|
||||
if fname:
|
||||
|
|
|
@ -500,7 +500,7 @@ def _timestamp(pathname):
|
|||
s = _os_stat(pathname)
|
||||
except OSError:
|
||||
return None
|
||||
return long(s.st_mtime)
|
||||
return int(s.st_mtime)
|
||||
|
||||
|
||||
######################################################################
|
||||
|
@ -583,7 +583,7 @@ class _FilesystemImporter(Importer):
|
|||
|
||||
def py_suffix_importer(filename, finfo, fqname):
|
||||
file = filename[:-3] + _suffix
|
||||
t_py = long(finfo[8])
|
||||
t_py = int(finfo[8])
|
||||
t_pyc = _timestamp(file)
|
||||
|
||||
code = None
|
||||
|
|
|
@ -251,7 +251,7 @@ class LogRecord:
|
|||
self.lineno = lineno
|
||||
self.funcName = func
|
||||
self.created = ct
|
||||
self.msecs = (ct - long(ct)) * 1000
|
||||
self.msecs = (ct - int(ct)) * 1000
|
||||
self.relativeCreated = (self.created - _startTime) * 1000
|
||||
if logThreads and thread:
|
||||
self.thread = thread.get_ident()
|
||||
|
|
|
@ -2043,7 +2043,7 @@ class MHMailbox:
|
|||
# list = map(long, filter(pat.match, os.listdir(self.dirname)))
|
||||
list = os.listdir(self.dirname)
|
||||
list = filter(pat.match, list)
|
||||
list = map(long, list)
|
||||
list = map(int, list)
|
||||
list.sort()
|
||||
# This only works in Python 1.6 or later;
|
||||
# before that str() added 'L':
|
||||
|
|
|
@ -99,7 +99,7 @@ def add_data(db, table, values):
|
|||
assert len(value) == count, value
|
||||
for i in range(count):
|
||||
field = value[i]
|
||||
if isinstance(field, (int, long)):
|
||||
if isinstance(field, (int, int)):
|
||||
r.SetInteger(i+1,field)
|
||||
elif isinstance(field, basestring):
|
||||
r.SetString(i+1,field)
|
||||
|
|
|
@ -407,7 +407,7 @@ def _parse_int(val):
|
|||
return _parse_num(val, int)
|
||||
|
||||
def _parse_long(val):
|
||||
return _parse_num(val, long)
|
||||
return _parse_num(val, int)
|
||||
|
||||
_builtin_cvt = { "int" : (_parse_int, _("integer")),
|
||||
"long" : (_parse_long, _("long integer")),
|
||||
|
|
|
@ -898,7 +898,7 @@ class Unpickler:
|
|||
try:
|
||||
val = int(data)
|
||||
except ValueError:
|
||||
val = long(data)
|
||||
val = int(data)
|
||||
self.append(val)
|
||||
dispatch[INT] = load_int
|
||||
|
||||
|
@ -915,7 +915,7 @@ class Unpickler:
|
|||
dispatch[BININT2] = load_binint2
|
||||
|
||||
def load_long(self):
|
||||
self.append(long(self.readline()[:-1], 0))
|
||||
self.append(int(self.readline()[:-1], 0))
|
||||
dispatch[LONG] = load_long
|
||||
|
||||
def load_long1(self):
|
||||
|
@ -1239,22 +1239,22 @@ import binascii as _binascii
|
|||
|
||||
def encode_long(x):
|
||||
r"""Encode a long to a two's complement little-endian binary string.
|
||||
Note that 0L is a special case, returning an empty string, to save a
|
||||
Note that 0 is a special case, returning an empty string, to save a
|
||||
byte in the LONG1 pickling context.
|
||||
|
||||
>>> encode_long(0L)
|
||||
>>> encode_long(0)
|
||||
''
|
||||
>>> encode_long(255L)
|
||||
>>> encode_long(255)
|
||||
'\xff\x00'
|
||||
>>> encode_long(32767L)
|
||||
>>> encode_long(32767)
|
||||
'\xff\x7f'
|
||||
>>> encode_long(-256L)
|
||||
>>> encode_long(-256)
|
||||
'\x00\xff'
|
||||
>>> encode_long(-32768L)
|
||||
>>> encode_long(-32768)
|
||||
'\x00\x80'
|
||||
>>> encode_long(-128L)
|
||||
>>> encode_long(-128)
|
||||
'\x80'
|
||||
>>> encode_long(127L)
|
||||
>>> encode_long(127)
|
||||
'\x7f'
|
||||
>>>
|
||||
"""
|
||||
|
@ -1284,7 +1284,7 @@ def encode_long(x):
|
|||
# Extend to a full byte.
|
||||
nibbles += 1
|
||||
nbits = nibbles * 4
|
||||
x += 1L << nbits
|
||||
x += 1 << nbits
|
||||
assert x > 0
|
||||
ashex = hex(x)
|
||||
njunkchars = 2 + ashex.endswith('L')
|
||||
|
@ -1324,11 +1324,11 @@ def decode_long(data):
|
|||
|
||||
nbytes = len(data)
|
||||
if nbytes == 0:
|
||||
return 0L
|
||||
return 0
|
||||
ashex = _binascii.hexlify(data[::-1])
|
||||
n = long(ashex, 16) # quadratic time before Python 2.3; linear now
|
||||
n = int(ashex, 16) # quadratic time before Python 2.3; linear now
|
||||
if data[-1] >= '\x80':
|
||||
n -= 1L << (nbytes * 8)
|
||||
n -= 1 << (nbytes * 8)
|
||||
return n
|
||||
|
||||
# Shorthands
|
||||
|
|
|
@ -511,7 +511,7 @@ def read_decimalnl_short(f):
|
|||
try:
|
||||
return int(s)
|
||||
except OverflowError:
|
||||
return long(s)
|
||||
return int(s)
|
||||
|
||||
def read_decimalnl_long(f):
|
||||
r"""
|
||||
|
@ -525,7 +525,7 @@ def read_decimalnl_long(f):
|
|||
"""
|
||||
|
||||
s = read_stringnl(f, decode=False, stripquotes=False)
|
||||
return long(s)
|
||||
return int(s)
|
||||
|
||||
|
||||
decimalnl_short = ArgumentDescriptor(
|
||||
|
@ -676,7 +676,7 @@ long4 = ArgumentDescriptor(
|
|||
This first reads four bytes as a signed size (but requires the
|
||||
size to be >= 0), then reads that many bytes and interprets them
|
||||
as a little-endian 2's-complement long. If the size is 0, that's taken
|
||||
as a shortcut for the long 0L, although LONG1 should really be used
|
||||
as a shortcut for the int 0, although LONG1 should really be used
|
||||
then instead (and in any case where # of bytes < 256).
|
||||
""")
|
||||
|
||||
|
@ -724,12 +724,12 @@ pyint = StackObject(
|
|||
|
||||
pylong = StackObject(
|
||||
name='long',
|
||||
obtype=long,
|
||||
obtype=int,
|
||||
doc="A long (as opposed to short) Python integer object.")
|
||||
|
||||
pyinteger_or_bool = StackObject(
|
||||
name='int_or_bool',
|
||||
obtype=(int, long, bool),
|
||||
obtype=(int, int, bool),
|
||||
doc="A Python integer object (short or long), or "
|
||||
"a Python bool.")
|
||||
|
||||
|
|
|
@ -86,30 +86,30 @@ IPPROTO_MAX = 256
|
|||
IPPORT_RESERVED = 1024
|
||||
IPPORT_USERRESERVED = 5000
|
||||
IPPORT_TIMESERVER = 37
|
||||
def IN_CLASSA(i): return (((long)(i) & 0x80000000) == 0)
|
||||
def IN_CLASSA(i): return (((int)(i) & 0x80000000) == 0)
|
||||
|
||||
IN_CLASSA_NET = 0xff000000
|
||||
IN_CLASSA_NSHIFT = 24
|
||||
IN_CLASSA_HOST = 0x00ffffff
|
||||
IN_CLASSA_MAX = 128
|
||||
def IN_CLASSB(i): return (((long)(i) & 0xc0000000) == 0x80000000)
|
||||
def IN_CLASSB(i): return (((int)(i) & 0xc0000000) == 0x80000000)
|
||||
|
||||
IN_CLASSB_NET = 0xffff0000
|
||||
IN_CLASSB_NSHIFT = 16
|
||||
IN_CLASSB_HOST = 0x0000ffff
|
||||
IN_CLASSB_MAX = 65536
|
||||
def IN_CLASSC(i): return (((long)(i) & 0xe0000000) == 0xc0000000)
|
||||
def IN_CLASSC(i): return (((int)(i) & 0xe0000000) == 0xc0000000)
|
||||
|
||||
IN_CLASSC_NET = 0xffffff00
|
||||
IN_CLASSC_NSHIFT = 8
|
||||
IN_CLASSC_HOST = 0x000000ff
|
||||
def IN_CLASSD(i): return (((long)(i) & 0xf0000000) == 0xe0000000)
|
||||
def IN_CLASSD(i): return (((int)(i) & 0xf0000000) == 0xe0000000)
|
||||
|
||||
def IN_MULTICAST(i): return IN_CLASSD(i)
|
||||
|
||||
def IN_EXPERIMENTAL(i): return (((long)(i) & 0xe0000000) == 0xe0000000)
|
||||
def IN_EXPERIMENTAL(i): return (((int)(i) & 0xe0000000) == 0xe0000000)
|
||||
|
||||
def IN_BADCLASS(i): return (((long)(i) & 0xf0000000) == 0xf0000000)
|
||||
def IN_BADCLASS(i): return (((int)(i) & 0xf0000000) == 0xf0000000)
|
||||
|
||||
INADDR_ANY = 0x00000000
|
||||
INADDR_LOOPBACK = 0x7f000001
|
||||
|
|
|
@ -111,24 +111,24 @@ IPPROTO_MAX = 256
|
|||
IPPORT_RESERVED = 1024
|
||||
IPPORT_USERRESERVED = 5000
|
||||
IPPORT_TIMESERVER = 37
|
||||
def IN_CLASSA(i): return (((long)(i) & 0x80000000) == 0)
|
||||
def IN_CLASSA(i): return (((int)(i) & 0x80000000) == 0)
|
||||
|
||||
IN_CLASSA_NET = 0xff000000
|
||||
IN_CLASSA_NSHIFT = 24
|
||||
IN_CLASSA_HOST = 0x00ffffff
|
||||
IN_CLASSA_MAX = 128
|
||||
def IN_CLASSB(i): return (((long)(i) & 0xc0000000) == 0x80000000)
|
||||
def IN_CLASSB(i): return (((int)(i) & 0xc0000000) == 0x80000000)
|
||||
|
||||
IN_CLASSB_NET = 0xffff0000
|
||||
IN_CLASSB_NSHIFT = 16
|
||||
IN_CLASSB_HOST = 0x0000ffff
|
||||
IN_CLASSB_MAX = 65536
|
||||
def IN_CLASSC(i): return (((long)(i) & 0xe0000000) == 0xc0000000)
|
||||
def IN_CLASSC(i): return (((int)(i) & 0xe0000000) == 0xc0000000)
|
||||
|
||||
IN_CLASSC_NET = 0xffffff00
|
||||
IN_CLASSC_NSHIFT = 8
|
||||
IN_CLASSC_HOST = 0x000000ff
|
||||
def IN_CLASSD(i): return (((long)(i) & 0xf0000000) == 0xe0000000)
|
||||
def IN_CLASSD(i): return (((int)(i) & 0xf0000000) == 0xe0000000)
|
||||
|
||||
def IN_MULTICAST(i): return IN_CLASSD(i)
|
||||
|
||||
|
@ -138,9 +138,9 @@ IN_CLASSD_HOST = 0x0fffffff
|
|||
INADDR_UNSPEC_GROUP = 0xe0000000
|
||||
INADDR_ALLHOSTS_GROUP = 0xe0000001
|
||||
INADDR_MAX_LOCAL_GROUP = 0xe00000ff
|
||||
def IN_EXPERIMENTAL(i): return (((long)(i) & 0xe0000000) == 0xe0000000)
|
||||
def IN_EXPERIMENTAL(i): return (((int)(i) & 0xe0000000) == 0xe0000000)
|
||||
|
||||
def IN_BADCLASS(i): return (((long)(i) & 0xf0000000) == 0xf0000000)
|
||||
def IN_BADCLASS(i): return (((int)(i) & 0xf0000000) == 0xf0000000)
|
||||
|
||||
INADDR_ANY = 0x00000000
|
||||
INADDR_BROADCAST = 0xffffffff
|
||||
|
|
|
@ -7,7 +7,7 @@ __USE_ANSI = 1
|
|||
__FAVOR_BSD = 1
|
||||
_ISOC9X_SOURCE = 1
|
||||
_POSIX_SOURCE = 1
|
||||
_POSIX_C_SOURCE = 199506L
|
||||
_POSIX_C_SOURCE = 199506
|
||||
_XOPEN_SOURCE = 500
|
||||
_XOPEN_SOURCE_EXTENDED = 1
|
||||
_LARGEFILE64_SOURCE = 1
|
||||
|
@ -18,7 +18,7 @@ _SVID_SOURCE = 1
|
|||
__USE_ISOC9X = 1
|
||||
_POSIX_SOURCE = 1
|
||||
_POSIX_C_SOURCE = 2
|
||||
_POSIX_C_SOURCE = 199506L
|
||||
_POSIX_C_SOURCE = 199506
|
||||
__USE_POSIX = 1
|
||||
__USE_POSIX2 = 1
|
||||
__USE_POSIX199309 = 1
|
||||
|
@ -110,8 +110,8 @@ CHAR_MAX = 127
|
|||
CHAR_MIN = (-128)
|
||||
INT_MAX = 2147483647
|
||||
INT_MIN = (-2147483647-1)
|
||||
LONG_MAX = 2147483647L
|
||||
LONG_MIN = (-2147483647L-1L)
|
||||
LONG_MAX = 2147483647
|
||||
LONG_MIN = (-2147483647-1)
|
||||
SCHAR_MAX = 127
|
||||
SCHAR_MIN = (-128)
|
||||
SHRT_MAX = 32767
|
||||
|
@ -206,10 +206,10 @@ USHRT_MAX = 65535
|
|||
INT_MIN = (-INT_MAX - 1)
|
||||
INT_MAX = 2147483647
|
||||
UINT_MAX = 4294967295
|
||||
LONG_MAX = 9223372036854775807L
|
||||
LONG_MAX = 2147483647L
|
||||
LONG_MIN = (-LONG_MAX - 1L)
|
||||
ULONG_MAX = 4294967295L
|
||||
LONG_MAX = 9223372036854775807
|
||||
LONG_MAX = 2147483647
|
||||
LONG_MIN = (-LONG_MAX - 1)
|
||||
ULONG_MAX = 4294967295
|
||||
|
||||
# Included from stdint.h
|
||||
_STDINT_H = 1
|
||||
|
@ -243,27 +243,27 @@ INT_LEAST32_MAX = (2147483647)
|
|||
INT_LEAST64_MAX = (__INT64_C(9223372036854775807))
|
||||
UINT_LEAST64_MAX = (__UINT64_C(18446744073709551615))
|
||||
INT_FAST8_MIN = (-128)
|
||||
INT_FAST16_MIN = (-9223372036854775807L-1)
|
||||
INT_FAST32_MIN = (-9223372036854775807L-1)
|
||||
INT_FAST16_MIN = (-9223372036854775807-1)
|
||||
INT_FAST32_MIN = (-9223372036854775807-1)
|
||||
INT_FAST16_MIN = (-2147483647-1)
|
||||
INT_FAST32_MIN = (-2147483647-1)
|
||||
INT_FAST64_MIN = (-__INT64_C(9223372036854775807)-1)
|
||||
INT_FAST8_MAX = (127)
|
||||
INT_FAST16_MAX = (9223372036854775807L)
|
||||
INT_FAST32_MAX = (9223372036854775807L)
|
||||
INT_FAST16_MAX = (9223372036854775807)
|
||||
INT_FAST32_MAX = (9223372036854775807)
|
||||
INT_FAST16_MAX = (2147483647)
|
||||
INT_FAST32_MAX = (2147483647)
|
||||
INT_FAST64_MAX = (__INT64_C(9223372036854775807))
|
||||
UINT_FAST64_MAX = (__UINT64_C(18446744073709551615))
|
||||
INTPTR_MIN = (-9223372036854775807L-1)
|
||||
INTPTR_MAX = (9223372036854775807L)
|
||||
INTPTR_MIN = (-9223372036854775807-1)
|
||||
INTPTR_MAX = (9223372036854775807)
|
||||
INTPTR_MIN = (-2147483647-1)
|
||||
INTPTR_MAX = (2147483647)
|
||||
INTMAX_MIN = (-__INT64_C(9223372036854775807)-1)
|
||||
INTMAX_MAX = (__INT64_C(9223372036854775807))
|
||||
UINTMAX_MAX = (__UINT64_C(18446744073709551615))
|
||||
PTRDIFF_MIN = (-9223372036854775807L-1)
|
||||
PTRDIFF_MAX = (9223372036854775807L)
|
||||
PTRDIFF_MIN = (-9223372036854775807-1)
|
||||
PTRDIFF_MAX = (9223372036854775807)
|
||||
PTRDIFF_MIN = (-2147483647-1)
|
||||
PTRDIFF_MAX = (2147483647)
|
||||
SIG_ATOMIC_MIN = (-2147483647-1)
|
||||
|
@ -684,7 +684,7 @@ IP_ADR_LEN = 4
|
|||
INADDR_ANY = 0x00000000
|
||||
INADDR_BROADCAST = 0xffffffff
|
||||
INADDR_LOOPBACK = 0x7f000001
|
||||
def CMSG_ALIGN(len): return ( ((len)+sizeof(long)-1) & ~(sizeof(long)-1) )
|
||||
def CMSG_ALIGN(len): return ( ((len)+sizeof(int)-1) & ~(sizeof(int)-1) )
|
||||
|
||||
PROT_SOCK = 1024
|
||||
SHUTDOWN_MASK = 3
|
||||
|
|
|
@ -7,7 +7,7 @@ __USE_ANSI = 1
|
|||
__FAVOR_BSD = 1
|
||||
_ISOC9X_SOURCE = 1
|
||||
_POSIX_SOURCE = 1
|
||||
_POSIX_C_SOURCE = 199506L
|
||||
_POSIX_C_SOURCE = 199506
|
||||
_XOPEN_SOURCE = 500
|
||||
_XOPEN_SOURCE_EXTENDED = 1
|
||||
_LARGEFILE64_SOURCE = 1
|
||||
|
@ -18,7 +18,7 @@ _SVID_SOURCE = 1
|
|||
__USE_ISOC9X = 1
|
||||
_POSIX_SOURCE = 1
|
||||
_POSIX_C_SOURCE = 2
|
||||
_POSIX_C_SOURCE = 199506L
|
||||
_POSIX_C_SOURCE = 199506
|
||||
__USE_POSIX = 1
|
||||
__USE_POSIX2 = 1
|
||||
__USE_POSIX199309 = 1
|
||||
|
|
|
@ -34,7 +34,7 @@ __GLIBC_MINOR__ = 1
|
|||
|
||||
# Included from null.h
|
||||
NULL = (0)
|
||||
NULL = 0L
|
||||
NULL = 0
|
||||
|
||||
# Included from size_t.h
|
||||
|
||||
|
@ -100,8 +100,8 @@ CHAR_MAX = SCHAR_MAX
|
|||
MB_LEN_MAX = (1)
|
||||
SHRT_MIN = (-32767-1)
|
||||
SHRT_MAX = (32767)
|
||||
LONG_MIN = (-2147483647L-1)
|
||||
LONG_MAX = (2147483647L)
|
||||
LONG_MIN = (-2147483647-1)
|
||||
LONG_MAX = (2147483647)
|
||||
INT_MIN = LONG_MIN
|
||||
INT_MAX = LONG_MAX
|
||||
ARG_MAX = (32768)
|
||||
|
@ -118,7 +118,7 @@ NGROUPS_MAX = (32)
|
|||
OPEN_MAX = (128)
|
||||
PATH_MAX = (1024)
|
||||
PIPE_MAX = (512)
|
||||
SSIZE_MAX = (2147483647L)
|
||||
SSIZE_MAX = (2147483647)
|
||||
TTY_NAME_MAX = (256)
|
||||
TZNAME_MAX = (32)
|
||||
SYMLINKS_MAX = (16)
|
||||
|
@ -133,7 +133,7 @@ _POSIX_NGROUPS_MAX = (0)
|
|||
_POSIX_OPEN_MAX = (128)
|
||||
_POSIX_PATH_MAX = (1024)
|
||||
_POSIX_PIPE_BUF = (512)
|
||||
_POSIX_SSIZE_MAX = (2147483647L)
|
||||
_POSIX_SSIZE_MAX = (2147483647)
|
||||
_POSIX_STREAM_MAX = (8)
|
||||
_POSIX_TTY_NAME_MAX = (256)
|
||||
_POSIX_TZNAME_MAX = (3)
|
||||
|
|
|
@ -101,33 +101,33 @@ IPPORT_USERRESERVED = 5000
|
|||
IPPORT_HIFIRSTAUTO = 40000
|
||||
IPPORT_HILASTAUTO = 44999
|
||||
IPPORT_RESERVEDSTART = 600
|
||||
def IN_CLASSA(i): return (((long)(i) & 0x80000000) == 0)
|
||||
def IN_CLASSA(i): return (((int)(i) & 0x80000000) == 0)
|
||||
|
||||
IN_CLASSA_NET = 0xff000000
|
||||
IN_CLASSA_NSHIFT = 24
|
||||
IN_CLASSA_HOST = 0x00ffffff
|
||||
IN_CLASSA_MAX = 128
|
||||
def IN_CLASSB(i): return (((long)(i) & 0xc0000000) == 0x80000000)
|
||||
def IN_CLASSB(i): return (((int)(i) & 0xc0000000) == 0x80000000)
|
||||
|
||||
IN_CLASSB_NET = 0xffff0000
|
||||
IN_CLASSB_NSHIFT = 16
|
||||
IN_CLASSB_HOST = 0x0000ffff
|
||||
IN_CLASSB_MAX = 65536
|
||||
def IN_CLASSC(i): return (((long)(i) & 0xe0000000) == 0xc0000000)
|
||||
def IN_CLASSC(i): return (((int)(i) & 0xe0000000) == 0xc0000000)
|
||||
|
||||
IN_CLASSC_NET = 0xffffff00
|
||||
IN_CLASSC_NSHIFT = 8
|
||||
IN_CLASSC_HOST = 0x000000ff
|
||||
def IN_CLASSD(i): return (((long)(i) & 0xf0000000) == 0xe0000000)
|
||||
def IN_CLASSD(i): return (((int)(i) & 0xf0000000) == 0xe0000000)
|
||||
|
||||
IN_CLASSD_NET = 0xf0000000
|
||||
IN_CLASSD_NSHIFT = 28
|
||||
IN_CLASSD_HOST = 0x0fffffff
|
||||
def IN_MULTICAST(i): return IN_CLASSD(i)
|
||||
|
||||
def IN_EXPERIMENTAL(i): return (((long)(i) & 0xf0000000) == 0xf0000000)
|
||||
def IN_EXPERIMENTAL(i): return (((int)(i) & 0xf0000000) == 0xf0000000)
|
||||
|
||||
def IN_BADCLASS(i): return (((long)(i) & 0xf0000000) == 0xf0000000)
|
||||
def IN_BADCLASS(i): return (((int)(i) & 0xf0000000) == 0xf0000000)
|
||||
|
||||
INADDR_ANY = 0x00000000
|
||||
INADDR_BROADCAST = 0xffffffff
|
||||
|
|
|
@ -101,33 +101,33 @@ IPPORT_USERRESERVED = 5000
|
|||
IPPORT_HIFIRSTAUTO = 49152
|
||||
IPPORT_HILASTAUTO = 65535
|
||||
IPPORT_RESERVEDSTART = 600
|
||||
def IN_CLASSA(i): return (((long)(i) & 0x80000000) == 0)
|
||||
def IN_CLASSA(i): return (((int)(i) & 0x80000000) == 0)
|
||||
|
||||
IN_CLASSA_NET = 0xff000000
|
||||
IN_CLASSA_NSHIFT = 24
|
||||
IN_CLASSA_HOST = 0x00ffffff
|
||||
IN_CLASSA_MAX = 128
|
||||
def IN_CLASSB(i): return (((long)(i) & 0xc0000000) == 0x80000000)
|
||||
def IN_CLASSB(i): return (((int)(i) & 0xc0000000) == 0x80000000)
|
||||
|
||||
IN_CLASSB_NET = 0xffff0000
|
||||
IN_CLASSB_NSHIFT = 16
|
||||
IN_CLASSB_HOST = 0x0000ffff
|
||||
IN_CLASSB_MAX = 65536
|
||||
def IN_CLASSC(i): return (((long)(i) & 0xe0000000) == 0xc0000000)
|
||||
def IN_CLASSC(i): return (((int)(i) & 0xe0000000) == 0xc0000000)
|
||||
|
||||
IN_CLASSC_NET = 0xffffff00
|
||||
IN_CLASSC_NSHIFT = 8
|
||||
IN_CLASSC_HOST = 0x000000ff
|
||||
def IN_CLASSD(i): return (((long)(i) & 0xf0000000) == 0xe0000000)
|
||||
def IN_CLASSD(i): return (((int)(i) & 0xf0000000) == 0xe0000000)
|
||||
|
||||
IN_CLASSD_NET = 0xf0000000
|
||||
IN_CLASSD_NSHIFT = 28
|
||||
IN_CLASSD_HOST = 0x0fffffff
|
||||
def IN_MULTICAST(i): return IN_CLASSD(i)
|
||||
|
||||
def IN_EXPERIMENTAL(i): return (((long)(i) & 0xf0000000) == 0xf0000000)
|
||||
def IN_EXPERIMENTAL(i): return (((int)(i) & 0xf0000000) == 0xf0000000)
|
||||
|
||||
def IN_BADCLASS(i): return (((long)(i) & 0xf0000000) == 0xf0000000)
|
||||
def IN_BADCLASS(i): return (((int)(i) & 0xf0000000) == 0xf0000000)
|
||||
|
||||
INADDR_ANY = 0x00000000
|
||||
INADDR_LOOPBACK = 0x7f000001
|
||||
|
|
|
@ -61,33 +61,33 @@ IPPROTO_MAX = 256
|
|||
IPPORT_RESERVED = 1024
|
||||
IPPORT_USERRESERVED = 5000
|
||||
IPPORT_MAXPORT = 65535
|
||||
def IN_CLASSA(i): return (((long)(i) & 0x80000000) == 0)
|
||||
def IN_CLASSA(i): return (((int)(i) & 0x80000000) == 0)
|
||||
|
||||
IN_CLASSA_NET = 0xff000000
|
||||
IN_CLASSA_NSHIFT = 24
|
||||
IN_CLASSA_HOST = 0x00ffffff
|
||||
IN_CLASSA_MAX = 128
|
||||
def IN_CLASSB(i): return (((long)(i) & 0xc0000000) == 0x80000000)
|
||||
def IN_CLASSB(i): return (((int)(i) & 0xc0000000) == 0x80000000)
|
||||
|
||||
IN_CLASSB_NET = 0xffff0000
|
||||
IN_CLASSB_NSHIFT = 16
|
||||
IN_CLASSB_HOST = 0x0000ffff
|
||||
IN_CLASSB_MAX = 65536
|
||||
def IN_CLASSC(i): return (((long)(i) & 0xe0000000) == 0xc0000000)
|
||||
def IN_CLASSC(i): return (((int)(i) & 0xe0000000) == 0xc0000000)
|
||||
|
||||
IN_CLASSC_NET = 0xffffff00
|
||||
IN_CLASSC_NSHIFT = 8
|
||||
IN_CLASSC_HOST = 0x000000ff
|
||||
def IN_CLASSD(i): return (((long)(i) & 0xf0000000) == 0xe0000000)
|
||||
def IN_CLASSD(i): return (((int)(i) & 0xf0000000) == 0xe0000000)
|
||||
|
||||
IN_CLASSD_NET = 0xf0000000
|
||||
IN_CLASSD_NSHIFT = 28
|
||||
IN_CLASSD_HOST = 0x0fffffff
|
||||
def IN_MULTICAST(i): return IN_CLASSD(i)
|
||||
|
||||
def IN_EXPERIMENTAL(i): return (((long)(i) & 0xf0000000) == 0xf0000000)
|
||||
def IN_EXPERIMENTAL(i): return (((int)(i) & 0xf0000000) == 0xf0000000)
|
||||
|
||||
def IN_BADCLASS(i): return (((long)(i) & 0xf0000000) == 0xf0000000)
|
||||
def IN_BADCLASS(i): return (((int)(i) & 0xf0000000) == 0xf0000000)
|
||||
|
||||
INADDR_ANY = 0x00000000
|
||||
INADDR_BROADCAST = 0xffffffff
|
||||
|
|
|
@ -43,7 +43,7 @@ FD_SETSIZE = 1024
|
|||
__NBBY = 8
|
||||
|
||||
# Included from string.h
|
||||
NULL = 0L
|
||||
NULL = 0
|
||||
NBBY = 8
|
||||
|
||||
# Included from sys/cpumask.h
|
||||
|
@ -332,9 +332,9 @@ CTX_FS5 = 30
|
|||
SV_ONSTACK = 0x0001
|
||||
SV_INTERRUPT = 0x0002
|
||||
NUMBSDSIGS = (32)
|
||||
def sigmask(sig): return (1L << ((sig)-1))
|
||||
def sigmask(sig): return (1 << ((sig)-1))
|
||||
|
||||
def sigmask(sig): return (1L << ((sig)-1))
|
||||
def sigmask(sig): return (1 << ((sig)-1))
|
||||
|
||||
SIG_ERR = (-1)
|
||||
SIG_IGN = (1)
|
||||
|
@ -356,7 +356,7 @@ BRK_PSEUDO_OP_BIT = 0x80
|
|||
BRK_PSEUDO_OP_MAX = 0x3
|
||||
BRK_CACHE_SYNC = 0x80
|
||||
BRK_MULOVF = 1023
|
||||
_POSIX_VERSION = 199506L
|
||||
_POSIX_VERSION = 199506
|
||||
_POSIX_VERSION = 199506
|
||||
_POSIX_VDISABLE = 0
|
||||
MAX_INPUT = 512
|
||||
|
@ -414,7 +414,7 @@ BPCSHIFT = 14
|
|||
CPSSHIFT = 12
|
||||
CPSSHIFT = 11
|
||||
BPSSHIFT = (BPCSHIFT+CPSSHIFT)
|
||||
NULL = 0L
|
||||
NULL = 0
|
||||
CMASK = 022
|
||||
NODEV = (-1)
|
||||
NOPAGE = (-1)
|
||||
|
@ -464,7 +464,7 @@ def DELAY(n): return us_delay(n)
|
|||
|
||||
def DELAYBUS(n): return us_delaybus(n)
|
||||
|
||||
TIMEPOKE_NOW = -100L
|
||||
TIMEPOKE_NOW = -100
|
||||
MUTEX_DEFAULT = 0x0
|
||||
METER_NAMSZ = 16
|
||||
METER_NO_SEQ = -1
|
||||
|
|
|
@ -37,7 +37,7 @@ FD_SETSIZE = 1024
|
|||
__NBBY = 8
|
||||
|
||||
# Included from string.h
|
||||
NULL = 0L
|
||||
NULL = 0
|
||||
NBBY = 8
|
||||
|
||||
# Included from sys/endian.h
|
||||
|
|
|
@ -68,7 +68,7 @@ FD_SETSIZE = 1024
|
|||
__NBBY = 8
|
||||
|
||||
# Included from string.h
|
||||
NULL = 0L
|
||||
NULL = 0
|
||||
NBBY = 8
|
||||
|
||||
# Included from sys/procset.h
|
||||
|
@ -286,9 +286,9 @@ CXT_SR = CTX_SR
|
|||
SV_ONSTACK = 0x0001
|
||||
SV_INTERRUPT = 0x0002
|
||||
NUMBSDSIGS = (32)
|
||||
def sigmask(sig): return (1L << ((sig)-1))
|
||||
def sigmask(sig): return (1 << ((sig)-1))
|
||||
|
||||
def sigmask(sig): return (1L << ((sig)-1))
|
||||
def sigmask(sig): return (1 << ((sig)-1))
|
||||
|
||||
SIG_ERR = (-1)
|
||||
SIG_IGN = (1)
|
||||
|
|
|
@ -7,7 +7,7 @@ __USE_ANSI = 1
|
|||
__FAVOR_BSD = 1
|
||||
_ISOC99_SOURCE = 1
|
||||
_POSIX_SOURCE = 1
|
||||
_POSIX_C_SOURCE = 199506L
|
||||
_POSIX_C_SOURCE = 199506
|
||||
_XOPEN_SOURCE = 600
|
||||
_XOPEN_SOURCE_EXTENDED = 1
|
||||
_LARGEFILE64_SOURCE = 1
|
||||
|
@ -18,7 +18,7 @@ _SVID_SOURCE = 1
|
|||
__USE_ISOC99 = 1
|
||||
_POSIX_SOURCE = 1
|
||||
_POSIX_C_SOURCE = 2
|
||||
_POSIX_C_SOURCE = 199506L
|
||||
_POSIX_C_SOURCE = 199506
|
||||
__USE_POSIX = 1
|
||||
__USE_POSIX2 = 1
|
||||
__USE_POSIX199309 = 1
|
||||
|
@ -40,7 +40,7 @@ __USE_GNU = 1
|
|||
__USE_REENTRANT = 1
|
||||
__STDC_IEC_559__ = 1
|
||||
__STDC_IEC_559_COMPLEX__ = 1
|
||||
__STDC_ISO_10646__ = 200009L
|
||||
__STDC_ISO_10646__ = 200009
|
||||
__GNU_LIBRARY__ = 6
|
||||
__GLIBC__ = 2
|
||||
__GLIBC_MINOR__ = 2
|
||||
|
|
|
@ -7,7 +7,7 @@ __USE_ANSI = 1
|
|||
__FAVOR_BSD = 1
|
||||
_ISOC99_SOURCE = 1
|
||||
_POSIX_SOURCE = 1
|
||||
_POSIX_C_SOURCE = 199506L
|
||||
_POSIX_C_SOURCE = 199506
|
||||
_XOPEN_SOURCE = 600
|
||||
_XOPEN_SOURCE_EXTENDED = 1
|
||||
_LARGEFILE64_SOURCE = 1
|
||||
|
@ -18,7 +18,7 @@ _SVID_SOURCE = 1
|
|||
__USE_ISOC99 = 1
|
||||
_POSIX_SOURCE = 1
|
||||
_POSIX_C_SOURCE = 2
|
||||
_POSIX_C_SOURCE = 199506L
|
||||
_POSIX_C_SOURCE = 199506
|
||||
__USE_POSIX = 1
|
||||
__USE_POSIX2 = 1
|
||||
__USE_POSIX199309 = 1
|
||||
|
@ -40,7 +40,7 @@ __USE_GNU = 1
|
|||
__USE_REENTRANT = 1
|
||||
__STDC_IEC_559__ = 1
|
||||
__STDC_IEC_559_COMPLEX__ = 1
|
||||
__STDC_ISO_10646__ = 200009L
|
||||
__STDC_ISO_10646__ = 200009
|
||||
__GNU_LIBRARY__ = 6
|
||||
__GLIBC__ = 2
|
||||
__GLIBC_MINOR__ = 2
|
||||
|
@ -78,8 +78,8 @@ _STDINT_H = 1
|
|||
|
||||
# Included from bits/wchar.h
|
||||
_BITS_WCHAR_H = 1
|
||||
__WCHAR_MIN = (-2147483647l - 1l)
|
||||
__WCHAR_MAX = (2147483647l)
|
||||
__WCHAR_MIN = (-2147483647 - 1)
|
||||
__WCHAR_MAX = (2147483647)
|
||||
|
||||
# Included from bits/wordsize.h
|
||||
__WORDSIZE = 32
|
||||
|
@ -114,28 +114,28 @@ UINT_LEAST8_MAX = (255)
|
|||
UINT_LEAST16_MAX = (65535)
|
||||
UINT_LEAST64_MAX = (__UINT64_C(18446744073709551615))
|
||||
INT_FAST8_MIN = (-128)
|
||||
INT_FAST16_MIN = (-9223372036854775807L-1)
|
||||
INT_FAST32_MIN = (-9223372036854775807L-1)
|
||||
INT_FAST16_MIN = (-9223372036854775807-1)
|
||||
INT_FAST32_MIN = (-9223372036854775807-1)
|
||||
INT_FAST16_MIN = (-2147483647-1)
|
||||
INT_FAST32_MIN = (-2147483647-1)
|
||||
INT_FAST64_MIN = (-__INT64_C(9223372036854775807)-1)
|
||||
INT_FAST8_MAX = (127)
|
||||
INT_FAST16_MAX = (9223372036854775807L)
|
||||
INT_FAST32_MAX = (9223372036854775807L)
|
||||
INT_FAST16_MAX = (9223372036854775807)
|
||||
INT_FAST32_MAX = (9223372036854775807)
|
||||
INT_FAST16_MAX = (2147483647)
|
||||
INT_FAST32_MAX = (2147483647)
|
||||
INT_FAST64_MAX = (__INT64_C(9223372036854775807))
|
||||
UINT_FAST8_MAX = (255)
|
||||
UINT_FAST64_MAX = (__UINT64_C(18446744073709551615))
|
||||
INTPTR_MIN = (-9223372036854775807L-1)
|
||||
INTPTR_MAX = (9223372036854775807L)
|
||||
INTPTR_MIN = (-9223372036854775807-1)
|
||||
INTPTR_MAX = (9223372036854775807)
|
||||
INTPTR_MIN = (-2147483647-1)
|
||||
INTPTR_MAX = (2147483647)
|
||||
INTMAX_MIN = (-__INT64_C(9223372036854775807)-1)
|
||||
INTMAX_MAX = (__INT64_C(9223372036854775807))
|
||||
UINTMAX_MAX = (__UINT64_C(18446744073709551615))
|
||||
PTRDIFF_MIN = (-9223372036854775807L-1)
|
||||
PTRDIFF_MAX = (9223372036854775807L)
|
||||
PTRDIFF_MIN = (-9223372036854775807-1)
|
||||
PTRDIFF_MAX = (9223372036854775807)
|
||||
PTRDIFF_MIN = (-2147483647-1)
|
||||
PTRDIFF_MAX = (2147483647)
|
||||
SIG_ATOMIC_MIN = (-2147483647-1)
|
||||
|
@ -238,9 +238,9 @@ SHRT_MIN = (-32768)
|
|||
SHRT_MAX = 32767
|
||||
USHRT_MAX = 65535
|
||||
INT_MAX = 2147483647
|
||||
LONG_MAX = 9223372036854775807L
|
||||
LONG_MAX = 2147483647L
|
||||
LONG_MIN = (-LONG_MAX - 1L)
|
||||
LONG_MAX = 9223372036854775807
|
||||
LONG_MAX = 2147483647
|
||||
LONG_MIN = (-LONG_MAX - 1)
|
||||
|
||||
# Included from bits/posix1_lim.h
|
||||
_BITS_POSIX1_LIM_H = 1
|
||||
|
|
|
@ -7,7 +7,7 @@ __USE_ANSI = 1
|
|||
__FAVOR_BSD = 1
|
||||
_ISOC99_SOURCE = 1
|
||||
_POSIX_SOURCE = 1
|
||||
_POSIX_C_SOURCE = 199506L
|
||||
_POSIX_C_SOURCE = 199506
|
||||
_XOPEN_SOURCE = 600
|
||||
_XOPEN_SOURCE_EXTENDED = 1
|
||||
_LARGEFILE64_SOURCE = 1
|
||||
|
@ -18,7 +18,7 @@ _SVID_SOURCE = 1
|
|||
__USE_ISOC99 = 1
|
||||
_POSIX_SOURCE = 1
|
||||
_POSIX_C_SOURCE = 2
|
||||
_POSIX_C_SOURCE = 199506L
|
||||
_POSIX_C_SOURCE = 199506
|
||||
__USE_POSIX = 1
|
||||
__USE_POSIX2 = 1
|
||||
__USE_POSIX199309 = 1
|
||||
|
@ -40,7 +40,7 @@ __USE_GNU = 1
|
|||
__USE_REENTRANT = 1
|
||||
__STDC_IEC_559__ = 1
|
||||
__STDC_IEC_559_COMPLEX__ = 1
|
||||
__STDC_ISO_10646__ = 200009L
|
||||
__STDC_ISO_10646__ = 200009
|
||||
__GNU_LIBRARY__ = 6
|
||||
__GLIBC__ = 2
|
||||
__GLIBC_MINOR__ = 2
|
||||
|
@ -99,7 +99,7 @@ _TIME_H = 1
|
|||
|
||||
# Included from bits/time.h
|
||||
_BITS_TIME_H = 1
|
||||
CLOCKS_PER_SEC = 1000000l
|
||||
CLOCKS_PER_SEC = 1000000
|
||||
CLOCK_REALTIME = 0
|
||||
CLOCK_PROCESS_CPUTIME_ID = 2
|
||||
CLOCK_THREAD_CPUTIME_ID = 3
|
||||
|
|
|
@ -74,8 +74,8 @@ kEventHotKeyPressed = 5
|
|||
kEventHotKeyReleased = 6
|
||||
kEventKeyModifierNumLockBit = 16
|
||||
kEventKeyModifierFnBit = 17
|
||||
kEventKeyModifierNumLockMask = 1L << kEventKeyModifierNumLockBit
|
||||
kEventKeyModifierFnMask = 1L << kEventKeyModifierFnBit
|
||||
kEventKeyModifierNumLockMask = 1 << kEventKeyModifierNumLockBit
|
||||
kEventKeyModifierFnMask = 1 << kEventKeyModifierFnBit
|
||||
kEventAppActivated = 1
|
||||
kEventAppDeactivated = 2
|
||||
kEventAppQuit = 3
|
||||
|
@ -221,9 +221,9 @@ kHICommandRevert = FOUR_CHAR_CODE('rvrt')
|
|||
kHICommandPrint = FOUR_CHAR_CODE('prnt')
|
||||
kHICommandPageSetup = FOUR_CHAR_CODE('page')
|
||||
kHICommandAppHelp = FOUR_CHAR_CODE('ahlp')
|
||||
kHICommandFromMenu = (1L << 0)
|
||||
kHICommandFromControl = (1L << 1)
|
||||
kHICommandFromWindow = (1L << 2)
|
||||
kHICommandFromMenu = (1 << 0)
|
||||
kHICommandFromControl = (1 << 1)
|
||||
kHICommandFromWindow = (1 << 2)
|
||||
kEventControlInitialize = 1000
|
||||
kEventControlDispose = 1001
|
||||
kEventControlGetOptimalBounds = 1003
|
||||
|
|
|
@ -8,8 +8,8 @@ kAnyComponentType = 0
|
|||
kAnyComponentSubType = 0
|
||||
kAnyComponentManufacturer = 0
|
||||
kAnyComponentFlagsMask = 0
|
||||
cmpIsMissing = 1L << 29
|
||||
cmpWantsRegisterMessage = 1L << 31
|
||||
cmpIsMissing = 1 << 29
|
||||
cmpWantsRegisterMessage = 1 << 31
|
||||
kComponentOpenSelect = -1
|
||||
kComponentCloseSelect = -2
|
||||
kComponentCanDoSelect = -3
|
||||
|
|
|
@ -18,7 +18,7 @@ controlNotifyNothing = FOUR_CHAR_CODE('nada')
|
|||
controlNotifyClick = FOUR_CHAR_CODE('clik')
|
||||
controlNotifyFocus = FOUR_CHAR_CODE('focu')
|
||||
controlNotifyKey = FOUR_CHAR_CODE('key ')
|
||||
kControlCanAutoInvalidate = 1L << 0
|
||||
kControlCanAutoInvalidate = 1 << 0
|
||||
staticTextProc = 256
|
||||
editTextProc = 272
|
||||
iconProc = 288
|
||||
|
@ -529,7 +529,7 @@ kDataBrowserNeverEmptySelectionSet = 1 << 6
|
|||
kDataBrowserOrderUndefined = 0
|
||||
kDataBrowserOrderIncreasing = 1
|
||||
kDataBrowserOrderDecreasing = 2
|
||||
kDataBrowserNoItem = 0L
|
||||
kDataBrowserNoItem = 0
|
||||
kDataBrowserItemNoState = 0
|
||||
# kDataBrowserItemAnyState = (unsigned long)(-1)
|
||||
kDataBrowserItemIsSelected = 1 << 0
|
||||
|
@ -569,18 +569,18 @@ kDataBrowserUserToggledContainer = 16
|
|||
kDataBrowserTargetChanged = 15
|
||||
kDataBrowserUserStateChanged = 13
|
||||
kDataBrowserSelectionSetChanged = 14
|
||||
kDataBrowserItemNoProperty = 0L
|
||||
kDataBrowserItemIsActiveProperty = 1L
|
||||
kDataBrowserItemIsSelectableProperty = 2L
|
||||
kDataBrowserItemIsEditableProperty = 3L
|
||||
kDataBrowserItemIsContainerProperty = 4L
|
||||
kDataBrowserContainerIsOpenableProperty = 5L
|
||||
kDataBrowserContainerIsClosableProperty = 6L
|
||||
kDataBrowserContainerIsSortableProperty = 7L
|
||||
kDataBrowserItemSelfIdentityProperty = 8L
|
||||
kDataBrowserContainerAliasIDProperty = 9L
|
||||
kDataBrowserColumnViewPreviewProperty = 10L
|
||||
kDataBrowserItemParentContainerProperty = 11L
|
||||
kDataBrowserItemNoProperty = 0
|
||||
kDataBrowserItemIsActiveProperty = 1
|
||||
kDataBrowserItemIsSelectableProperty = 2
|
||||
kDataBrowserItemIsEditableProperty = 3
|
||||
kDataBrowserItemIsContainerProperty = 4
|
||||
kDataBrowserContainerIsOpenableProperty = 5
|
||||
kDataBrowserContainerIsClosableProperty = 6
|
||||
kDataBrowserContainerIsSortableProperty = 7
|
||||
kDataBrowserItemSelfIdentityProperty = 8
|
||||
kDataBrowserContainerAliasIDProperty = 9
|
||||
kDataBrowserColumnViewPreviewProperty = 10
|
||||
kDataBrowserItemParentContainerProperty = 11
|
||||
kDataBrowserCustomType = 0x3F3F3F3F
|
||||
kDataBrowserIconType = FOUR_CHAR_CODE('icnr')
|
||||
kDataBrowserTextType = FOUR_CHAR_CODE('text')
|
||||
|
@ -591,7 +591,7 @@ kDataBrowserProgressBarType = FOUR_CHAR_CODE('prog')
|
|||
kDataBrowserRelevanceRankType = FOUR_CHAR_CODE('rank')
|
||||
kDataBrowserPopupMenuType = FOUR_CHAR_CODE('menu')
|
||||
kDataBrowserIconAndTextType = FOUR_CHAR_CODE('ticn')
|
||||
kDataBrowserPropertyEnclosingPart = 0L
|
||||
kDataBrowserPropertyEnclosingPart = 0
|
||||
kDataBrowserPropertyContentPart = FOUR_CHAR_CODE('----')
|
||||
kDataBrowserPropertyDisclosurePart = FOUR_CHAR_CODE('disc')
|
||||
kDataBrowserPropertyTextPart = kDataBrowserTextType
|
||||
|
|
|
@ -14,16 +14,16 @@ flavorSenderOnly = (1 << 0)
|
|||
flavorSenderTranslated = (1 << 1)
|
||||
flavorNotSaved = (1 << 2)
|
||||
flavorSystemTranslated = (1 << 8)
|
||||
kDragHasLeftSenderWindow = (1L << 0)
|
||||
kDragInsideSenderApplication = (1L << 1)
|
||||
kDragInsideSenderWindow = (1L << 2)
|
||||
kDragHasLeftSenderWindow = (1 << 0)
|
||||
kDragInsideSenderApplication = (1 << 1)
|
||||
kDragInsideSenderWindow = (1 << 2)
|
||||
kDragBehaviorNone = 0
|
||||
kDragBehaviorZoomBackAnimation = (1L << 0)
|
||||
kDragRegionAndImage = (1L << 4)
|
||||
kDragStandardTranslucency = 0L
|
||||
kDragDarkTranslucency = 1L
|
||||
kDragDarkerTranslucency = 2L
|
||||
kDragOpaqueTranslucency = 3L
|
||||
kDragBehaviorZoomBackAnimation = (1 << 0)
|
||||
kDragRegionAndImage = (1 << 4)
|
||||
kDragStandardTranslucency = 0
|
||||
kDragDarkTranslucency = 1
|
||||
kDragDarkerTranslucency = 2
|
||||
kDragOpaqueTranslucency = 3
|
||||
kDragRegionBegin = 1
|
||||
kDragRegionDraw = 2
|
||||
kDragRegionHide = 3
|
||||
|
@ -56,13 +56,13 @@ kDragTrackingEnterWindow = 2
|
|||
kDragTrackingInWindow = 3
|
||||
kDragTrackingLeaveWindow = 4
|
||||
kDragTrackingLeaveHandler = 5
|
||||
kDragActionNothing = 0L
|
||||
kDragActionCopy = 1L
|
||||
kDragActionAlias = (1L << 1)
|
||||
kDragActionGeneric = (1L << 2)
|
||||
kDragActionPrivate = (1L << 3)
|
||||
kDragActionMove = (1L << 4)
|
||||
kDragActionDelete = (1L << 5)
|
||||
kDragActionNothing = 0
|
||||
kDragActionCopy = 1
|
||||
kDragActionAlias = (1 << 1)
|
||||
kDragActionGeneric = (1 << 2)
|
||||
kDragActionPrivate = (1 << 3)
|
||||
kDragActionMove = (1 << 4)
|
||||
kDragActionDelete = (1 << 5)
|
||||
# kDragActionAll = (long)0xFFFFFFFF
|
||||
dragHasLeftSenderWindow = kDragHasLeftSenderWindow
|
||||
dragInsideSenderApplication = kDragInsideSenderApplication
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
def FOUR_CHAR_CODE(x): return x
|
||||
true = True
|
||||
false = False
|
||||
kOnSystemDisk = -32768L
|
||||
kOnSystemDisk = -32768
|
||||
kOnAppropriateDisk = -32767
|
||||
kSystemDomain = -32766
|
||||
kLocalDomain = -32765
|
||||
|
|
|
@ -17,15 +17,15 @@ commandMark = 17
|
|||
checkMark = 18
|
||||
diamondMark = 19
|
||||
appleMark = 20
|
||||
propFont = 36864L
|
||||
prpFntH = 36865L
|
||||
prpFntW = 36866L
|
||||
prpFntHW = 36867L
|
||||
fixedFont = 45056L
|
||||
fxdFntH = 45057L
|
||||
fxdFntW = 45058L
|
||||
fxdFntHW = 45059L
|
||||
fontWid = 44208L
|
||||
propFont = 36864
|
||||
prpFntH = 36865
|
||||
prpFntW = 36866
|
||||
prpFntHW = 36867
|
||||
fixedFont = 45056
|
||||
fxdFntH = 45057
|
||||
fxdFntW = 45058
|
||||
fxdFntHW = 45059
|
||||
fontWid = 44208
|
||||
kFMUseGlobalScopeOption = 0x00000001
|
||||
kFontIDNewYork = 2
|
||||
kFontIDGeneva = 3
|
||||
|
|
|
@ -375,7 +375,7 @@ kBurningIcon = FOUR_CHAR_CODE('burn')
|
|||
kRightContainerArrowIcon = FOUR_CHAR_CODE('rcar')
|
||||
kIconServicesNormalUsageFlag = 0
|
||||
kIconServicesCatalogInfoMask = (kFSCatInfoNodeID | kFSCatInfoParentDirID | kFSCatInfoVolume | kFSCatInfoNodeFlags | kFSCatInfoFinderInfo | kFSCatInfoFinderXInfo | kFSCatInfoUserAccess)
|
||||
kPlotIconRefNormalFlags = 0L
|
||||
kPlotIconRefNormalFlags = 0
|
||||
kPlotIconRefNoImage = (1 << 1)
|
||||
kPlotIconRefNoMask = (1 << 2)
|
||||
kIconFamilyType = FOUR_CHAR_CODE('icns')
|
||||
|
|
|
@ -17,18 +17,18 @@ kTXNFontSizeAttributeSize = 4
|
|||
normal = 0
|
||||
kTXNWillDefaultToATSUIBit = 0
|
||||
kTXNWillDefaultToCarbonEventBit = 1
|
||||
kTXNWillDefaultToATSUIMask = 1L << kTXNWillDefaultToATSUIBit
|
||||
kTXNWillDefaultToCarbonEventMask = 1L << kTXNWillDefaultToCarbonEventBit
|
||||
kTXNWillDefaultToATSUIMask = 1 << kTXNWillDefaultToATSUIBit
|
||||
kTXNWillDefaultToCarbonEventMask = 1 << kTXNWillDefaultToCarbonEventBit
|
||||
kTXNWantMoviesBit = 0
|
||||
kTXNWantSoundBit = 1
|
||||
kTXNWantGraphicsBit = 2
|
||||
kTXNAlwaysUseQuickDrawTextBit = 3
|
||||
kTXNUseTemporaryMemoryBit = 4
|
||||
kTXNWantMoviesMask = 1L << kTXNWantMoviesBit
|
||||
kTXNWantSoundMask = 1L << kTXNWantSoundBit
|
||||
kTXNWantGraphicsMask = 1L << kTXNWantGraphicsBit
|
||||
kTXNAlwaysUseQuickDrawTextMask = 1L << kTXNAlwaysUseQuickDrawTextBit
|
||||
kTXNUseTemporaryMemoryMask = 1L << kTXNUseTemporaryMemoryBit
|
||||
kTXNWantMoviesMask = 1 << kTXNWantMoviesBit
|
||||
kTXNWantSoundMask = 1 << kTXNWantSoundBit
|
||||
kTXNWantGraphicsMask = 1 << kTXNWantGraphicsBit
|
||||
kTXNAlwaysUseQuickDrawTextMask = 1 << kTXNAlwaysUseQuickDrawTextBit
|
||||
kTXNUseTemporaryMemoryMask = 1 << kTXNUseTemporaryMemoryBit
|
||||
kTXNDrawGrowIconBit = 0
|
||||
kTXNShowWindowBit = 1
|
||||
kTXNWantHScrollBarBit = 2
|
||||
|
@ -46,23 +46,23 @@ kTXNDontDrawSelectionWhenInactiveBit = 13
|
|||
kTXNSingleLineOnlyBit = 14
|
||||
kTXNDisableDragAndDropBit = 15
|
||||
kTXNUseQDforImagingBit = 16
|
||||
kTXNDrawGrowIconMask = 1L << kTXNDrawGrowIconBit
|
||||
kTXNShowWindowMask = 1L << kTXNShowWindowBit
|
||||
kTXNWantHScrollBarMask = 1L << kTXNWantHScrollBarBit
|
||||
kTXNWantVScrollBarMask = 1L << kTXNWantVScrollBarBit
|
||||
kTXNNoTSMEverMask = 1L << kTXNNoTSMEverBit
|
||||
kTXNReadOnlyMask = 1L << kTXNReadOnlyBit
|
||||
kTXNNoKeyboardSyncMask = 1L << kTXNNoKeyboardSyncBit
|
||||
kTXNNoSelectionMask = 1L << kTXNNoSelectionBit
|
||||
kTXNSaveStylesAsSTYLResourceMask = 1L << kTXNSaveStylesAsSTYLResourceBit
|
||||
kOutputTextInUnicodeEncodingMask = 1L << kOutputTextInUnicodeEncodingBit
|
||||
kTXNDoNotInstallDragProcsMask = 1L << kTXNDoNotInstallDragProcsBit
|
||||
kTXNAlwaysWrapAtViewEdgeMask = 1L << kTXNAlwaysWrapAtViewEdgeBit
|
||||
kTXNDontDrawCaretWhenInactiveMask = 1L << kTXNDontDrawCaretWhenInactiveBit
|
||||
kTXNDontDrawSelectionWhenInactiveMask = 1L << kTXNDontDrawSelectionWhenInactiveBit
|
||||
kTXNSingleLineOnlyMask = 1L << kTXNSingleLineOnlyBit
|
||||
kTXNDisableDragAndDropMask = 1L << kTXNDisableDragAndDropBit
|
||||
kTXNUseQDforImagingMask = 1L << kTXNUseQDforImagingBit
|
||||
kTXNDrawGrowIconMask = 1 << kTXNDrawGrowIconBit
|
||||
kTXNShowWindowMask = 1 << kTXNShowWindowBit
|
||||
kTXNWantHScrollBarMask = 1 << kTXNWantHScrollBarBit
|
||||
kTXNWantVScrollBarMask = 1 << kTXNWantVScrollBarBit
|
||||
kTXNNoTSMEverMask = 1 << kTXNNoTSMEverBit
|
||||
kTXNReadOnlyMask = 1 << kTXNReadOnlyBit
|
||||
kTXNNoKeyboardSyncMask = 1 << kTXNNoKeyboardSyncBit
|
||||
kTXNNoSelectionMask = 1 << kTXNNoSelectionBit
|
||||
kTXNSaveStylesAsSTYLResourceMask = 1 << kTXNSaveStylesAsSTYLResourceBit
|
||||
kOutputTextInUnicodeEncodingMask = 1 << kOutputTextInUnicodeEncodingBit
|
||||
kTXNDoNotInstallDragProcsMask = 1 << kTXNDoNotInstallDragProcsBit
|
||||
kTXNAlwaysWrapAtViewEdgeMask = 1 << kTXNAlwaysWrapAtViewEdgeBit
|
||||
kTXNDontDrawCaretWhenInactiveMask = 1 << kTXNDontDrawCaretWhenInactiveBit
|
||||
kTXNDontDrawSelectionWhenInactiveMask = 1 << kTXNDontDrawSelectionWhenInactiveBit
|
||||
kTXNSingleLineOnlyMask = 1 << kTXNSingleLineOnlyBit
|
||||
kTXNDisableDragAndDropMask = 1 << kTXNDisableDragAndDropBit
|
||||
kTXNUseQDforImagingMask = 1 << kTXNUseQDforImagingBit
|
||||
kTXNSetFlushnessBit = 0
|
||||
kTXNSetJustificationBit = 1
|
||||
kTXNUseFontFallBackBit = 2
|
||||
|
@ -73,29 +73,29 @@ kTXNDontDrawTextBit = 6
|
|||
kTXNUseCGContextRefBit = 7
|
||||
kTXNImageWithQDBit = 8
|
||||
kTXNDontWrapTextBit = 9
|
||||
kTXNSetFlushnessMask = 1L << kTXNSetFlushnessBit
|
||||
kTXNSetJustificationMask = 1L << kTXNSetJustificationBit
|
||||
kTXNUseFontFallBackMask = 1L << kTXNUseFontFallBackBit
|
||||
kTXNRotateTextMask = 1L << kTXNRotateTextBit
|
||||
kTXNUseVerticalTextMask = 1L << kTXNUseVerticalTextBit
|
||||
kTXNDontUpdateBoxRectMask = 1L << kTXNDontUpdateBoxRectBit
|
||||
kTXNDontDrawTextMask = 1L << kTXNDontDrawTextBit
|
||||
kTXNUseCGContextRefMask = 1L << kTXNUseCGContextRefBit
|
||||
kTXNImageWithQDMask = 1L << kTXNImageWithQDBit
|
||||
kTXNDontWrapTextMask = 1L << kTXNDontWrapTextBit
|
||||
kTXNSetFlushnessMask = 1 << kTXNSetFlushnessBit
|
||||
kTXNSetJustificationMask = 1 << kTXNSetJustificationBit
|
||||
kTXNUseFontFallBackMask = 1 << kTXNUseFontFallBackBit
|
||||
kTXNRotateTextMask = 1 << kTXNRotateTextBit
|
||||
kTXNUseVerticalTextMask = 1 << kTXNUseVerticalTextBit
|
||||
kTXNDontUpdateBoxRectMask = 1 << kTXNDontUpdateBoxRectBit
|
||||
kTXNDontDrawTextMask = 1 << kTXNDontDrawTextBit
|
||||
kTXNUseCGContextRefMask = 1 << kTXNUseCGContextRefBit
|
||||
kTXNImageWithQDMask = 1 << kTXNImageWithQDBit
|
||||
kTXNDontWrapTextMask = 1 << kTXNDontWrapTextBit
|
||||
kTXNFontContinuousBit = 0
|
||||
kTXNSizeContinuousBit = 1
|
||||
kTXNStyleContinuousBit = 2
|
||||
kTXNColorContinuousBit = 3
|
||||
kTXNFontContinuousMask = 1L << kTXNFontContinuousBit
|
||||
kTXNSizeContinuousMask = 1L << kTXNSizeContinuousBit
|
||||
kTXNStyleContinuousMask = 1L << kTXNStyleContinuousBit
|
||||
kTXNColorContinuousMask = 1L << kTXNColorContinuousBit
|
||||
kTXNFontContinuousMask = 1 << kTXNFontContinuousBit
|
||||
kTXNSizeContinuousMask = 1 << kTXNSizeContinuousBit
|
||||
kTXNStyleContinuousMask = 1 << kTXNStyleContinuousBit
|
||||
kTXNColorContinuousMask = 1 << kTXNColorContinuousBit
|
||||
kTXNIgnoreCaseBit = 0
|
||||
kTXNEntireWordBit = 1
|
||||
kTXNUseEncodingWordRulesBit = 31
|
||||
kTXNIgnoreCaseMask = 1L << kTXNIgnoreCaseBit
|
||||
kTXNEntireWordMask = 1L << kTXNEntireWordBit
|
||||
kTXNIgnoreCaseMask = 1 << kTXNIgnoreCaseBit
|
||||
kTXNEntireWordMask = 1 << kTXNEntireWordBit
|
||||
# kTXNUseEncodingWordRulesMask = (unsigned long)(1L << kTXNUseEncodingWordRulesBit)
|
||||
kTXNTextensionFile = FOUR_CHAR_CODE('txtn')
|
||||
kTXNTextFile = FOUR_CHAR_CODE('TEXT')
|
||||
|
@ -216,8 +216,8 @@ kTXNUnicodeEncoding = 2
|
|||
kTXNBackgroundTypeRGB = 1
|
||||
kTXNTextInputCountBit = 0
|
||||
kTXNRunCountBit = 1
|
||||
kTXNTextInputCountMask = 1L << kTXNTextInputCountBit
|
||||
kTXNRunCountMask = 1L << kTXNRunCountBit
|
||||
kTXNTextInputCountMask = 1 << kTXNTextInputCountBit
|
||||
kTXNRunCountMask = 1 << kTXNRunCountBit
|
||||
kTXNAllCountMask = kTXNTextInputCountMask | kTXNRunCountMask
|
||||
kTXNNoAppleEventHandlersBit = 0
|
||||
kTXNRestartAppleEventHandlersBit = 1
|
||||
|
|
|
@ -19,7 +19,7 @@ keyOSADialectName = FOUR_CHAR_CODE('dnam')
|
|||
keyOSADialectCode = FOUR_CHAR_CODE('dcod')
|
||||
keyOSADialectLangCode = FOUR_CHAR_CODE('dlcd')
|
||||
keyOSADialectScriptCode = FOUR_CHAR_CODE('dscd')
|
||||
kOSANullScript = 0L
|
||||
kOSANullScript = 0
|
||||
kOSANullMode = 0
|
||||
kOSAModeNull = 0
|
||||
kOSASupportsCompiling = 0x0002
|
||||
|
|
|
@ -18,30 +18,30 @@ clipPixBit = 28
|
|||
stretchPixBit = 29
|
||||
ditherPixBit = 30
|
||||
gwFlagErrBit = 31
|
||||
pixPurge = 1L << pixPurgeBit
|
||||
noNewDevice = 1L << noNewDeviceBit
|
||||
useTempMem = 1L << useTempMemBit
|
||||
keepLocal = 1L << keepLocalBit
|
||||
useDistantHdwrMem = 1L << useDistantHdwrMemBit
|
||||
useLocalHdwrMem = 1L << useLocalHdwrMemBit
|
||||
pixelsPurgeable = 1L << pixelsPurgeableBit
|
||||
pixelsLocked = 1L << pixelsLockedBit
|
||||
kAllocDirectDrawSurface = 1L << 14
|
||||
mapPix = 1L << mapPixBit
|
||||
newDepth = 1L << newDepthBit
|
||||
alignPix = 1L << alignPixBit
|
||||
newRowBytes = 1L << newRowBytesBit
|
||||
reallocPix = 1L << reallocPixBit
|
||||
clipPix = 1L << clipPixBit
|
||||
stretchPix = 1L << stretchPixBit
|
||||
ditherPix = 1L << ditherPixBit
|
||||
gwFlagErr = 1L << gwFlagErrBit
|
||||
deviceIsIndirect = (1L << 0)
|
||||
deviceNeedsLock = (1L << 1)
|
||||
deviceIsStatic = (1L << 2)
|
||||
deviceIsExternalBuffer = (1L << 3)
|
||||
deviceIsDDSurface = (1L << 4)
|
||||
deviceIsDCISurface = (1L << 5)
|
||||
deviceIsGDISurface = (1L << 6)
|
||||
deviceIsAScreen = (1L << 7)
|
||||
deviceIsOverlaySurface = (1L << 8)
|
||||
pixPurge = 1 << pixPurgeBit
|
||||
noNewDevice = 1 << noNewDeviceBit
|
||||
useTempMem = 1 << useTempMemBit
|
||||
keepLocal = 1 << keepLocalBit
|
||||
useDistantHdwrMem = 1 << useDistantHdwrMemBit
|
||||
useLocalHdwrMem = 1 << useLocalHdwrMemBit
|
||||
pixelsPurgeable = 1 << pixelsPurgeableBit
|
||||
pixelsLocked = 1 << pixelsLockedBit
|
||||
kAllocDirectDrawSurface = 1 << 14
|
||||
mapPix = 1 << mapPixBit
|
||||
newDepth = 1 << newDepthBit
|
||||
alignPix = 1 << alignPixBit
|
||||
newRowBytes = 1 << newRowBytesBit
|
||||
reallocPix = 1 << reallocPixBit
|
||||
clipPix = 1 << clipPixBit
|
||||
stretchPix = 1 << stretchPixBit
|
||||
ditherPix = 1 << ditherPixBit
|
||||
gwFlagErr = 1 << gwFlagErrBit
|
||||
deviceIsIndirect = (1 << 0)
|
||||
deviceNeedsLock = (1 << 1)
|
||||
deviceIsStatic = (1 << 2)
|
||||
deviceIsExternalBuffer = (1 << 3)
|
||||
deviceIsDDSurface = (1 << 4)
|
||||
deviceIsDCISurface = (1 << 5)
|
||||
deviceIsGDISurface = (1 << 6)
|
||||
deviceIsAScreen = (1 << 7)
|
||||
deviceIsOverlaySurface = (1 << 8)
|
||||
|
|
|
@ -160,11 +160,11 @@ kXFer1PixelAtATime = 0x00000001
|
|||
kXFerConvertPixelToRGB32 = 0x00000002
|
||||
kCursorComponentsVersion = 0x00010001
|
||||
kCursorComponentType = FOUR_CHAR_CODE('curs')
|
||||
cursorDoesAnimate = 1L << 0
|
||||
cursorDoesHardware = 1L << 1
|
||||
cursorDoesUnreadableScreenBits = 1L << 2
|
||||
kRenderCursorInHardware = 1L << 0
|
||||
kRenderCursorInSoftware = 1L << 1
|
||||
cursorDoesAnimate = 1 << 0
|
||||
cursorDoesHardware = 1 << 1
|
||||
cursorDoesUnreadableScreenBits = 1 << 2
|
||||
kRenderCursorInHardware = 1 << 0
|
||||
kRenderCursorInSoftware = 1 << 1
|
||||
kCursorComponentInit = 0x0001
|
||||
kCursorComponentGetInfo = 0x0002
|
||||
kCursorComponentSetOutputMode = 0x0003
|
||||
|
|
|
@ -94,14 +94,14 @@ kUserDataTextWarning = FOUR_CHAR_CODE('\xa9wrn')
|
|||
kUserDataTextWriter = FOUR_CHAR_CODE('\xa9wrt')
|
||||
kUserDataTextURLLink = FOUR_CHAR_CODE('\xa9url')
|
||||
kUserDataTextEditDate1 = FOUR_CHAR_CODE('\xa9ed1')
|
||||
kUserDataUnicodeBit = 1L << 7
|
||||
kUserDataUnicodeBit = 1 << 7
|
||||
DoTheRightThing = 0
|
||||
kQTNetworkStatusNoNetwork = -2
|
||||
kQTNetworkStatusUncertain = -1
|
||||
kQTNetworkStatusNotConnected = 0
|
||||
kQTNetworkStatusConnected = 1
|
||||
kMusicFlagDontPlay2Soft = 1L << 0
|
||||
kMusicFlagDontSlaveToMovie = 1L << 1
|
||||
kMusicFlagDontPlay2Soft = 1 << 0
|
||||
kMusicFlagDontSlaveToMovie = 1 << 1
|
||||
dfDontDisplay = 1 << 0
|
||||
dfDontAutoScale = 1 << 1
|
||||
dfClipToTextBox = 1 << 2
|
||||
|
@ -119,10 +119,10 @@ dfAntiAlias = 1 << 13
|
|||
dfKeyedText = 1 << 14
|
||||
dfInverseHilite = 1 << 15
|
||||
dfTextColorHilite = 1 << 16
|
||||
searchTextDontGoToFoundTime = 1L << 16
|
||||
searchTextDontHiliteFoundText = 1L << 17
|
||||
searchTextOneTrackOnly = 1L << 18
|
||||
searchTextEnabledTracksOnly = 1L << 19
|
||||
searchTextDontGoToFoundTime = 1 << 16
|
||||
searchTextDontHiliteFoundText = 1 << 17
|
||||
searchTextOneTrackOnly = 1 << 18
|
||||
searchTextEnabledTracksOnly = 1 << 19
|
||||
kTextTextHandle = 1
|
||||
kTextTextPtr = 2
|
||||
kTextTEStyle = 3
|
||||
|
@ -167,7 +167,7 @@ mediaQualityDraft = 0x0000
|
|||
mediaQualityNormal = 0x0040
|
||||
mediaQualityBetter = 0x0080
|
||||
mediaQualityBest = 0x00C0
|
||||
kQTEventPayloadIsQTList = 1L << 0
|
||||
kQTEventPayloadIsQTList = 1 << 0
|
||||
kActionMovieSetVolume = 1024
|
||||
kActionMovieSetRate = 1025
|
||||
kActionMovieSetLoopingFlags = 1026
|
||||
|
@ -509,19 +509,19 @@ kQTEventMovieLoaded = FOUR_CHAR_CODE('load')
|
|||
kQTEventRequestToModifyMovie = FOUR_CHAR_CODE('reqm')
|
||||
kQTEventListReceived = FOUR_CHAR_CODE('list')
|
||||
kQTEventKeyUp = FOUR_CHAR_CODE('keyU')
|
||||
kActionFlagActionIsDelta = 1L << 1
|
||||
kActionFlagParameterWrapsAround = 1L << 2
|
||||
kActionFlagActionIsToggle = 1L << 3
|
||||
kStatusStringIsURLLink = 1L << 1
|
||||
kStatusStringIsStreamingStatus = 1L << 2
|
||||
kStatusHasCodeNumber = 1L << 3
|
||||
kStatusIsError = 1L << 4
|
||||
kScriptIsUnknownType = 1L << 0
|
||||
kScriptIsJavaScript = 1L << 1
|
||||
kScriptIsLingoEvent = 1L << 2
|
||||
kScriptIsVBEvent = 1L << 3
|
||||
kScriptIsProjectorCommand = 1L << 4
|
||||
kScriptIsAppleScript = 1L << 5
|
||||
kActionFlagActionIsDelta = 1 << 1
|
||||
kActionFlagParameterWrapsAround = 1 << 2
|
||||
kActionFlagActionIsToggle = 1 << 3
|
||||
kStatusStringIsURLLink = 1 << 1
|
||||
kStatusStringIsStreamingStatus = 1 << 2
|
||||
kStatusHasCodeNumber = 1 << 3
|
||||
kStatusIsError = 1 << 4
|
||||
kScriptIsUnknownType = 1 << 0
|
||||
kScriptIsJavaScript = 1 << 1
|
||||
kScriptIsLingoEvent = 1 << 2
|
||||
kScriptIsVBEvent = 1 << 3
|
||||
kScriptIsProjectorCommand = 1 << 4
|
||||
kScriptIsAppleScript = 1 << 5
|
||||
kQTRegistrationDialogTimeOutFlag = 1 << 0
|
||||
kQTRegistrationDialogShowDialog = 1 << 1
|
||||
kQTRegistrationDialogForceDialog = 1 << 2
|
||||
|
@ -605,16 +605,16 @@ nextTimeSyncSample = 1 << 3
|
|||
nextTimeStep = 1 << 4
|
||||
nextTimeEdgeOK = 1 << 14
|
||||
nextTimeIgnoreActiveSegment = 1 << 15
|
||||
createMovieFileDeleteCurFile = 1L << 31
|
||||
createMovieFileDontCreateMovie = 1L << 30
|
||||
createMovieFileDontOpenFile = 1L << 29
|
||||
createMovieFileDontCreateResFile = 1L << 28
|
||||
flattenAddMovieToDataFork = 1L << 0
|
||||
flattenActiveTracksOnly = 1L << 2
|
||||
flattenDontInterleaveFlatten = 1L << 3
|
||||
flattenFSSpecPtrIsDataRefRecordPtr = 1L << 4
|
||||
flattenCompressMovieResource = 1L << 5
|
||||
flattenForceMovieResourceBeforeMovieData = 1L << 6
|
||||
createMovieFileDeleteCurFile = 1 << 31
|
||||
createMovieFileDontCreateMovie = 1 << 30
|
||||
createMovieFileDontOpenFile = 1 << 29
|
||||
createMovieFileDontCreateResFile = 1 << 28
|
||||
flattenAddMovieToDataFork = 1 << 0
|
||||
flattenActiveTracksOnly = 1 << 2
|
||||
flattenDontInterleaveFlatten = 1 << 3
|
||||
flattenFSSpecPtrIsDataRefRecordPtr = 1 << 4
|
||||
flattenCompressMovieResource = 1 << 5
|
||||
flattenForceMovieResourceBeforeMovieData = 1 << 6
|
||||
movieInDataForkResID = -1
|
||||
mcTopLeftMovie = 1 << 0
|
||||
mcScaleMovieToFit = 1 << 1
|
||||
|
@ -645,17 +645,17 @@ hintsAllowDynamicResize = 1 << 19
|
|||
hintsSingleField = 1 << 20
|
||||
hintsNoRenderingTimeOut = 1 << 21
|
||||
hintsFlushVideoInsteadOfDirtying = 1 << 22
|
||||
hintsEnableSubPixelPositioning = 1L << 23
|
||||
hintsEnableSubPixelPositioning = 1 << 23
|
||||
mediaHandlerFlagBaseClient = 1
|
||||
movieTrackMediaType = 1 << 0
|
||||
movieTrackCharacteristic = 1 << 1
|
||||
movieTrackEnabledOnly = 1 << 2
|
||||
kMovieControlOptionHideController = (1L << 0)
|
||||
kMovieControlOptionLocateTopLeft = (1L << 1)
|
||||
kMovieControlOptionEnableEditing = (1L << 2)
|
||||
kMovieControlOptionHandleEditingHI = (1L << 3)
|
||||
kMovieControlOptionSetKeysEnabled = (1L << 4)
|
||||
kMovieControlOptionManuallyIdled = (1L << 5)
|
||||
kMovieControlOptionHideController = (1 << 0)
|
||||
kMovieControlOptionLocateTopLeft = (1 << 1)
|
||||
kMovieControlOptionEnableEditing = (1 << 2)
|
||||
kMovieControlOptionHandleEditingHI = (1 << 3)
|
||||
kMovieControlOptionSetKeysEnabled = (1 << 4)
|
||||
kMovieControlOptionManuallyIdled = (1 << 5)
|
||||
kMovieControlDataMovieController = FOUR_CHAR_CODE('mc ')
|
||||
kMovieControlDataMovie = FOUR_CHAR_CODE('moov')
|
||||
kMovieControlDataManualIdling = FOUR_CHAR_CODE('manu')
|
||||
|
@ -663,33 +663,33 @@ movieDrawingCallWhenChanged = 0
|
|||
movieDrawingCallAlways = 1
|
||||
kQTCloneShareSamples = 1 << 0
|
||||
kQTCloneDontCopyEdits = 1 << 1
|
||||
kGetMovieImporterValidateToFind = 1L << 0
|
||||
kGetMovieImporterAllowNewFile = 1L << 1
|
||||
kGetMovieImporterDontConsiderGraphicsImporters = 1L << 2
|
||||
kGetMovieImporterDontConsiderFileOnlyImporters = 1L << 6
|
||||
kGetMovieImporterAutoImportOnly = 1L << 10
|
||||
kGetMovieImporterValidateToFind = 1 << 0
|
||||
kGetMovieImporterAllowNewFile = 1 << 1
|
||||
kGetMovieImporterDontConsiderGraphicsImporters = 1 << 2
|
||||
kGetMovieImporterDontConsiderFileOnlyImporters = 1 << 6
|
||||
kGetMovieImporterAutoImportOnly = 1 << 10
|
||||
kQTGetMIMETypeInfoIsQuickTimeMovieType = FOUR_CHAR_CODE('moov')
|
||||
kQTGetMIMETypeInfoIsUnhelpfulType = FOUR_CHAR_CODE('dumb')
|
||||
kQTCopyUserDataReplace = FOUR_CHAR_CODE('rplc')
|
||||
kQTCopyUserDataMerge = FOUR_CHAR_CODE('merg')
|
||||
kMovieLoadStateError = -1L
|
||||
kMovieLoadStateError = -1
|
||||
kMovieLoadStateLoading = 1000
|
||||
kMovieLoadStateLoaded = 2000
|
||||
kMovieLoadStatePlayable = 10000
|
||||
kMovieLoadStatePlaythroughOK = 20000
|
||||
kMovieLoadStateComplete = 100000L
|
||||
kQTDontUseDataToFindImporter = 1L << 0
|
||||
kQTDontLookForMovieImporterIfGraphicsImporterFound = 1L << 1
|
||||
kQTAllowOpeningStillImagesAsMovies = 1L << 2
|
||||
kQTAllowImportersThatWouldCreateNewFile = 1L << 3
|
||||
kQTAllowAggressiveImporters = 1L << 4
|
||||
preloadAlways = 1L << 0
|
||||
preloadOnlyIfEnabled = 1L << 1
|
||||
fullScreenHideCursor = 1L << 0
|
||||
fullScreenAllowEvents = 1L << 1
|
||||
fullScreenDontChangeMenuBar = 1L << 2
|
||||
fullScreenPreflightSize = 1L << 3
|
||||
movieExecuteWiredActionDontExecute = 1L << 0
|
||||
kMovieLoadStateComplete = 100000
|
||||
kQTDontUseDataToFindImporter = 1 << 0
|
||||
kQTDontLookForMovieImporterIfGraphicsImporterFound = 1 << 1
|
||||
kQTAllowOpeningStillImagesAsMovies = 1 << 2
|
||||
kQTAllowImportersThatWouldCreateNewFile = 1 << 3
|
||||
kQTAllowAggressiveImporters = 1 << 4
|
||||
preloadAlways = 1 << 0
|
||||
preloadOnlyIfEnabled = 1 << 1
|
||||
fullScreenHideCursor = 1 << 0
|
||||
fullScreenAllowEvents = 1 << 1
|
||||
fullScreenDontChangeMenuBar = 1 << 2
|
||||
fullScreenPreflightSize = 1 << 3
|
||||
movieExecuteWiredActionDontExecute = 1 << 0
|
||||
kRefConNavigationNext = 0
|
||||
kRefConNavigationPrevious = 1
|
||||
kRefConPropertyCanHaveFocus = 1
|
||||
|
@ -728,19 +728,19 @@ kSpriteHitTestUseSpritesOwnPropertiesMode = 0
|
|||
kSpriteHitTestTreatAllSpritesAsHitTestableMode = 1
|
||||
kSpriteHitTestTreatAllSpritesAsNotHitTestableMode = 2
|
||||
kNoQTIdleEvents = -1
|
||||
kGetSpriteWorldInvalidRegionAndLeaveIntact = -1L
|
||||
kGetSpriteWorldInvalidRegionAndThenSetEmpty = -2L
|
||||
kOnlyDrawToSpriteWorld = 1L << 0
|
||||
kSpriteWorldPreflight = 1L << 1
|
||||
kSpriteWorldDidDraw = 1L << 0
|
||||
kSpriteWorldNeedsToDraw = 1L << 1
|
||||
kKeyFrameAndSingleOverride = 1L << 1
|
||||
kKeyFrameAndAllOverrides = 1L << 2
|
||||
kScaleSpritesToScaleWorld = 1L << 1
|
||||
kSpriteWorldHighQuality = 1L << 2
|
||||
kSpriteWorldDontAutoInvalidate = 1L << 3
|
||||
kSpriteWorldInvisible = 1L << 4
|
||||
kSpriteWorldDirtyInsteadOfFlush = 1L << 5
|
||||
kGetSpriteWorldInvalidRegionAndLeaveIntact = -1
|
||||
kGetSpriteWorldInvalidRegionAndThenSetEmpty = -2
|
||||
kOnlyDrawToSpriteWorld = 1 << 0
|
||||
kSpriteWorldPreflight = 1 << 1
|
||||
kSpriteWorldDidDraw = 1 << 0
|
||||
kSpriteWorldNeedsToDraw = 1 << 1
|
||||
kKeyFrameAndSingleOverride = 1 << 1
|
||||
kKeyFrameAndAllOverrides = 1 << 2
|
||||
kScaleSpritesToScaleWorld = 1 << 1
|
||||
kSpriteWorldHighQuality = 1 << 2
|
||||
kSpriteWorldDontAutoInvalidate = 1 << 3
|
||||
kSpriteWorldInvisible = 1 << 4
|
||||
kSpriteWorldDirtyInsteadOfFlush = 1 << 5
|
||||
kParentAtomIsContainer = 0
|
||||
kTweenRecordNoFlags = 0
|
||||
kTweenRecordIsAtInterruptTime = 0x00000001
|
||||
|
@ -796,19 +796,19 @@ pdOptionsEditCurrentEffectOnly = 0x00000008
|
|||
pdOptionsHidePreview = 0x00000010
|
||||
effectIsRealtime = 0
|
||||
kAccessKeyAtomType = FOUR_CHAR_CODE('acky')
|
||||
kAccessKeySystemFlag = 1L << 0
|
||||
kAccessKeySystemFlag = 1 << 0
|
||||
ConnectionSpeedPrefsType = FOUR_CHAR_CODE('cspd')
|
||||
BandwidthManagementPrefsType = FOUR_CHAR_CODE('bwmg')
|
||||
kQTIdlePriority = 10
|
||||
kQTNonRealTimePriority = 20
|
||||
kQTRealTimeSharedPriority = 25
|
||||
kQTRealTimePriority = 30
|
||||
kQTBandwidthNotifyNeedToStop = 1L << 0
|
||||
kQTBandwidthNotifyGoodToGo = 1L << 1
|
||||
kQTBandwidthChangeRequest = 1L << 2
|
||||
kQTBandwidthQueueRequest = 1L << 3
|
||||
kQTBandwidthScheduledRequest = 1L << 4
|
||||
kQTBandwidthVoluntaryRelease = 1L << 5
|
||||
kQTBandwidthNotifyNeedToStop = 1 << 0
|
||||
kQTBandwidthNotifyGoodToGo = 1 << 1
|
||||
kQTBandwidthChangeRequest = 1 << 2
|
||||
kQTBandwidthQueueRequest = 1 << 3
|
||||
kQTBandwidthScheduledRequest = 1 << 4
|
||||
kQTBandwidthVoluntaryRelease = 1 << 5
|
||||
kITextRemoveEverythingBut = 0 << 1
|
||||
kITextRemoveLeaveSuggestedAlternate = 1 << 1
|
||||
kITextAtomType = FOUR_CHAR_CODE('itxt')
|
||||
|
@ -908,20 +908,20 @@ kListElementDataType = FOUR_CHAR_CODE('daty')
|
|||
kNameAtom = FOUR_CHAR_CODE('name')
|
||||
kInitialRotationAtom = FOUR_CHAR_CODE('inro')
|
||||
kNonLinearTweenHeader = FOUR_CHAR_CODE('nlth')
|
||||
kTweenReturnDelta = 1L << 0
|
||||
kTweenReturnDelta = 1 << 0
|
||||
kQTRestrictionClassSave = FOUR_CHAR_CODE('save')
|
||||
kQTRestrictionSaveDontAddMovieResource = (1L << 0)
|
||||
kQTRestrictionSaveDontFlatten = (1L << 1)
|
||||
kQTRestrictionSaveDontExport = (1L << 2)
|
||||
kQTRestrictionSaveDontExtract = (1L << 3)
|
||||
kQTRestrictionSaveDontAddMovieResource = (1 << 0)
|
||||
kQTRestrictionSaveDontFlatten = (1 << 1)
|
||||
kQTRestrictionSaveDontExport = (1 << 2)
|
||||
kQTRestrictionSaveDontExtract = (1 << 3)
|
||||
kQTRestrictionClassEdit = FOUR_CHAR_CODE('edit')
|
||||
kQTRestrictionEditDontCopy = (1L << 0)
|
||||
kQTRestrictionEditDontCut = (1L << 1)
|
||||
kQTRestrictionEditDontPaste = (1L << 2)
|
||||
kQTRestrictionEditDontClear = (1L << 3)
|
||||
kQTRestrictionEditDontModify = (1L << 4)
|
||||
kQTRestrictionEditDontExtract = (1L << 5)
|
||||
videoFlagDontLeanAhead = 1L << 0
|
||||
kQTRestrictionEditDontCopy = (1 << 0)
|
||||
kQTRestrictionEditDontCut = (1 << 1)
|
||||
kQTRestrictionEditDontPaste = (1 << 2)
|
||||
kQTRestrictionEditDontClear = (1 << 3)
|
||||
kQTRestrictionEditDontModify = (1 << 4)
|
||||
kQTRestrictionEditDontExtract = (1 << 5)
|
||||
videoFlagDontLeanAhead = 1 << 0
|
||||
txtProcDefaultDisplay = 0
|
||||
txtProcDontDisplay = 1
|
||||
txtProcDoDisplay = 2
|
||||
|
@ -932,12 +932,12 @@ findTextWrapAround = 1 << 3
|
|||
findTextUseOffset = 1 << 4
|
||||
dropShadowOffsetType = FOUR_CHAR_CODE('drpo')
|
||||
dropShadowTranslucencyType = FOUR_CHAR_CODE('drpt')
|
||||
spriteHitTestBounds = 1L << 0
|
||||
spriteHitTestImage = 1L << 1
|
||||
spriteHitTestInvisibleSprites = 1L << 2
|
||||
spriteHitTestIsClick = 1L << 3
|
||||
spriteHitTestLocInDisplayCoordinates = 1L << 4
|
||||
spriteHitTestTreatAllSpritesAsHitTestable = 1L << 5
|
||||
spriteHitTestBounds = 1 << 0
|
||||
spriteHitTestImage = 1 << 1
|
||||
spriteHitTestInvisibleSprites = 1 << 2
|
||||
spriteHitTestIsClick = 1 << 3
|
||||
spriteHitTestLocInDisplayCoordinates = 1 << 4
|
||||
spriteHitTestTreatAllSpritesAsHitTestable = 1 << 5
|
||||
kSpriteAtomType = FOUR_CHAR_CODE('sprt')
|
||||
kSpriteImagesContainerAtomType = FOUR_CHAR_CODE('imct')
|
||||
kSpriteImageAtomType = FOUR_CHAR_CODE('imag')
|
||||
|
@ -1363,68 +1363,68 @@ k422YpCbCr8PixelFormat = FOUR_CHAR_CODE('2vuy')
|
|||
k4444YpCbCrA8PixelFormat = FOUR_CHAR_CODE('v408')
|
||||
k4444YpCbCrA8RPixelFormat = FOUR_CHAR_CODE('r408')
|
||||
kYUV420PixelFormat = FOUR_CHAR_CODE('y420')
|
||||
codecInfoDoes1 = (1L << 0)
|
||||
codecInfoDoes2 = (1L << 1)
|
||||
codecInfoDoes4 = (1L << 2)
|
||||
codecInfoDoes8 = (1L << 3)
|
||||
codecInfoDoes16 = (1L << 4)
|
||||
codecInfoDoes32 = (1L << 5)
|
||||
codecInfoDoesDither = (1L << 6)
|
||||
codecInfoDoesStretch = (1L << 7)
|
||||
codecInfoDoesShrink = (1L << 8)
|
||||
codecInfoDoesMask = (1L << 9)
|
||||
codecInfoDoesTemporal = (1L << 10)
|
||||
codecInfoDoesDouble = (1L << 11)
|
||||
codecInfoDoesQuad = (1L << 12)
|
||||
codecInfoDoesHalf = (1L << 13)
|
||||
codecInfoDoesQuarter = (1L << 14)
|
||||
codecInfoDoesRotate = (1L << 15)
|
||||
codecInfoDoesHorizFlip = (1L << 16)
|
||||
codecInfoDoesVertFlip = (1L << 17)
|
||||
codecInfoHasEffectParameterList = (1L << 18)
|
||||
codecInfoDoesBlend = (1L << 19)
|
||||
codecInfoDoesWarp = (1L << 20)
|
||||
codecInfoDoesRecompress = (1L << 21)
|
||||
codecInfoDoesSpool = (1L << 22)
|
||||
codecInfoDoesRateConstrain = (1L << 23)
|
||||
codecInfoDepth1 = (1L << 0)
|
||||
codecInfoDepth2 = (1L << 1)
|
||||
codecInfoDepth4 = (1L << 2)
|
||||
codecInfoDepth8 = (1L << 3)
|
||||
codecInfoDepth16 = (1L << 4)
|
||||
codecInfoDepth32 = (1L << 5)
|
||||
codecInfoDepth24 = (1L << 6)
|
||||
codecInfoDepth33 = (1L << 7)
|
||||
codecInfoDepth34 = (1L << 8)
|
||||
codecInfoDepth36 = (1L << 9)
|
||||
codecInfoDepth40 = (1L << 10)
|
||||
codecInfoStoresClut = (1L << 11)
|
||||
codecInfoDoesLossless = (1L << 12)
|
||||
codecInfoSequenceSensitive = (1L << 13)
|
||||
codecFlagUseImageBuffer = (1L << 0)
|
||||
codecFlagUseScreenBuffer = (1L << 1)
|
||||
codecFlagUpdatePrevious = (1L << 2)
|
||||
codecFlagNoScreenUpdate = (1L << 3)
|
||||
codecFlagWasCompressed = (1L << 4)
|
||||
codecFlagDontOffscreen = (1L << 5)
|
||||
codecFlagUpdatePreviousComp = (1L << 6)
|
||||
codecFlagForceKeyFrame = (1L << 7)
|
||||
codecFlagOnlyScreenUpdate = (1L << 8)
|
||||
codecFlagLiveGrab = (1L << 9)
|
||||
codecFlagDiffFrame = (1L << 9)
|
||||
codecFlagDontUseNewImageBuffer = (1L << 10)
|
||||
codecFlagInterlaceUpdate = (1L << 11)
|
||||
codecFlagCatchUpDiff = (1L << 12)
|
||||
codecFlagSupportDisable = (1L << 13)
|
||||
codecFlagReenable = (1L << 14)
|
||||
codecFlagOutUpdateOnNextIdle = (1L << 9)
|
||||
codecFlagOutUpdateOnDataSourceChange = (1L << 10)
|
||||
codecFlagSequenceSensitive = (1L << 11)
|
||||
codecFlagOutUpdateOnTimeChange = (1L << 12)
|
||||
codecFlagImageBufferNotSourceImage = (1L << 13)
|
||||
codecFlagUsedNewImageBuffer = (1L << 14)
|
||||
codecFlagUsedImageBuffer = (1L << 15)
|
||||
codecMinimumDataSize = 32768L
|
||||
codecInfoDoes1 = (1 << 0)
|
||||
codecInfoDoes2 = (1 << 1)
|
||||
codecInfoDoes4 = (1 << 2)
|
||||
codecInfoDoes8 = (1 << 3)
|
||||
codecInfoDoes16 = (1 << 4)
|
||||
codecInfoDoes32 = (1 << 5)
|
||||
codecInfoDoesDither = (1 << 6)
|
||||
codecInfoDoesStretch = (1 << 7)
|
||||
codecInfoDoesShrink = (1 << 8)
|
||||
codecInfoDoesMask = (1 << 9)
|
||||
codecInfoDoesTemporal = (1 << 10)
|
||||
codecInfoDoesDouble = (1 << 11)
|
||||
codecInfoDoesQuad = (1 << 12)
|
||||
codecInfoDoesHalf = (1 << 13)
|
||||
codecInfoDoesQuarter = (1 << 14)
|
||||
codecInfoDoesRotate = (1 << 15)
|
||||
codecInfoDoesHorizFlip = (1 << 16)
|
||||
codecInfoDoesVertFlip = (1 << 17)
|
||||
codecInfoHasEffectParameterList = (1 << 18)
|
||||
codecInfoDoesBlend = (1 << 19)
|
||||
codecInfoDoesWarp = (1 << 20)
|
||||
codecInfoDoesRecompress = (1 << 21)
|
||||
codecInfoDoesSpool = (1 << 22)
|
||||
codecInfoDoesRateConstrain = (1 << 23)
|
||||
codecInfoDepth1 = (1 << 0)
|
||||
codecInfoDepth2 = (1 << 1)
|
||||
codecInfoDepth4 = (1 << 2)
|
||||
codecInfoDepth8 = (1 << 3)
|
||||
codecInfoDepth16 = (1 << 4)
|
||||
codecInfoDepth32 = (1 << 5)
|
||||
codecInfoDepth24 = (1 << 6)
|
||||
codecInfoDepth33 = (1 << 7)
|
||||
codecInfoDepth34 = (1 << 8)
|
||||
codecInfoDepth36 = (1 << 9)
|
||||
codecInfoDepth40 = (1 << 10)
|
||||
codecInfoStoresClut = (1 << 11)
|
||||
codecInfoDoesLossless = (1 << 12)
|
||||
codecInfoSequenceSensitive = (1 << 13)
|
||||
codecFlagUseImageBuffer = (1 << 0)
|
||||
codecFlagUseScreenBuffer = (1 << 1)
|
||||
codecFlagUpdatePrevious = (1 << 2)
|
||||
codecFlagNoScreenUpdate = (1 << 3)
|
||||
codecFlagWasCompressed = (1 << 4)
|
||||
codecFlagDontOffscreen = (1 << 5)
|
||||
codecFlagUpdatePreviousComp = (1 << 6)
|
||||
codecFlagForceKeyFrame = (1 << 7)
|
||||
codecFlagOnlyScreenUpdate = (1 << 8)
|
||||
codecFlagLiveGrab = (1 << 9)
|
||||
codecFlagDiffFrame = (1 << 9)
|
||||
codecFlagDontUseNewImageBuffer = (1 << 10)
|
||||
codecFlagInterlaceUpdate = (1 << 11)
|
||||
codecFlagCatchUpDiff = (1 << 12)
|
||||
codecFlagSupportDisable = (1 << 13)
|
||||
codecFlagReenable = (1 << 14)
|
||||
codecFlagOutUpdateOnNextIdle = (1 << 9)
|
||||
codecFlagOutUpdateOnDataSourceChange = (1 << 10)
|
||||
codecFlagSequenceSensitive = (1 << 11)
|
||||
codecFlagOutUpdateOnTimeChange = (1 << 12)
|
||||
codecFlagImageBufferNotSourceImage = (1 << 13)
|
||||
codecFlagUsedNewImageBuffer = (1 << 14)
|
||||
codecFlagUsedImageBuffer = (1 << 15)
|
||||
codecMinimumDataSize = 32768
|
||||
compressorComponentType = FOUR_CHAR_CODE('imco')
|
||||
decompressorComponentType = FOUR_CHAR_CODE('imdc')
|
||||
codecLosslessQuality = 0x00000400
|
||||
|
@ -1466,11 +1466,11 @@ evenField2ToOddFieldOut = 1 << 5
|
|||
oddField2ToEvenFieldOut = 1 << 6
|
||||
oddField2ToOddFieldOut = 1 << 7
|
||||
icmFrameTimeHasVirtualStartTimeAndDuration = 1 << 0
|
||||
codecDSequenceDisableOverlaySurface = (1L << 5)
|
||||
codecDSequenceSingleField = (1L << 6)
|
||||
codecDSequenceBidirectionalPrediction = (1L << 7)
|
||||
codecDSequenceFlushInsteadOfDirtying = (1L << 8)
|
||||
codecDSequenceEnableSubPixelPositioning = (1L << 9)
|
||||
codecDSequenceDisableOverlaySurface = (1 << 5)
|
||||
codecDSequenceSingleField = (1 << 6)
|
||||
codecDSequenceBidirectionalPrediction = (1 << 7)
|
||||
codecDSequenceFlushInsteadOfDirtying = (1 << 8)
|
||||
codecDSequenceEnableSubPixelPositioning = (1 << 9)
|
||||
kICMSequenceTaskWeight = FOUR_CHAR_CODE('twei')
|
||||
kICMSequenceTaskName = FOUR_CHAR_CODE('tnam')
|
||||
kICMSequenceUserPreferredCodecs = FOUR_CHAR_CODE('punt')
|
||||
|
@ -1487,19 +1487,19 @@ sfpItemPreviewDividerUser = 13
|
|||
sfpItemCreatePreviewButton = 14
|
||||
sfpItemShowPreviewButton = 15
|
||||
kICMPixelFormatIsPlanarMask = 0x0F
|
||||
kICMPixelFormatIsIndexed = (1L << 4)
|
||||
kICMPixelFormatIsSupportedByQD = (1L << 5)
|
||||
kICMPixelFormatIsMonochrome = (1L << 6)
|
||||
kICMPixelFormatHasAlphaChannel = (1L << 7)
|
||||
kICMPixelFormatIsIndexed = (1 << 4)
|
||||
kICMPixelFormatIsSupportedByQD = (1 << 5)
|
||||
kICMPixelFormatIsMonochrome = (1 << 6)
|
||||
kICMPixelFormatHasAlphaChannel = (1 << 7)
|
||||
kICMGetChainUltimateParent = 0
|
||||
kICMGetChainParent = 1
|
||||
kICMGetChainChild = 2
|
||||
kICMGetChainUltimateChild = 3
|
||||
kDontUseValidateToFindGraphicsImporter = 1L << 0
|
||||
kICMTempThenAppMemory = 1L << 12
|
||||
kICMAppThenTempMemory = 1L << 13
|
||||
kDontUseValidateToFindGraphicsImporter = 1 << 0
|
||||
kICMTempThenAppMemory = 1 << 12
|
||||
kICMAppThenTempMemory = 1 << 13
|
||||
kQTUsePlatformDefaultGammaLevel = 0
|
||||
kQTUseSourceGammaLevel = -1L
|
||||
kQTUseSourceGammaLevel = -1
|
||||
kQTCCIR601VideoGammaLevel = 0x00023333
|
||||
identityMatrixType = 0x00
|
||||
translateMatrixType = 0x01
|
||||
|
@ -1509,7 +1509,7 @@ linearMatrixType = 0x04
|
|||
linearTranslateMatrixType = 0x05
|
||||
perspectiveMatrixType = 0x06
|
||||
GraphicsImporterComponentType = FOUR_CHAR_CODE('grip')
|
||||
graphicsImporterUsesImageDecompressor = 1L << 23
|
||||
graphicsImporterUsesImageDecompressor = 1 << 23
|
||||
quickTimeImageFileImageDescriptionAtom = FOUR_CHAR_CODE('idsc')
|
||||
quickTimeImageFileImageDataAtom = FOUR_CHAR_CODE('idat')
|
||||
quickTimeImageFileMetaDataAtom = FOUR_CHAR_CODE('meta')
|
||||
|
@ -1517,9 +1517,9 @@ quickTimeImageFileColorSyncProfileAtom = FOUR_CHAR_CODE('iicc')
|
|||
graphicsImporterDrawsAllPixels = 0
|
||||
graphicsImporterDoesntDrawAllPixels = 1
|
||||
graphicsImporterDontKnowIfDrawAllPixels = 2
|
||||
kGraphicsImporterDontDoGammaCorrection = 1L << 0
|
||||
kGraphicsImporterTrustResolutionFromFile = 1L << 1
|
||||
kGraphicsImporterEnableSubPixelPositioning = 1L << 2
|
||||
kGraphicsImporterDontDoGammaCorrection = 1 << 0
|
||||
kGraphicsImporterTrustResolutionFromFile = 1 << 1
|
||||
kGraphicsImporterEnableSubPixelPositioning = 1 << 2
|
||||
kGraphicsExportGroup = FOUR_CHAR_CODE('expo')
|
||||
kGraphicsExportFileType = FOUR_CHAR_CODE('ftyp')
|
||||
kGraphicsExportMIMEType = FOUR_CHAR_CODE('mime')
|
||||
|
@ -1624,9 +1624,9 @@ kQTExifUserDataGPSDestDistanceRef = 0x06770019
|
|||
kQTExifUserDataGPSDestDistance = 0x0677001A
|
||||
GraphicsExporterComponentType = FOUR_CHAR_CODE('grex')
|
||||
kBaseGraphicsExporterSubType = FOUR_CHAR_CODE('base')
|
||||
graphicsExporterIsBaseExporter = 1L << 0
|
||||
graphicsExporterCanTranscode = 1L << 1
|
||||
graphicsExporterUsesImageCompressor = 1L << 2
|
||||
graphicsExporterIsBaseExporter = 1 << 0
|
||||
graphicsExporterCanTranscode = 1 << 1
|
||||
graphicsExporterUsesImageCompressor = 1 << 2
|
||||
kQTResolutionSettings = FOUR_CHAR_CODE('reso')
|
||||
kQTTargetDataSize = FOUR_CHAR_CODE('dasz')
|
||||
kQTDontRecompress = FOUR_CHAR_CODE('dntr')
|
||||
|
@ -1637,7 +1637,7 @@ kQTEnableExif = FOUR_CHAR_CODE('exif')
|
|||
kQTMetaData = FOUR_CHAR_CODE('meta')
|
||||
kQTTIFFCompressionMethod = FOUR_CHAR_CODE('tifc')
|
||||
kQTTIFFCompression_None = 1
|
||||
kQTTIFFCompression_PackBits = 32773L
|
||||
kQTTIFFCompression_PackBits = 32773
|
||||
kQTTIFFLittleEndian = FOUR_CHAR_CODE('tife')
|
||||
kQTPNGFilterPreference = FOUR_CHAR_CODE('pngf')
|
||||
kQTPNGFilterBestForColorType = FOUR_CHAR_CODE('bflt')
|
||||
|
@ -1802,13 +1802,13 @@ kClockCanHandleIntermittentSound = 4
|
|||
StandardCompressionType = FOUR_CHAR_CODE('scdi')
|
||||
StandardCompressionSubType = FOUR_CHAR_CODE('imag')
|
||||
StandardCompressionSubTypeSound = FOUR_CHAR_CODE('soun')
|
||||
scListEveryCodec = 1L << 1
|
||||
scAllowZeroFrameRate = 1L << 2
|
||||
scAllowZeroKeyFrameRate = 1L << 3
|
||||
scShowBestDepth = 1L << 4
|
||||
scUseMovableModal = 1L << 5
|
||||
scDisableFrameRateItem = 1L << 6
|
||||
scShowDataRateAsKilobits = 1L << 7
|
||||
scListEveryCodec = 1 << 1
|
||||
scAllowZeroFrameRate = 1 << 2
|
||||
scAllowZeroKeyFrameRate = 1 << 3
|
||||
scShowBestDepth = 1 << 4
|
||||
scUseMovableModal = 1 << 5
|
||||
scDisableFrameRateItem = 1 << 6
|
||||
scShowDataRateAsKilobits = 1 << 7
|
||||
scPreferCropping = 1 << 0
|
||||
scPreferScaling = 1 << 1
|
||||
scPreferScalingAndCropping = scPreferScaling | scPreferCropping
|
||||
|
@ -1863,7 +1863,7 @@ scSoundInputSampleRateType = FOUR_CHAR_CODE('ssir')
|
|||
scSoundSampleRateChangeOK = FOUR_CHAR_CODE('rcok')
|
||||
scAvailableCompressionListType = FOUR_CHAR_CODE('avai')
|
||||
scGetCompression = 1
|
||||
scShowMotionSettings = 1L << 0
|
||||
scShowMotionSettings = 1 << 0
|
||||
scSettingsChangedItem = -1
|
||||
scCompressFlagIgnoreIdenticalFrames = 1
|
||||
kQTSettingsVideo = FOUR_CHAR_CODE('vide')
|
||||
|
@ -1897,14 +1897,14 @@ canMovieImportPartial = 1 << 13
|
|||
hasMovieImportMIMEList = 1 << 14
|
||||
canMovieImportAvoidBlocking = 1 << 15
|
||||
canMovieExportFromProcedures = 1 << 15
|
||||
canMovieExportValidateMovie = 1L << 16
|
||||
movieImportMustGetDestinationMediaType = 1L << 16
|
||||
movieExportNeedsResourceFork = 1L << 17
|
||||
canMovieImportDataReferences = 1L << 18
|
||||
movieExportMustGetSourceMediaType = 1L << 19
|
||||
canMovieImportWithIdle = 1L << 20
|
||||
canMovieImportValidateDataReferences = 1L << 21
|
||||
reservedForUseByGraphicsImporters = 1L << 23
|
||||
canMovieExportValidateMovie = 1 << 16
|
||||
movieImportMustGetDestinationMediaType = 1 << 16
|
||||
movieExportNeedsResourceFork = 1 << 17
|
||||
canMovieImportDataReferences = 1 << 18
|
||||
movieExportMustGetSourceMediaType = 1 << 19
|
||||
canMovieImportWithIdle = 1 << 20
|
||||
canMovieImportValidateDataReferences = 1 << 21
|
||||
reservedForUseByGraphicsImporters = 1 << 23
|
||||
movieImportCreateTrack = 1
|
||||
movieImportInParallel = 2
|
||||
movieImportMustUseTrack = 4
|
||||
|
@ -1925,20 +1925,20 @@ kQTMediaGroupResourceType = FOUR_CHAR_CODE('mgrp')
|
|||
kQTMediaGroupResourceVersion = 1
|
||||
kQTBrowserInfoResourceType = FOUR_CHAR_CODE('brws')
|
||||
kQTBrowserInfoResourceVersion = 1
|
||||
kQTMediaMIMEInfoHasChanged = (1L << 1)
|
||||
kQTMediaFileInfoHasChanged = (1L << 2)
|
||||
kQTMediaConfigCanUseApp = (1L << 18)
|
||||
kQTMediaConfigCanUsePlugin = (1L << 19)
|
||||
kQTMediaConfigUNUSED = (1L << 20)
|
||||
kQTMediaConfigBinaryFile = (1L << 23)
|
||||
kQTMediaMIMEInfoHasChanged = (1 << 1)
|
||||
kQTMediaFileInfoHasChanged = (1 << 2)
|
||||
kQTMediaConfigCanUseApp = (1 << 18)
|
||||
kQTMediaConfigCanUsePlugin = (1 << 19)
|
||||
kQTMediaConfigUNUSED = (1 << 20)
|
||||
kQTMediaConfigBinaryFile = (1 << 23)
|
||||
kQTMediaConfigTextFile = 0
|
||||
kQTMediaConfigMacintoshFile = (1L << 24)
|
||||
kQTMediaConfigAssociateByDefault = (1L << 27)
|
||||
kQTMediaConfigUseAppByDefault = (1L << 28)
|
||||
kQTMediaConfigUsePluginByDefault = (1L << 29)
|
||||
kQTMediaConfigMacintoshFile = (1 << 24)
|
||||
kQTMediaConfigAssociateByDefault = (1 << 27)
|
||||
kQTMediaConfigUseAppByDefault = (1 << 28)
|
||||
kQTMediaConfigUsePluginByDefault = (1 << 29)
|
||||
kQTMediaConfigDefaultsMask = (kQTMediaConfigUseAppByDefault | kQTMediaConfigUsePluginByDefault)
|
||||
kQTMediaConfigDefaultsShift = 12
|
||||
kQTMediaConfigHasFileHasQTAtoms = (1L << 30)
|
||||
kQTMediaConfigHasFileHasQTAtoms = (1 << 30)
|
||||
kQTMediaConfigStreamGroupID = FOUR_CHAR_CODE('strm')
|
||||
kQTMediaConfigInteractiveGroupID = FOUR_CHAR_CODE('intr')
|
||||
kQTMediaConfigVideoGroupID = FOUR_CHAR_CODE('eyes')
|
||||
|
@ -2013,17 +2013,17 @@ kQTPresetsListResourceType = FOUR_CHAR_CODE('stg#')
|
|||
kQTPresetsPlatformListResourceType = FOUR_CHAR_CODE('stgp')
|
||||
kQTPresetInfoIsDivider = 1
|
||||
kQTMovieExportSourceInfoResourceType = FOUR_CHAR_CODE('src#')
|
||||
kQTMovieExportSourceInfoIsMediaType = 1L << 0
|
||||
kQTMovieExportSourceInfoIsMediaCharacteristic = 1L << 1
|
||||
kQTMovieExportSourceInfoIsSourceType = 1L << 2
|
||||
kQTMovieExportSourceInfoIsMediaType = 1 << 0
|
||||
kQTMovieExportSourceInfoIsMediaCharacteristic = 1 << 1
|
||||
kQTMovieExportSourceInfoIsSourceType = 1 << 2
|
||||
movieExportUseConfiguredSettings = FOUR_CHAR_CODE('ucfg')
|
||||
movieExportWidth = FOUR_CHAR_CODE('wdth')
|
||||
movieExportHeight = FOUR_CHAR_CODE('hegt')
|
||||
movieExportDuration = FOUR_CHAR_CODE('dura')
|
||||
movieExportVideoFilter = FOUR_CHAR_CODE('iflt')
|
||||
movieExportTimeScale = FOUR_CHAR_CODE('tmsc')
|
||||
kQTBrowserInfoCanUseSystemFolderPlugin = (1L << 0)
|
||||
kQTPreFlightOpenComponent = (1L << 1)
|
||||
kQTBrowserInfoCanUseSystemFolderPlugin = (1 << 0)
|
||||
kQTPreFlightOpenComponent = (1 << 1)
|
||||
pnotComponentWantsEvents = 1
|
||||
pnotComponentNeedsNoCache = 2
|
||||
ShowFilePreviewComponentType = FOUR_CHAR_CODE('pnot')
|
||||
|
@ -2032,10 +2032,10 @@ DataCompressorComponentType = FOUR_CHAR_CODE('dcom')
|
|||
DataDecompressorComponentType = FOUR_CHAR_CODE('ddec')
|
||||
AppleDataCompressorSubType = FOUR_CHAR_CODE('adec')
|
||||
zlibDataCompressorSubType = FOUR_CHAR_CODE('zlib')
|
||||
kDataHCanRead = 1L << 0
|
||||
kDataHSpecialRead = 1L << 1
|
||||
kDataHSpecialReadFile = 1L << 2
|
||||
kDataHCanWrite = 1L << 3
|
||||
kDataHCanRead = 1 << 0
|
||||
kDataHSpecialRead = 1 << 1
|
||||
kDataHSpecialReadFile = 1 << 2
|
||||
kDataHCanWrite = 1 << 3
|
||||
kDataHSpecialWrite = 1 << 4
|
||||
kDataHSpecialWriteFile = 1 << 5
|
||||
kDataHCanStreamingWrite = 1 << 6
|
||||
|
@ -2055,12 +2055,12 @@ kDataHInfoFlagNeedsNetworkBandwidth = 1 << 2
|
|||
kDataHFileTypeMacOSFileType = FOUR_CHAR_CODE('ftyp')
|
||||
kDataHFileTypeExtension = FOUR_CHAR_CODE('fext')
|
||||
kDataHFileTypeMIME = FOUR_CHAR_CODE('mime')
|
||||
kDataHCreateFileButDontCreateResFile = (1L << 0)
|
||||
kDataHMovieUsageDoAppendMDAT = 1L << 0
|
||||
kDataHTempUseSameDirectory = 1L << 0
|
||||
kDataHTempUseSameVolume = 1L << 1
|
||||
kDataHTempCreateFile = 1L << 2
|
||||
kDataHTempOpenFile = 1L << 3
|
||||
kDataHCreateFileButDontCreateResFile = (1 << 0)
|
||||
kDataHMovieUsageDoAppendMDAT = 1 << 0
|
||||
kDataHTempUseSameDirectory = 1 << 0
|
||||
kDataHTempUseSameVolume = 1 << 1
|
||||
kDataHTempCreateFile = 1 << 2
|
||||
kDataHTempOpenFile = 1 << 3
|
||||
kDataHGetDataRateInfiniteRate = 0x7FFFFFFF
|
||||
kDataHSetTimeHintsSkipBandwidthRequest = 1 << 0
|
||||
videoDigitizerComponentType = FOUR_CHAR_CODE('vdig')
|
||||
|
@ -2091,48 +2091,48 @@ vdTypeBasic = 0
|
|||
vdTypeAlpha = 1
|
||||
vdTypeMask = 2
|
||||
vdTypeKey = 3
|
||||
digiInDoesNTSC = 1L << 0
|
||||
digiInDoesPAL = 1L << 1
|
||||
digiInDoesSECAM = 1L << 2
|
||||
digiInDoesGenLock = 1L << 7
|
||||
digiInDoesComposite = 1L << 8
|
||||
digiInDoesSVideo = 1L << 9
|
||||
digiInDoesComponent = 1L << 10
|
||||
digiInVTR_Broadcast = 1L << 11
|
||||
digiInDoesColor = 1L << 12
|
||||
digiInDoesBW = 1L << 13
|
||||
digiInSignalLock = 1L << 31
|
||||
digiOutDoes1 = 1L << 0
|
||||
digiOutDoes2 = 1L << 1
|
||||
digiOutDoes4 = 1L << 2
|
||||
digiOutDoes8 = 1L << 3
|
||||
digiOutDoes16 = 1L << 4
|
||||
digiOutDoes32 = 1L << 5
|
||||
digiOutDoesDither = 1L << 6
|
||||
digiOutDoesStretch = 1L << 7
|
||||
digiOutDoesShrink = 1L << 8
|
||||
digiOutDoesMask = 1L << 9
|
||||
digiOutDoesDouble = 1L << 11
|
||||
digiOutDoesQuad = 1L << 12
|
||||
digiOutDoesQuarter = 1L << 13
|
||||
digiOutDoesSixteenth = 1L << 14
|
||||
digiOutDoesRotate = 1L << 15
|
||||
digiOutDoesHorizFlip = 1L << 16
|
||||
digiOutDoesVertFlip = 1L << 17
|
||||
digiOutDoesSkew = 1L << 18
|
||||
digiOutDoesBlend = 1L << 19
|
||||
digiOutDoesWarp = 1L << 20
|
||||
digiOutDoesHW_DMA = 1L << 21
|
||||
digiOutDoesHWPlayThru = 1L << 22
|
||||
digiOutDoesILUT = 1L << 23
|
||||
digiOutDoesKeyColor = 1L << 24
|
||||
digiOutDoesAsyncGrabs = 1L << 25
|
||||
digiOutDoesUnreadableScreenBits = 1L << 26
|
||||
digiOutDoesCompress = 1L << 27
|
||||
digiOutDoesCompressOnly = 1L << 28
|
||||
digiOutDoesPlayThruDuringCompress = 1L << 29
|
||||
digiOutDoesCompressPartiallyVisible = 1L << 30
|
||||
digiOutDoesNotNeedCopyOfCompressData = 1L << 31
|
||||
digiInDoesNTSC = 1 << 0
|
||||
digiInDoesPAL = 1 << 1
|
||||
digiInDoesSECAM = 1 << 2
|
||||
digiInDoesGenLock = 1 << 7
|
||||
digiInDoesComposite = 1 << 8
|
||||
digiInDoesSVideo = 1 << 9
|
||||
digiInDoesComponent = 1 << 10
|
||||
digiInVTR_Broadcast = 1 << 11
|
||||
digiInDoesColor = 1 << 12
|
||||
digiInDoesBW = 1 << 13
|
||||
digiInSignalLock = 1 << 31
|
||||
digiOutDoes1 = 1 << 0
|
||||
digiOutDoes2 = 1 << 1
|
||||
digiOutDoes4 = 1 << 2
|
||||
digiOutDoes8 = 1 << 3
|
||||
digiOutDoes16 = 1 << 4
|
||||
digiOutDoes32 = 1 << 5
|
||||
digiOutDoesDither = 1 << 6
|
||||
digiOutDoesStretch = 1 << 7
|
||||
digiOutDoesShrink = 1 << 8
|
||||
digiOutDoesMask = 1 << 9
|
||||
digiOutDoesDouble = 1 << 11
|
||||
digiOutDoesQuad = 1 << 12
|
||||
digiOutDoesQuarter = 1 << 13
|
||||
digiOutDoesSixteenth = 1 << 14
|
||||
digiOutDoesRotate = 1 << 15
|
||||
digiOutDoesHorizFlip = 1 << 16
|
||||
digiOutDoesVertFlip = 1 << 17
|
||||
digiOutDoesSkew = 1 << 18
|
||||
digiOutDoesBlend = 1 << 19
|
||||
digiOutDoesWarp = 1 << 20
|
||||
digiOutDoesHW_DMA = 1 << 21
|
||||
digiOutDoesHWPlayThru = 1 << 22
|
||||
digiOutDoesILUT = 1 << 23
|
||||
digiOutDoesKeyColor = 1 << 24
|
||||
digiOutDoesAsyncGrabs = 1 << 25
|
||||
digiOutDoesUnreadableScreenBits = 1 << 26
|
||||
digiOutDoesCompress = 1 << 27
|
||||
digiOutDoesCompressOnly = 1 << 28
|
||||
digiOutDoesPlayThruDuringCompress = 1 << 29
|
||||
digiOutDoesCompressPartiallyVisible = 1 << 30
|
||||
digiOutDoesNotNeedCopyOfCompressData = 1 << 31
|
||||
dmaDepth1 = 1
|
||||
dmaDepth2 = 2
|
||||
dmaDepth4 = 4
|
||||
|
@ -2160,19 +2160,19 @@ xmlIdentifierInvalid = 0
|
|||
xmlContentTypeInvalid = 0
|
||||
xmlContentTypeElement = 1
|
||||
xmlContentTypeCharData = 2
|
||||
elementFlagAlwaysSelfContained = 1L << 0
|
||||
elementFlagPreserveWhiteSpace = 1L << 1
|
||||
xmlParseFlagAllowUppercase = 1L << 0
|
||||
xmlParseFlagAllowUnquotedAttributeValues = 1L << 1
|
||||
xmlParseFlagEventParseOnly = 1L << 2
|
||||
elementFlagAlwaysSelfContained = 1 << 0
|
||||
elementFlagPreserveWhiteSpace = 1 << 1
|
||||
xmlParseFlagAllowUppercase = 1 << 0
|
||||
xmlParseFlagAllowUnquotedAttributeValues = 1 << 1
|
||||
xmlParseFlagEventParseOnly = 1 << 2
|
||||
attributeValueKindCharString = 0
|
||||
attributeValueKindInteger = 1L << 0
|
||||
attributeValueKindPercent = 1L << 1
|
||||
attributeValueKindBoolean = 1L << 2
|
||||
attributeValueKindOnOff = 1L << 3
|
||||
attributeValueKindColor = 1L << 4
|
||||
attributeValueKindEnum = 1L << 5
|
||||
attributeValueKindCaseSensEnum = 1L << 6
|
||||
attributeValueKindInteger = 1 << 0
|
||||
attributeValueKindPercent = 1 << 1
|
||||
attributeValueKindBoolean = 1 << 2
|
||||
attributeValueKindOnOff = 1 << 3
|
||||
attributeValueKindColor = 1 << 4
|
||||
attributeValueKindEnum = 1 << 5
|
||||
attributeValueKindCaseSensEnum = 1 << 6
|
||||
MAX_ATTRIBUTE_VALUE_KIND = attributeValueKindCaseSensEnum
|
||||
nameSpaceIDNone = 0
|
||||
element_xml = 1
|
||||
|
@ -2267,7 +2267,7 @@ sgcVideoRectType = FOUR_CHAR_CODE('vrct')
|
|||
sgcVideoDigitizerType = FOUR_CHAR_CODE('vdig')
|
||||
QTVideoOutputComponentType = FOUR_CHAR_CODE('vout')
|
||||
QTVideoOutputComponentBaseSubType = FOUR_CHAR_CODE('base')
|
||||
kQTVideoOutputDontDisplayToUser = 1L << 0
|
||||
kQTVideoOutputDontDisplayToUser = 1 << 0
|
||||
kQTVODisplayModeItem = FOUR_CHAR_CODE('qdmi')
|
||||
kQTVODimensions = FOUR_CHAR_CODE('dimn')
|
||||
kQTVOResolution = FOUR_CHAR_CODE('resl')
|
||||
|
@ -2801,12 +2801,12 @@ mPartialDraw = 1 << 4
|
|||
mWantIdleActions = 1 << 5
|
||||
forceUpdateRedraw = 1 << 0
|
||||
forceUpdateNewBuffer = 1 << 1
|
||||
mHitTestBounds = 1L << 0
|
||||
mHitTestImage = 1L << 1
|
||||
mHitTestInvisible = 1L << 2
|
||||
mHitTestIsClick = 1L << 3
|
||||
mOpaque = 1L << 0
|
||||
mInvisible = 1L << 1
|
||||
mHitTestBounds = 1 << 0
|
||||
mHitTestImage = 1 << 1
|
||||
mHitTestInvisible = 1 << 2
|
||||
mHitTestIsClick = 1 << 3
|
||||
mOpaque = 1 << 0
|
||||
mInvisible = 1 << 1
|
||||
kMediaQTIdleFrequencySelector = FOUR_CHAR_CODE('idfq')
|
||||
kMediaVideoParamBrightness = 1
|
||||
kMediaVideoParamContrast = 2
|
||||
|
@ -3244,8 +3244,8 @@ kUndefined4EventType = 0x0000000E
|
|||
kGeneralEventType = 0x0000000F
|
||||
kXEventLengthBits = 0x00000002
|
||||
kGeneralEventLengthBits = 0x00000003
|
||||
kEventLen = 1L
|
||||
kXEventLen = 2L
|
||||
kEventLen = 1
|
||||
kXEventLen = 2
|
||||
kRestEventLen = kEventLen
|
||||
kNoteEventLen = kEventLen
|
||||
kControlEventLen = kEventLen
|
||||
|
@ -3265,7 +3265,7 @@ kXEventPartFieldPos = 16
|
|||
kXEventPartFieldWidth = 12
|
||||
kRestEventDurationFieldPos = 0
|
||||
kRestEventDurationFieldWidth = 24
|
||||
kRestEventDurationMax = ((1L << kRestEventDurationFieldWidth) - 1)
|
||||
kRestEventDurationMax = ((1 << kRestEventDurationFieldWidth) - 1)
|
||||
kNoteEventPitchFieldPos = 18
|
||||
kNoteEventPitchFieldWidth = 6
|
||||
kNoteEventPitchOffset = 32
|
||||
|
@ -3274,12 +3274,12 @@ kNoteEventVolumeFieldWidth = 7
|
|||
kNoteEventVolumeOffset = 0
|
||||
kNoteEventDurationFieldPos = 0
|
||||
kNoteEventDurationFieldWidth = 11
|
||||
kNoteEventDurationMax = ((1L << kNoteEventDurationFieldWidth) - 1)
|
||||
kNoteEventDurationMax = ((1 << kNoteEventDurationFieldWidth) - 1)
|
||||
kXNoteEventPitchFieldPos = 0
|
||||
kXNoteEventPitchFieldWidth = 16
|
||||
kXNoteEventDurationFieldPos = 0
|
||||
kXNoteEventDurationFieldWidth = 22
|
||||
kXNoteEventDurationMax = ((1L << kXNoteEventDurationFieldWidth) - 1)
|
||||
kXNoteEventDurationMax = ((1 << kXNoteEventDurationFieldWidth) - 1)
|
||||
kXNoteEventVolumeFieldPos = 22
|
||||
kXNoteEventVolumeFieldWidth = 7
|
||||
kControlEventControllerFieldPos = 16
|
||||
|
|
|
@ -300,15 +300,15 @@ k8BitRawOut = (1 << 8)
|
|||
k8BitTwosOut = (1 << 9)
|
||||
k16BitOut = (1 << 10)
|
||||
kStereoOut = (1 << 11)
|
||||
kReverse = (1L << 16)
|
||||
kRateConvert = (1L << 17)
|
||||
kCreateSoundSource = (1L << 18)
|
||||
kVMAwareness = (1L << 21)
|
||||
kHighQuality = (1L << 22)
|
||||
kNonRealTime = (1L << 23)
|
||||
kReverse = (1 << 16)
|
||||
kRateConvert = (1 << 17)
|
||||
kCreateSoundSource = (1 << 18)
|
||||
kVMAwareness = (1 << 21)
|
||||
kHighQuality = (1 << 22)
|
||||
kNonRealTime = (1 << 23)
|
||||
kSourcePaused = (1 << 0)
|
||||
kPassThrough = (1L << 16)
|
||||
kNoSoundComponentChain = (1L << 17)
|
||||
kPassThrough = (1 << 16)
|
||||
kNoSoundComponentChain = (1 << 17)
|
||||
kNoMixing = (1 << 0)
|
||||
kNoSampleRateConversion = (1 << 1)
|
||||
kNoSampleSizeConversion = (1 << 2)
|
||||
|
@ -343,9 +343,9 @@ audioLeftChannel = 1
|
|||
audioRightChannel = 2
|
||||
audioUnmuted = 0
|
||||
audioMuted = 1
|
||||
audioDoesMono = (1L << 0)
|
||||
audioDoesStereo = (1L << 1)
|
||||
audioDoesIndependentChannels = (1L << 2)
|
||||
audioDoesMono = (1 << 0)
|
||||
audioDoesStereo = (1 << 1)
|
||||
audioDoesIndependentChannels = (1 << 2)
|
||||
siCDQuality = FOUR_CHAR_CODE('cd ')
|
||||
siBestQuality = FOUR_CHAR_CODE('best')
|
||||
siBetterQuality = FOUR_CHAR_CODE('betr')
|
||||
|
@ -358,8 +358,8 @@ siReadPermission = 0
|
|||
siWritePermission = 1
|
||||
kSoundConverterDidntFillBuffer = (1 << 0)
|
||||
kSoundConverterHasLeftOverData = (1 << 1)
|
||||
kExtendedSoundSampleCountNotValid = 1L << 0
|
||||
kExtendedSoundBufferSizeValid = 1L << 1
|
||||
kExtendedSoundSampleCountNotValid = 1 << 0
|
||||
kExtendedSoundBufferSizeValid = 1 << 1
|
||||
kScheduledSoundDoScheduled = 1 << 0
|
||||
kScheduledSoundDoCallBack = 1 << 1
|
||||
kScheduledSoundExtendedHdr = 1 << 2
|
||||
|
|
|
@ -20,24 +20,24 @@ kSheetAlertWindowClass = 15
|
|||
kAltPlainWindowClass = 16
|
||||
kDrawerWindowClass = 20
|
||||
# kAllWindowClasses = (unsigned long)0xFFFFFFFF
|
||||
kWindowNoAttributes = 0L
|
||||
kWindowCloseBoxAttribute = (1L << 0)
|
||||
kWindowHorizontalZoomAttribute = (1L << 1)
|
||||
kWindowVerticalZoomAttribute = (1L << 2)
|
||||
kWindowNoAttributes = 0
|
||||
kWindowCloseBoxAttribute = (1 << 0)
|
||||
kWindowHorizontalZoomAttribute = (1 << 1)
|
||||
kWindowVerticalZoomAttribute = (1 << 2)
|
||||
kWindowFullZoomAttribute = (kWindowVerticalZoomAttribute | kWindowHorizontalZoomAttribute)
|
||||
kWindowCollapseBoxAttribute = (1L << 3)
|
||||
kWindowResizableAttribute = (1L << 4)
|
||||
kWindowSideTitlebarAttribute = (1L << 5)
|
||||
kWindowToolbarButtonAttribute = (1L << 6)
|
||||
kWindowNoUpdatesAttribute = (1L << 16)
|
||||
kWindowNoActivatesAttribute = (1L << 17)
|
||||
kWindowOpaqueForEventsAttribute = (1L << 18)
|
||||
kWindowNoShadowAttribute = (1L << 21)
|
||||
kWindowHideOnSuspendAttribute = (1L << 24)
|
||||
kWindowStandardHandlerAttribute = (1L << 25)
|
||||
kWindowHideOnFullScreenAttribute = (1L << 26)
|
||||
kWindowInWindowMenuAttribute = (1L << 27)
|
||||
kWindowLiveResizeAttribute = (1L << 28)
|
||||
kWindowCollapseBoxAttribute = (1 << 3)
|
||||
kWindowResizableAttribute = (1 << 4)
|
||||
kWindowSideTitlebarAttribute = (1 << 5)
|
||||
kWindowToolbarButtonAttribute = (1 << 6)
|
||||
kWindowNoUpdatesAttribute = (1 << 16)
|
||||
kWindowNoActivatesAttribute = (1 << 17)
|
||||
kWindowOpaqueForEventsAttribute = (1 << 18)
|
||||
kWindowNoShadowAttribute = (1 << 21)
|
||||
kWindowHideOnSuspendAttribute = (1 << 24)
|
||||
kWindowStandardHandlerAttribute = (1 << 25)
|
||||
kWindowHideOnFullScreenAttribute = (1 << 26)
|
||||
kWindowInWindowMenuAttribute = (1 << 27)
|
||||
kWindowLiveResizeAttribute = (1 << 28)
|
||||
# kWindowNoConstrainAttribute = (unsigned long)((1L << 31))
|
||||
kWindowStandardDocumentAttributes = (kWindowCloseBoxAttribute | kWindowFullZoomAttribute | kWindowCollapseBoxAttribute | kWindowResizableAttribute)
|
||||
kWindowStandardFloatingAttributes = (kWindowCloseBoxAttribute | kWindowCollapseBoxAttribute)
|
||||
|
@ -225,7 +225,7 @@ wTitleBarColor = 4
|
|||
# kMouseUpOutOfSlop = (long)0x80008000
|
||||
kWindowDefinitionVersionOne = 1
|
||||
kWindowDefinitionVersionTwo = 2
|
||||
kWindowIsCollapsedState = (1 << 0L)
|
||||
kWindowIsCollapsedState = (1 << 0)
|
||||
kStoredWindowSystemTag = FOUR_CHAR_CODE('appl')
|
||||
kStoredBasicWindowDescriptionID = FOUR_CHAR_CODE('sbas')
|
||||
kStoredWindowPascalTitleID = FOUR_CHAR_CODE('s255')
|
||||
|
@ -251,8 +251,8 @@ kWindowGroupContentsRecurse = 1 << 1
|
|||
kWindowGroupContentsVisible = 1 << 2
|
||||
kWindowPaintProcOptionsNone = 0
|
||||
kScrollWindowNoOptions = 0
|
||||
kScrollWindowInvalidate = (1L << 0)
|
||||
kScrollWindowEraseToPortBackground = (1L << 1)
|
||||
kScrollWindowInvalidate = (1 << 0)
|
||||
kScrollWindowEraseToPortBackground = (1 << 1)
|
||||
kWindowMenuIncludeRotate = 1 << 0
|
||||
kWindowZoomTransitionEffect = 1
|
||||
kWindowSheetTransitionEffect = 2
|
||||
|
@ -261,11 +261,11 @@ kWindowShowTransitionAction = 1
|
|||
kWindowHideTransitionAction = 2
|
||||
kWindowMoveTransitionAction = 3
|
||||
kWindowResizeTransitionAction = 4
|
||||
kWindowConstrainMayResize = (1L << 0)
|
||||
kWindowConstrainMoveRegardlessOfFit = (1L << 1)
|
||||
kWindowConstrainAllowPartial = (1L << 2)
|
||||
kWindowConstrainCalcOnly = (1L << 3)
|
||||
kWindowConstrainUseTransitionWindow = (1L << 4)
|
||||
kWindowConstrainMayResize = (1 << 0)
|
||||
kWindowConstrainMoveRegardlessOfFit = (1 << 1)
|
||||
kWindowConstrainAllowPartial = (1 << 2)
|
||||
kWindowConstrainCalcOnly = (1 << 3)
|
||||
kWindowConstrainUseTransitionWindow = (1 << 4)
|
||||
kWindowConstrainStandardOptions = kWindowConstrainMoveRegardlessOfFit
|
||||
kWindowLatentVisibleFloater = 1 << 0
|
||||
kWindowLatentVisibleSuspend = 1 << 1
|
||||
|
|
|
@ -189,13 +189,13 @@ def unpack(desc, formodulename=""):
|
|||
return struct.unpack('l', desc.data)[0]
|
||||
if t == typeLongDateTime:
|
||||
a, b = struct.unpack('lL', desc.data)
|
||||
return (long(a) << 32) + b
|
||||
return (int(a) << 32) + b
|
||||
if t == typeNull:
|
||||
return None
|
||||
if t == typeMagnitude:
|
||||
v = struct.unpack('l', desc.data)
|
||||
if v < 0:
|
||||
v = 0x100000000L + v
|
||||
v = 0x100000000 + v
|
||||
return v
|
||||
if t == typeObjectSpecifier:
|
||||
record = desc.AECoerceDesc('reco')
|
||||
|
|
|
@ -28,24 +28,24 @@ smAllScripts = -3
|
|||
# Find the epoch conversion for file dates in a way that works on OS9 and OSX
|
||||
import time
|
||||
if time.gmtime(0)[0] == 1970:
|
||||
_EPOCHCONVERT = -((1970-1904)*365 + 17) * (24*60*60) + 0x100000000L
|
||||
_EPOCHCONVERT = -((1970-1904)*365 + 17) * (24*60*60) + 0x100000000
|
||||
def _utc2time(utc):
|
||||
t = utc[1] + _EPOCHCONVERT
|
||||
return int(t)
|
||||
def _time2utc(t):
|
||||
t = int(t) - _EPOCHCONVERT
|
||||
if t < -0x7fffffff:
|
||||
t = t + 0x10000000L
|
||||
t = t + 0x10000000
|
||||
return (0, int(t), 0)
|
||||
else:
|
||||
def _utc2time(utc):
|
||||
t = utc[1]
|
||||
if t < 0:
|
||||
t = t + 0x100000000L
|
||||
t = t + 0x100000000
|
||||
return t
|
||||
def _time2utc(t):
|
||||
if t > 0x7fffffff:
|
||||
t = t - 0x100000000L
|
||||
t = t - 0x100000000
|
||||
return (0, int(t), 0)
|
||||
|
||||
# The old name of the error object:
|
||||
|
|
|
@ -148,7 +148,7 @@ class PimpUrllibDownloader(PimpDownloader):
|
|||
keepgoing = True
|
||||
download = urllib2.urlopen(url)
|
||||
if "content-length" in download.headers:
|
||||
length = long(download.headers['content-length'])
|
||||
length = int(download.headers['content-length'])
|
||||
else:
|
||||
length = -1
|
||||
|
||||
|
|
|
@ -28,33 +28,33 @@ IPPROTO_RAW = 255
|
|||
IPPROTO_MAX = 256
|
||||
IPPORT_RESERVED = 1024
|
||||
IPPORT_USERRESERVED = 5000
|
||||
def IN_CLASSA(i): return (((long)(i) & 0x80000000) == 0)
|
||||
def IN_CLASSA(i): return (((int)(i) & 0x80000000) == 0)
|
||||
|
||||
IN_CLASSA_NET = 0xff000000
|
||||
IN_CLASSA_NSHIFT = 24
|
||||
IN_CLASSA_HOST = 0x00ffffff
|
||||
IN_CLASSA_MAX = 128
|
||||
def IN_CLASSB(i): return (((long)(i) & 0xc0000000) == 0x80000000)
|
||||
def IN_CLASSB(i): return (((int)(i) & 0xc0000000) == 0x80000000)
|
||||
|
||||
IN_CLASSB_NET = 0xffff0000
|
||||
IN_CLASSB_NSHIFT = 16
|
||||
IN_CLASSB_HOST = 0x0000ffff
|
||||
IN_CLASSB_MAX = 65536
|
||||
def IN_CLASSC(i): return (((long)(i) & 0xe0000000) == 0xc0000000)
|
||||
def IN_CLASSC(i): return (((int)(i) & 0xe0000000) == 0xc0000000)
|
||||
|
||||
IN_CLASSC_NET = 0xffffff00
|
||||
IN_CLASSC_NSHIFT = 8
|
||||
IN_CLASSC_HOST = 0x000000ff
|
||||
def IN_CLASSD(i): return (((long)(i) & 0xf0000000) == 0xe0000000)
|
||||
def IN_CLASSD(i): return (((int)(i) & 0xf0000000) == 0xe0000000)
|
||||
|
||||
IN_CLASSD_NET = 0xf0000000
|
||||
IN_CLASSD_NSHIFT = 28
|
||||
IN_CLASSD_HOST = 0x0fffffff
|
||||
def IN_MULTICAST(i): return IN_CLASSD(i)
|
||||
|
||||
def IN_EXPERIMENTAL(i): return (((long)(i) & 0xe0000000) == 0xe0000000)
|
||||
def IN_EXPERIMENTAL(i): return (((int)(i) & 0xe0000000) == 0xe0000000)
|
||||
|
||||
def IN_BADCLASS(i): return (((long)(i) & 0xf0000000) == 0xf0000000)
|
||||
def IN_BADCLASS(i): return (((int)(i) & 0xf0000000) == 0xf0000000)
|
||||
|
||||
INADDR_ANY = 0x00000000
|
||||
INADDR_LOOPBACK = 0x7f000001
|
||||
|
|
|
@ -42,7 +42,7 @@ _LARGEFILE64_SOURCE = 1
|
|||
_LARGEFILE_SOURCE = 1
|
||||
_FILE_OFFSET_BITS = 64
|
||||
_FILE_OFFSET_BITS = 32
|
||||
_POSIX_C_SOURCE = 199506L
|
||||
_POSIX_C_SOURCE = 199506
|
||||
_POSIX_PTHREAD_SEMANTICS = 1
|
||||
_XOPEN_VERSION = 500
|
||||
_XOPEN_VERSION = 4
|
||||
|
@ -95,10 +95,10 @@ NGROUPS_UMIN = 0
|
|||
NGROUPS_UMAX = 32
|
||||
NGROUPS_MAX_DEFAULT = 16
|
||||
NZERO = 20
|
||||
NULL = 0L
|
||||
NULL = 0
|
||||
NULL = 0
|
||||
CMASK = 022
|
||||
CDLIMIT = (1L<<11)
|
||||
CDLIMIT = (1<<11)
|
||||
NBPS = 0x20000
|
||||
NBPSCTR = 512
|
||||
UBSIZE = 512
|
||||
|
@ -117,9 +117,9 @@ DEV_BSIZE = 512
|
|||
DEV_BSHIFT = 9
|
||||
MAXFRAG = 8
|
||||
MAXOFF32_T = 0x7fffffff
|
||||
MAXOFF_T = 0x7fffffffffffffffl
|
||||
MAXOFFSET_T = 0x7fffffffffffffffl
|
||||
MAXOFF_T = 0x7fffffffl
|
||||
MAXOFF_T = 0x7fffffffffffffff
|
||||
MAXOFFSET_T = 0x7fffffffffffffff
|
||||
MAXOFF_T = 0x7fffffff
|
||||
MAXOFFSET_T = 0x7fffffff
|
||||
def btodb(bytes): return \
|
||||
|
||||
|
@ -312,9 +312,9 @@ _PC_PRIO_IO = 11
|
|||
_PC_SYNC_IO = 12
|
||||
_PC_FILESIZEBITS = 67
|
||||
_PC_LAST = 67
|
||||
_POSIX_VERSION = 199506L
|
||||
_POSIX2_VERSION = 199209L
|
||||
_POSIX2_C_VERSION = 199209L
|
||||
_POSIX_VERSION = 199506
|
||||
_POSIX2_VERSION = 199209
|
||||
_POSIX2_C_VERSION = 199209
|
||||
_XOPEN_XCU_VERSION = 4
|
||||
_XOPEN_REALTIME = 1
|
||||
_XOPEN_ENH_I18N = 1
|
||||
|
@ -431,7 +431,7 @@ def TIMESTRUC_TO_TICK(tsp): return \
|
|||
from TYPES import *
|
||||
|
||||
# Included from iso/time_iso.h
|
||||
NULL = 0L
|
||||
NULL = 0
|
||||
NULL = 0
|
||||
CLOCKS_PER_SEC = 1000000
|
||||
|
||||
|
@ -869,9 +869,9 @@ RLIMIT_NOFILE = 5
|
|||
RLIMIT_VMEM = 6
|
||||
RLIMIT_AS = RLIMIT_VMEM
|
||||
RLIM_NLIMITS = 7
|
||||
RLIM_INFINITY = (-3l)
|
||||
RLIM_SAVED_MAX = (-2l)
|
||||
RLIM_SAVED_CUR = (-1l)
|
||||
RLIM_INFINITY = (-3)
|
||||
RLIM_SAVED_MAX = (-2)
|
||||
RLIM_SAVED_CUR = (-1)
|
||||
RLIM_INFINITY = 0x7fffffff
|
||||
RLIM_SAVED_MAX = 0x7ffffffe
|
||||
RLIM_SAVED_CUR = 0x7ffffffd
|
||||
|
@ -1063,7 +1063,7 @@ POLLNOERR = 0x0400
|
|||
POLLCLOSED = 0x8000
|
||||
|
||||
# Included from sys/strmdep.h
|
||||
def str_aligned(X): return (((ulong_t)(X) & (sizeof (long) - 1)) == 0)
|
||||
def str_aligned(X): return (((ulong_t)(X) & (sizeof (int) - 1)) == 0)
|
||||
|
||||
|
||||
# Included from sys/strft.h
|
||||
|
|
|
@ -42,7 +42,7 @@ _LARGEFILE64_SOURCE = 1
|
|||
_LARGEFILE_SOURCE = 1
|
||||
_FILE_OFFSET_BITS = 64
|
||||
_FILE_OFFSET_BITS = 32
|
||||
_POSIX_C_SOURCE = 199506L
|
||||
_POSIX_C_SOURCE = 199506
|
||||
_POSIX_PTHREAD_SEMANTICS = 1
|
||||
_XOPEN_VERSION = 500
|
||||
_XOPEN_VERSION = 4
|
||||
|
@ -92,10 +92,10 @@ NGROUPS_UMIN = 0
|
|||
NGROUPS_UMAX = 32
|
||||
NGROUPS_MAX_DEFAULT = 16
|
||||
NZERO = 20
|
||||
NULL = 0L
|
||||
NULL = 0
|
||||
NULL = 0
|
||||
CMASK = 022
|
||||
CDLIMIT = (1L<<11)
|
||||
CDLIMIT = (1<<11)
|
||||
NBPS = 0x20000
|
||||
NBPSCTR = 512
|
||||
UBSIZE = 512
|
||||
|
@ -114,9 +114,9 @@ DEV_BSIZE = 512
|
|||
DEV_BSHIFT = 9
|
||||
MAXFRAG = 8
|
||||
MAXOFF32_T = 0x7fffffff
|
||||
MAXOFF_T = 0x7fffffffffffffffl
|
||||
MAXOFFSET_T = 0x7fffffffffffffffl
|
||||
MAXOFF_T = 0x7fffffffl
|
||||
MAXOFF_T = 0x7fffffffffffffff
|
||||
MAXOFFSET_T = 0x7fffffffffffffff
|
||||
MAXOFF_T = 0x7fffffff
|
||||
MAXOFFSET_T = 0x7fffffff
|
||||
def btodb(bytes): return \
|
||||
|
||||
|
@ -309,9 +309,9 @@ _PC_PRIO_IO = 11
|
|||
_PC_SYNC_IO = 12
|
||||
_PC_FILESIZEBITS = 67
|
||||
_PC_LAST = 67
|
||||
_POSIX_VERSION = 199506L
|
||||
_POSIX2_VERSION = 199209L
|
||||
_POSIX2_C_VERSION = 199209L
|
||||
_POSIX_VERSION = 199506
|
||||
_POSIX2_VERSION = 199209
|
||||
_POSIX2_C_VERSION = 199209
|
||||
_XOPEN_XCU_VERSION = 4
|
||||
_XOPEN_REALTIME = 1
|
||||
_XOPEN_ENH_I18N = 1
|
||||
|
@ -428,7 +428,7 @@ def TIMESTRUC_TO_TICK(tsp): return \
|
|||
from TYPES import *
|
||||
|
||||
# Included from iso/time_iso.h
|
||||
NULL = 0L
|
||||
NULL = 0
|
||||
NULL = 0
|
||||
CLOCKS_PER_SEC = 1000000
|
||||
|
||||
|
@ -872,9 +872,9 @@ RLIMIT_NOFILE = 5
|
|||
RLIMIT_VMEM = 6
|
||||
RLIMIT_AS = RLIMIT_VMEM
|
||||
RLIM_NLIMITS = 7
|
||||
RLIM_INFINITY = (-3l)
|
||||
RLIM_SAVED_MAX = (-2l)
|
||||
RLIM_SAVED_CUR = (-1l)
|
||||
RLIM_INFINITY = (-3)
|
||||
RLIM_SAVED_MAX = (-2)
|
||||
RLIM_SAVED_CUR = (-1)
|
||||
RLIM_INFINITY = 0x7fffffff
|
||||
RLIM_SAVED_MAX = 0x7ffffffe
|
||||
RLIM_SAVED_CUR = 0x7ffffffd
|
||||
|
|
|
@ -42,7 +42,7 @@ _LARGEFILE64_SOURCE = 1
|
|||
_LARGEFILE_SOURCE = 1
|
||||
_FILE_OFFSET_BITS = 64
|
||||
_FILE_OFFSET_BITS = 32
|
||||
_POSIX_C_SOURCE = 199506L
|
||||
_POSIX_C_SOURCE = 199506
|
||||
_POSIX_PTHREAD_SEMANTICS = 1
|
||||
_XOPEN_VERSION = 500
|
||||
_XOPEN_VERSION = 4
|
||||
|
@ -216,10 +216,10 @@ SHRT_MAX = 32767
|
|||
USHRT_MAX = 65535
|
||||
INT_MIN = (-2147483647-1)
|
||||
INT_MAX = 2147483647
|
||||
LONG_MIN = (-9223372036854775807L-1L)
|
||||
LONG_MAX = 9223372036854775807L
|
||||
LONG_MIN = (-2147483647L-1L)
|
||||
LONG_MAX = 2147483647L
|
||||
LONG_MIN = (-9223372036854775807-1)
|
||||
LONG_MAX = 9223372036854775807
|
||||
LONG_MIN = (-2147483647-1)
|
||||
LONG_MAX = 2147483647
|
||||
P_MYID = (-1)
|
||||
|
||||
# Included from sys/select.h
|
||||
|
@ -303,7 +303,7 @@ def TIMESTRUC_TO_TICK(tsp): return \
|
|||
from TYPES import *
|
||||
|
||||
# Included from iso/time_iso.h
|
||||
NULL = 0L
|
||||
NULL = 0
|
||||
NULL = 0
|
||||
CLOCKS_PER_SEC = 1000000
|
||||
FD_SETSIZE = 65536
|
||||
|
|
|
@ -1,33 +1,33 @@
|
|||
# Generated by h2py from /usr/include/netinet/in.h
|
||||
|
||||
# Included from netinet/in_f.h
|
||||
def IN_CLASSA(i): return (((long)(i) & 0x80000000) == 0)
|
||||
def IN_CLASSA(i): return (((int)(i) & 0x80000000) == 0)
|
||||
|
||||
IN_CLASSA_NET = 0xff000000
|
||||
IN_CLASSA_NSHIFT = 24
|
||||
IN_CLASSA_HOST = 0x00ffffff
|
||||
IN_CLASSA_MAX = 128
|
||||
def IN_CLASSB(i): return (((long)(i) & 0xc0000000) == 0x80000000)
|
||||
def IN_CLASSB(i): return (((int)(i) & 0xc0000000) == 0x80000000)
|
||||
|
||||
IN_CLASSB_NET = 0xffff0000
|
||||
IN_CLASSB_NSHIFT = 16
|
||||
IN_CLASSB_HOST = 0x0000ffff
|
||||
IN_CLASSB_MAX = 65536
|
||||
def IN_CLASSC(i): return (((long)(i) & 0xe0000000) == 0xc0000000)
|
||||
def IN_CLASSC(i): return (((int)(i) & 0xe0000000) == 0xc0000000)
|
||||
|
||||
IN_CLASSC_NET = 0xffffff00
|
||||
IN_CLASSC_NSHIFT = 8
|
||||
IN_CLASSC_HOST = 0x000000ff
|
||||
def IN_CLASSD(i): return (((long)(i) & 0xf0000000) == 0xe0000000)
|
||||
def IN_CLASSD(i): return (((int)(i) & 0xf0000000) == 0xe0000000)
|
||||
|
||||
IN_CLASSD_NET = 0xf0000000
|
||||
IN_CLASSD_NSHIFT = 28
|
||||
IN_CLASSD_HOST = 0x0fffffff
|
||||
def IN_MULTICAST(i): return IN_CLASSD(i)
|
||||
|
||||
def IN_EXPERIMENTAL(i): return (((long)(i) & 0xe0000000) == 0xe0000000)
|
||||
def IN_EXPERIMENTAL(i): return (((int)(i) & 0xe0000000) == 0xe0000000)
|
||||
|
||||
def IN_BADCLASS(i): return (((long)(i) & 0xf0000000) == 0xf0000000)
|
||||
def IN_BADCLASS(i): return (((int)(i) & 0xf0000000) == 0xf0000000)
|
||||
|
||||
INADDR_ANY = 0x00000000
|
||||
INADDR_LOOPBACK = 0x7f000001
|
||||
|
@ -330,7 +330,7 @@ MSG_TRUNC = 0x10
|
|||
MSG_EOR = 0x30
|
||||
MSG_WAITALL = 0x20
|
||||
MSG_MAXIOVLEN = 16
|
||||
def OPTLEN(x): return ((((x) + sizeof(long) - 1) / sizeof(long)) * sizeof(long))
|
||||
def OPTLEN(x): return ((((x) + sizeof(int) - 1) / sizeof(int)) * sizeof(int))
|
||||
|
||||
GIARG = 0x1
|
||||
CONTI = 0x2
|
||||
|
@ -715,7 +715,7 @@ FLUSHDATA = 0
|
|||
STRHIGH = 5120
|
||||
STRLOW = 1024
|
||||
MAXIOCBSZ = 1024
|
||||
def straln(a): return (caddr_t)((long)(a) & ~(sizeof(int)-1))
|
||||
def straln(a): return (caddr_t)((int)(a) & ~(sizeof(int)-1))
|
||||
|
||||
IPM_ID = 200
|
||||
ICMPM_ID = 201
|
||||
|
|
|
@ -213,7 +213,7 @@ _PC_NO_TRUNC = 7
|
|||
_PC_VDISABLE = 8
|
||||
_PC_CHOWN_RESTRICTED = 9
|
||||
_PC_FILESIZEBITS = 10
|
||||
_POSIX_VERSION = 199009L
|
||||
_POSIX_VERSION = 199009
|
||||
_XOPEN_VERSION = 4
|
||||
GF_PATH = "/etc/group"
|
||||
PF_PATH = "/etc/passwd"
|
||||
|
@ -231,8 +231,8 @@ STDERR_FILENO = 2
|
|||
_XOPEN_UNIX = 1
|
||||
_XOPEN_ENH_I18N = 1
|
||||
_XOPEN_XPG4 = 1
|
||||
_POSIX2_C_VERSION = 199209L
|
||||
_POSIX2_VERSION = 199209L
|
||||
_POSIX2_C_VERSION = 199209
|
||||
_POSIX2_VERSION = 199209
|
||||
_XOPEN_XCU_VERSION = 4
|
||||
_POSIX_SEMAPHORES = 1
|
||||
_POSIX_THREADS = 1
|
||||
|
|
|
@ -682,7 +682,7 @@ def mac_ver(release='',versioninfo=('','',''),machine=''):
|
|||
patch = (sysv & 0x000F)
|
||||
release = '%s.%i.%i' % (_bcd2str(major),minor,patch)
|
||||
if sysu:
|
||||
major = int((sysu & 0xFF000000L) >> 24)
|
||||
major = int((sysu & 0xFF000000) >> 24)
|
||||
minor = (sysu & 0x00F00000) >> 20
|
||||
bugfix = (sysu & 0x000F0000) >> 16
|
||||
stage = (sysu & 0x0000FF00) >> 8
|
||||
|
|
|
@ -114,9 +114,9 @@ def compile(file, cfile=None, dfile=None, doraise=False):
|
|||
"""
|
||||
f = open(file, 'U')
|
||||
try:
|
||||
timestamp = long(os.fstat(f.fileno()).st_mtime)
|
||||
timestamp = int(os.fstat(f.fileno()).st_mtime)
|
||||
except AttributeError:
|
||||
timestamp = long(os.stat(file).st_mtime)
|
||||
timestamp = int(os.stat(file).st_mtime)
|
||||
codestring = f.read()
|
||||
f.close()
|
||||
if codestring and codestring[-1] != '\n':
|
||||
|
|
|
@ -105,10 +105,10 @@ class Random(_random.Random):
|
|||
|
||||
if a is None:
|
||||
try:
|
||||
a = long(_hexlify(_urandom(16)), 16)
|
||||
a = int(_hexlify(_urandom(16)), 16)
|
||||
except NotImplementedError:
|
||||
import time
|
||||
a = long(time.time() * 256) # use fractional seconds
|
||||
a = int(time.time() * 256) # use fractional seconds
|
||||
|
||||
super(Random, self).seed(a)
|
||||
self.gauss_next = None
|
||||
|
@ -145,7 +145,7 @@ class Random(_random.Random):
|
|||
## -------------------- integer methods -------------------
|
||||
|
||||
def randrange(self, start, stop=None, step=1, int=int, default=None,
|
||||
maxwidth=1L<<BPF):
|
||||
maxwidth=1<<BPF):
|
||||
"""Choose a random item from range(start, stop[, step]).
|
||||
|
||||
This fixes the problem with randint() which includes the
|
||||
|
@ -214,7 +214,7 @@ class Random(_random.Random):
|
|||
|
||||
return self.randrange(a, b+1)
|
||||
|
||||
def _randbelow(self, n, _log=_log, int=int, _maxwidth=1L<<BPF,
|
||||
def _randbelow(self, n, _log=_log, int=int, _maxwidth=1<<BPF,
|
||||
_Method=_MethodType, _BuiltinMethod=_BuiltinMethodType):
|
||||
"""Return a random int in the range [0,n)
|
||||
|
||||
|
@ -626,12 +626,12 @@ class WichmannHill(Random):
|
|||
|
||||
if a is None:
|
||||
try:
|
||||
a = long(_hexlify(_urandom(16)), 16)
|
||||
a = int(_hexlify(_urandom(16)), 16)
|
||||
except NotImplementedError:
|
||||
import time
|
||||
a = long(time.time() * 256) # use fractional seconds
|
||||
a = int(time.time() * 256) # use fractional seconds
|
||||
|
||||
if not isinstance(a, (int, long)):
|
||||
if not isinstance(a, (int, int)):
|
||||
a = hash(a)
|
||||
|
||||
a, x = divmod(a, 30268)
|
||||
|
@ -721,7 +721,7 @@ class WichmannHill(Random):
|
|||
if 0 == x == y == z:
|
||||
# Initialize from current time
|
||||
import time
|
||||
t = long(time.time() * 256)
|
||||
t = int(time.time() * 256)
|
||||
t = int((t&0xffffff) ^ (t>>24))
|
||||
t, x = divmod(t, 256)
|
||||
t, y = divmod(t, 256)
|
||||
|
@ -766,7 +766,7 @@ class SystemRandom(Random):
|
|||
|
||||
def random(self):
|
||||
"""Get the next random number in the range [0.0, 1.0)."""
|
||||
return (long(_hexlify(_urandom(7)), 16) >> 3) * RECIP_BPF
|
||||
return (int(_hexlify(_urandom(7)), 16) >> 3) * RECIP_BPF
|
||||
|
||||
def getrandbits(self, k):
|
||||
"""getrandbits(k) -> x. Generates a long int with k random bits."""
|
||||
|
@ -775,7 +775,7 @@ class SystemRandom(Random):
|
|||
if k != int(k):
|
||||
raise TypeError('number of bits should be an integer')
|
||||
bytes = (k + 7) // 8 # bits / 8 and rounded up
|
||||
x = long(_hexlify(_urandom(bytes)), 16)
|
||||
x = int(_hexlify(_urandom(bytes)), 16)
|
||||
return x >> (bytes * 8 - k) # trim excess bits
|
||||
|
||||
def _stub(self, *args, **kwds):
|
||||
|
|
|
@ -19,7 +19,7 @@ assert _sre.MAGIC == MAGIC, "SRE module mismatch"
|
|||
if _sre.CODESIZE == 2:
|
||||
MAXCODE = 65535
|
||||
else:
|
||||
MAXCODE = 0xFFFFFFFFL
|
||||
MAXCODE = 0xFFFFFFFF
|
||||
|
||||
def _identityfunction(x):
|
||||
return x
|
||||
|
@ -267,7 +267,7 @@ def _mk_bitmap(bits):
|
|||
if _sre.CODESIZE == 2:
|
||||
start = (1, 0)
|
||||
else:
|
||||
start = (1L, 0L)
|
||||
start = (1, 0)
|
||||
m, v = start
|
||||
for c in bits:
|
||||
if c:
|
||||
|
|
|
@ -149,7 +149,7 @@ class SubPattern:
|
|||
# determine the width (min, max) for this subpattern
|
||||
if self.width:
|
||||
return self.width
|
||||
lo = hi = 0L
|
||||
lo = hi = 0
|
||||
UNITCODES = (ANY, RANGE, IN, LITERAL, NOT_LITERAL, CATEGORY)
|
||||
REPEATCODES = (MIN_REPEAT, MAX_REPEAT)
|
||||
for op, av in self.data:
|
||||
|
@ -172,8 +172,8 @@ class SubPattern:
|
|||
hi = hi + j
|
||||
elif op in REPEATCODES:
|
||||
i, j = av[2].getwidth()
|
||||
lo = lo + long(i) * av[0]
|
||||
hi = hi + long(j) * av[1]
|
||||
lo = lo + int(i) * av[0]
|
||||
hi = hi + int(j) * av[1]
|
||||
elif op in UNITCODES:
|
||||
lo = lo + 1
|
||||
hi = hi + 1
|
||||
|
|
|
@ -374,7 +374,7 @@ def rfind(s, *args):
|
|||
# for a bit of speed
|
||||
_float = float
|
||||
_int = int
|
||||
_long = long
|
||||
_long = int
|
||||
|
||||
# Convert string to float
|
||||
def atof(s):
|
||||
|
|
|
@ -184,7 +184,7 @@ def rfind(s, *args):
|
|||
# for a bit of speed
|
||||
_float = float
|
||||
_int = int
|
||||
_long = long
|
||||
_long = int
|
||||
_StringType = type('')
|
||||
|
||||
# Convert string to float
|
||||
|
|
|
@ -541,7 +541,7 @@ class Popen(object):
|
|||
_cleanup()
|
||||
|
||||
self._child_created = False
|
||||
if not isinstance(bufsize, (int, long)):
|
||||
if not isinstance(bufsize, (int, int)):
|
||||
raise TypeError("bufsize must be an integer")
|
||||
|
||||
if mswindows:
|
||||
|
@ -764,7 +764,7 @@ class Popen(object):
|
|||
startupinfo.wShowWindow = SW_HIDE
|
||||
comspec = os.environ.get("COMSPEC", "cmd.exe")
|
||||
args = comspec + " /c " + args
|
||||
if (GetVersion() >= 0x80000000L or
|
||||
if (GetVersion() >= 0x80000000 or
|
||||
os.path.basename(comspec).lower() == "command.com"):
|
||||
# Win9x, or using command.com on NT. We need to
|
||||
# use the w9xpopen intermediate program. For more
|
||||
|
|
|
@ -119,7 +119,7 @@ AUDIO_FILE_ENCODING_ADPCM_G723_5 = 26
|
|||
AUDIO_FILE_ENCODING_ALAW_8 = 27
|
||||
|
||||
# from <multimedia/audio_hdr.h>
|
||||
AUDIO_UNKNOWN_SIZE = 0xFFFFFFFFL # ((unsigned)(~0))
|
||||
AUDIO_UNKNOWN_SIZE = 0xFFFFFFFF # ((unsigned)(~0))
|
||||
|
||||
_simple_encodings = [AUDIO_FILE_ENCODING_MULAW_8,
|
||||
AUDIO_FILE_ENCODING_LINEAR_8,
|
||||
|
@ -132,7 +132,7 @@ class Error(Exception):
|
|||
pass
|
||||
|
||||
def _read_u32(file):
|
||||
x = 0L
|
||||
x = 0
|
||||
for i in range(4):
|
||||
byte = file.read(1)
|
||||
if byte == '':
|
||||
|
|
|
@ -80,7 +80,7 @@ VERSION = "00" # version number
|
|||
LENGTH_NAME = 100 # maximum length of a filename
|
||||
LENGTH_LINK = 100 # maximum length of a linkname
|
||||
LENGTH_PREFIX = 155 # maximum length of the prefix field
|
||||
MAXSIZE_MEMBER = 077777777777L # maximum size of a file (11 octal digits)
|
||||
MAXSIZE_MEMBER = 077777777777 # maximum size of a file (11 octal digits)
|
||||
|
||||
REGTYPE = "0" # regular file
|
||||
AREGTYPE = "\0" # regular file
|
||||
|
@ -152,7 +152,7 @@ def nti(s):
|
|||
except ValueError:
|
||||
raise HeaderError("invalid header")
|
||||
else:
|
||||
n = 0L
|
||||
n = 0
|
||||
for i in xrange(len(s) - 1):
|
||||
n <<= 8
|
||||
n += ord(s[i + 1])
|
||||
|
@ -347,7 +347,7 @@ class _Stream:
|
|||
self.fileobj = fileobj
|
||||
self.bufsize = bufsize
|
||||
self.buf = ""
|
||||
self.pos = 0L
|
||||
self.pos = 0
|
||||
self.closed = False
|
||||
|
||||
if comptype == "gz":
|
||||
|
@ -384,7 +384,7 @@ class _Stream:
|
|||
-self.zlib.MAX_WBITS,
|
||||
self.zlib.DEF_MEM_LEVEL,
|
||||
0)
|
||||
timestamp = struct.pack("<L", long(time.time()))
|
||||
timestamp = struct.pack("<L", int(time.time()))
|
||||
self.__write("\037\213\010\010%s\002\377" % timestamp)
|
||||
if self.name.endswith(".gz"):
|
||||
self.name = self.name[:-3]
|
||||
|
@ -429,8 +429,8 @@ class _Stream:
|
|||
# while the same crc on a 64-bit box may "look positive".
|
||||
# To avoid irksome warnings from the `struct` module, force
|
||||
# it to look positive on all boxes.
|
||||
self.fileobj.write(struct.pack("<L", self.crc & 0xffffffffL))
|
||||
self.fileobj.write(struct.pack("<L", self.pos & 0xffffFFFFL))
|
||||
self.fileobj.write(struct.pack("<L", self.crc & 0xffffffff))
|
||||
self.fileobj.write(struct.pack("<L", self.pos & 0xffffFFFF))
|
||||
|
||||
if not self._extfileobj:
|
||||
self.fileobj.close()
|
||||
|
@ -1076,7 +1076,7 @@ class TarFile(object):
|
|||
self.closed = False
|
||||
self.members = [] # list of members as TarInfo objects
|
||||
self._loaded = False # flag if all members have been read
|
||||
self.offset = 0L # current position in the archive file
|
||||
self.offset = 0 # current position in the archive file
|
||||
self.inodes = {} # dictionary caching the inodes of
|
||||
# archive members already added
|
||||
|
||||
|
@ -1378,7 +1378,7 @@ class TarFile(object):
|
|||
if stat.S_ISREG(stmd):
|
||||
tarinfo.size = statres.st_size
|
||||
else:
|
||||
tarinfo.size = 0L
|
||||
tarinfo.size = 0
|
||||
tarinfo.mtime = statres.st_mtime
|
||||
tarinfo.type = type
|
||||
tarinfo.linkname = linkname
|
||||
|
@ -1924,8 +1924,8 @@ class TarFile(object):
|
|||
buf = tarinfo.buf
|
||||
sp = _ringbuffer()
|
||||
pos = 386
|
||||
lastpos = 0L
|
||||
realpos = 0L
|
||||
lastpos = 0
|
||||
realpos = 0
|
||||
# There are 4 possible sparse structs in the
|
||||
# first header.
|
||||
for i in xrange(4):
|
||||
|
|
|
@ -99,16 +99,16 @@ class CommonTest(seq_tests.CommonTest):
|
|||
self.assertRaises(TypeError, a.__setitem__)
|
||||
|
||||
a = self.type2test([0,1,2,3,4])
|
||||
a[0L] = 1
|
||||
a[1L] = 2
|
||||
a[2L] = 3
|
||||
a[0] = 1
|
||||
a[1] = 2
|
||||
a[2] = 3
|
||||
self.assertEqual(a, self.type2test([1,2,3,3,4]))
|
||||
a[0] = 5
|
||||
a[1] = 6
|
||||
a[2] = 7
|
||||
self.assertEqual(a, self.type2test([5,6,7,3,4]))
|
||||
a[-2L] = 88
|
||||
a[-1L] = 99
|
||||
a[-2] = 88
|
||||
a[-1] = 99
|
||||
self.assertEqual(a, self.type2test([5,6,7,88,99]))
|
||||
a[-2] = 8
|
||||
a[-1] = 9
|
||||
|
@ -189,8 +189,8 @@ class CommonTest(seq_tests.CommonTest):
|
|||
self.assertEqual(a, self.type2test([]))
|
||||
|
||||
a = self.type2test([0, 1])
|
||||
del a[1L:2L]
|
||||
del a[0L:1L]
|
||||
del a[1:2]
|
||||
del a[0:1]
|
||||
self.assertEqual(a, self.type2test([]))
|
||||
|
||||
a = self.type2test([0, 1])
|
||||
|
@ -198,7 +198,7 @@ class CommonTest(seq_tests.CommonTest):
|
|||
self.assertEqual(a, self.type2test([1]))
|
||||
|
||||
a = self.type2test([0, 1])
|
||||
del a[-2L:-1L]
|
||||
del a[-2:-1]
|
||||
self.assertEqual(a, self.type2test([1]))
|
||||
|
||||
a = self.type2test([0, 1])
|
||||
|
@ -207,8 +207,8 @@ class CommonTest(seq_tests.CommonTest):
|
|||
self.assertEqual(a, self.type2test([]))
|
||||
|
||||
a = self.type2test([0, 1])
|
||||
del a[1L:]
|
||||
del a[:1L]
|
||||
del a[1:]
|
||||
del a[:1]
|
||||
self.assertEqual(a, self.type2test([]))
|
||||
|
||||
a = self.type2test([0, 1])
|
||||
|
@ -216,7 +216,7 @@ class CommonTest(seq_tests.CommonTest):
|
|||
self.assertEqual(a, self.type2test([0]))
|
||||
|
||||
a = self.type2test([0, 1])
|
||||
del a[-1L:]
|
||||
del a[-1:]
|
||||
self.assertEqual(a, self.type2test([0]))
|
||||
|
||||
a = self.type2test([0, 1])
|
||||
|
|
|
@ -526,7 +526,7 @@ class TestMappingProtocol(BasicTestMappingProtocol):
|
|||
|
||||
# verify longs/ints get same value when key > 32 bits (for 64-bit archs)
|
||||
# see SF bug #689659
|
||||
x = 4503599627370496L
|
||||
x = 4503599627370496
|
||||
y = 4503599627370496
|
||||
h = self._full_mapping({x: 'anything', y: 'something else'})
|
||||
self.assertEqual(h[x], h[y])
|
||||
|
@ -626,7 +626,7 @@ class TestHashMappingProtocol(TestMappingProtocol):
|
|||
def test_eq(self):
|
||||
self.assertEqual(self._empty_mapping(), self._empty_mapping())
|
||||
self.assertEqual(self._full_mapping({1: 2}),
|
||||
self._full_mapping({1L: 2L}))
|
||||
self._full_mapping({1: 2}))
|
||||
|
||||
class Exc(Exception): pass
|
||||
|
||||
|
|
|
@ -349,7 +349,7 @@ def create_data():
|
|||
c = C()
|
||||
c.foo = 1
|
||||
c.bar = 2
|
||||
x = [0, 1L, 2.0, 3.0+0j]
|
||||
x = [0, 1, 2.0, 3.0+0j]
|
||||
# Append some integer test cases at cPickle.c's internal size
|
||||
# cutoffs.
|
||||
uint1max = 0xff
|
||||
|
@ -504,7 +504,7 @@ class AbstractPickleTests(unittest.TestCase):
|
|||
n = n >> 1
|
||||
|
||||
def test_maxint64(self):
|
||||
maxint64 = (1L << 63) - 1
|
||||
maxint64 = (1 << 63) - 1
|
||||
data = 'I' + str(maxint64) + '\n.'
|
||||
got = self.loads(data)
|
||||
self.assertEqual(got, maxint64)
|
||||
|
@ -517,7 +517,7 @@ class AbstractPickleTests(unittest.TestCase):
|
|||
for proto in protocols:
|
||||
# 256 bytes is where LONG4 begins.
|
||||
for nbits in 1, 8, 8*254, 8*255, 8*256, 8*257:
|
||||
nbase = 1L << nbits
|
||||
nbase = 1 << nbits
|
||||
for npos in nbase-1, nbase, nbase+1:
|
||||
for n in npos, -npos:
|
||||
pickle = self.dumps(n, proto)
|
||||
|
@ -525,7 +525,7 @@ class AbstractPickleTests(unittest.TestCase):
|
|||
self.assertEqual(n, got)
|
||||
# Try a monster. This is quadratic-time in protos 0 & 1, so don't
|
||||
# bother with those.
|
||||
nbase = long("deadbeeffeedface", 16)
|
||||
nbase = int("deadbeeffeedface", 16)
|
||||
nbase += nbase << 1000000
|
||||
for n in nbase, -nbase:
|
||||
p = self.dumps(n, 2)
|
||||
|
@ -592,7 +592,7 @@ class AbstractPickleTests(unittest.TestCase):
|
|||
self.fail("expected bad protocol number to raise ValueError")
|
||||
|
||||
def test_long1(self):
|
||||
x = 12345678910111213141516178920L
|
||||
x = 12345678910111213141516178920
|
||||
for proto in protocols:
|
||||
s = self.dumps(x, proto)
|
||||
y = self.loads(s)
|
||||
|
@ -600,7 +600,7 @@ class AbstractPickleTests(unittest.TestCase):
|
|||
self.assertEqual(opcode_in_pickle(pickle.LONG1, s), proto >= 2)
|
||||
|
||||
def test_long4(self):
|
||||
x = 12345678910111213141516178920L << (256*8)
|
||||
x = 12345678910111213141516178920 << (256*8)
|
||||
for proto in protocols:
|
||||
s = self.dumps(x, proto)
|
||||
y = self.loads(s)
|
||||
|
@ -864,8 +864,8 @@ class REX_three(object):
|
|||
class MyInt(int):
|
||||
sample = 1
|
||||
|
||||
class MyLong(long):
|
||||
sample = 1L
|
||||
class MyLong(int):
|
||||
sample = 1
|
||||
|
||||
class MyFloat(float):
|
||||
sample = 1.0
|
||||
|
|
|
@ -1324,7 +1324,7 @@ class _ExpectedSkips:
|
|||
if test_timeout.skip_expected:
|
||||
self.expected.add('test_timeout')
|
||||
|
||||
if sys.maxint == 9223372036854775807L:
|
||||
if sys.maxint == 9223372036854775807:
|
||||
self.expected.add('test_rgbimg')
|
||||
self.expected.add('test_imageop')
|
||||
|
||||
|
|
|
@ -138,10 +138,10 @@ class CommonTest(unittest.TestCase):
|
|||
u = self.type2test([0, 1, 2, 3, 4])
|
||||
for i in xrange(len(u)):
|
||||
self.assertEqual(u[i], i)
|
||||
self.assertEqual(u[long(i)], i)
|
||||
self.assertEqual(u[int(i)], i)
|
||||
for i in xrange(-len(u), -1):
|
||||
self.assertEqual(u[i], len(u)+i)
|
||||
self.assertEqual(u[long(i)], len(u)+i)
|
||||
self.assertEqual(u[int(i)], len(u)+i)
|
||||
self.assertRaises(IndexError, u.__getitem__, -len(u)-1)
|
||||
self.assertRaises(IndexError, u.__getitem__, len(u))
|
||||
self.assertRaises(ValueError, u.__getitem__, slice(0,10,0))
|
||||
|
@ -189,12 +189,12 @@ class CommonTest(unittest.TestCase):
|
|||
self.assertEqual(u[-100:100:], u)
|
||||
self.assertEqual(u[100:-100:-1], u[::-1])
|
||||
self.assertEqual(u[-100:100:-1], self.type2test([]))
|
||||
self.assertEqual(u[-100L:100L:2L], self.type2test([0, 2, 4]))
|
||||
self.assertEqual(u[-100:100:2], self.type2test([0, 2, 4]))
|
||||
|
||||
# Test extreme cases with long ints
|
||||
a = self.type2test([0,1,2,3,4])
|
||||
self.assertEqual(a[ -pow(2,128L): 3 ], self.type2test([0,1,2]))
|
||||
self.assertEqual(a[ 3: pow(2,145L) ], self.type2test([3,4]))
|
||||
self.assertEqual(a[ -pow(2,128): 3 ], self.type2test([0,1,2]))
|
||||
self.assertEqual(a[ 3: pow(2,145) ], self.type2test([3,4]))
|
||||
|
||||
self.assertRaises(TypeError, u.__getslice__)
|
||||
|
||||
|
@ -254,16 +254,16 @@ class CommonTest(unittest.TestCase):
|
|||
self.assertEqual(self.type2test([-1]) + u1, self.type2test([-1, 0]))
|
||||
self.assertEqual(self.type2test(), u2*0)
|
||||
self.assertEqual(self.type2test(), 0*u2)
|
||||
self.assertEqual(self.type2test(), u2*0L)
|
||||
self.assertEqual(self.type2test(), 0L*u2)
|
||||
self.assertEqual(self.type2test(), u2*0)
|
||||
self.assertEqual(self.type2test(), 0*u2)
|
||||
self.assertEqual(u2, u2*1)
|
||||
self.assertEqual(u2, 1*u2)
|
||||
self.assertEqual(u2, u2*1)
|
||||
self.assertEqual(u2, 1*u2)
|
||||
self.assertEqual(u2, u2*1L)
|
||||
self.assertEqual(u2, 1L*u2)
|
||||
self.assertEqual(u2+u2, u2*2)
|
||||
self.assertEqual(u2+u2, 2*u2)
|
||||
self.assertEqual(u2+u2, u2*2L)
|
||||
self.assertEqual(u2+u2, 2L*u2)
|
||||
self.assertEqual(u2+u2, u2*2)
|
||||
self.assertEqual(u2+u2, 2*u2)
|
||||
self.assertEqual(u2+u2+u2, u2*3)
|
||||
self.assertEqual(u2+u2+u2, 3*u2)
|
||||
|
||||
|
@ -308,10 +308,10 @@ class CommonTest(unittest.TestCase):
|
|||
|
||||
def test_subscript(self):
|
||||
a = self.type2test([10, 11])
|
||||
self.assertEqual(a.__getitem__(0L), 10)
|
||||
self.assertEqual(a.__getitem__(1L), 11)
|
||||
self.assertEqual(a.__getitem__(-2L), 10)
|
||||
self.assertEqual(a.__getitem__(-1L), 11)
|
||||
self.assertEqual(a.__getitem__(0), 10)
|
||||
self.assertEqual(a.__getitem__(1), 11)
|
||||
self.assertEqual(a.__getitem__(-2), 10)
|
||||
self.assertEqual(a.__getitem__(-1), 11)
|
||||
self.assertRaises(IndexError, a.__getitem__, -3)
|
||||
self.assertRaises(IndexError, a.__getitem__, 3)
|
||||
self.assertEqual(a.__getitem__(slice(0,1)), self.type2test([10]))
|
||||
|
|
|
@ -12,7 +12,7 @@ class Sequence:
|
|||
def __getitem__(self, i): return self.seq[i]
|
||||
|
||||
class BadSeq1(Sequence):
|
||||
def __init__(self): self.seq = [7, 'hello', 123L]
|
||||
def __init__(self): self.seq = [7, 'hello', 123]
|
||||
|
||||
class BadSeq2(Sequence):
|
||||
def __init__(self): self.seq = ['a', 'b', 'c']
|
||||
|
@ -902,7 +902,7 @@ class MixinStrUnicodeUserStringTest:
|
|||
def test_subscript(self):
|
||||
self.checkequal(u'a', 'abc', '__getitem__', 0)
|
||||
self.checkequal(u'c', 'abc', '__getitem__', -1)
|
||||
self.checkequal(u'a', 'abc', '__getitem__', 0L)
|
||||
self.checkequal(u'a', 'abc', '__getitem__', 0)
|
||||
self.checkequal(u'abc', 'abc', '__getitem__', slice(0, 3))
|
||||
self.checkequal(u'abc', 'abc', '__getitem__', slice(0, 1000))
|
||||
self.checkequal(u'a', 'abc', '__getitem__', slice(0, 1))
|
||||
|
@ -965,7 +965,7 @@ class MixinStrUnicodeUserStringTest:
|
|||
|
||||
self.checkraises(TypeError, ' ', 'join')
|
||||
self.checkraises(TypeError, ' ', 'join', 7)
|
||||
self.checkraises(TypeError, ' ', 'join', Sequence([7, 'hello', 123L]))
|
||||
self.checkraises(TypeError, ' ', 'join', Sequence([7, 'hello', 123]))
|
||||
try:
|
||||
def f():
|
||||
yield 4 + ""
|
||||
|
|
|
@ -61,7 +61,7 @@ class BaseTest(unittest.TestCase):
|
|||
bi = a.buffer_info()
|
||||
self.assert_(isinstance(bi, tuple))
|
||||
self.assertEqual(len(bi), 2)
|
||||
self.assert_(isinstance(bi[0], (int, long)))
|
||||
self.assert_(isinstance(bi[0], (int, int)))
|
||||
self.assert_(isinstance(bi[1], int))
|
||||
self.assertEqual(bi[1], len(a))
|
||||
|
||||
|
@ -323,9 +323,9 @@ class BaseTest(unittest.TestCase):
|
|||
def test_getitem(self):
|
||||
a = array.array(self.typecode, self.example)
|
||||
self.assertEntryEqual(a[0], self.example[0])
|
||||
self.assertEntryEqual(a[0L], self.example[0])
|
||||
self.assertEntryEqual(a[0], self.example[0])
|
||||
self.assertEntryEqual(a[-1], self.example[-1])
|
||||
self.assertEntryEqual(a[-1], self.example[-1])
|
||||
self.assertEntryEqual(a[-1L], self.example[-1])
|
||||
self.assertEntryEqual(a[len(self.example)-1], self.example[-1])
|
||||
self.assertEntryEqual(a[-len(self.example)], self.example[0])
|
||||
self.assertRaises(TypeError, a.__getitem__)
|
||||
|
@ -338,7 +338,7 @@ class BaseTest(unittest.TestCase):
|
|||
self.assertEntryEqual(a[0], a[-1])
|
||||
|
||||
a = array.array(self.typecode, self.example)
|
||||
a[0L] = a[-1]
|
||||
a[0] = a[-1]
|
||||
self.assertEntryEqual(a[0], a[-1])
|
||||
|
||||
a = array.array(self.typecode, self.example)
|
||||
|
@ -346,7 +346,7 @@ class BaseTest(unittest.TestCase):
|
|||
self.assertEntryEqual(a[0], a[-1])
|
||||
|
||||
a = array.array(self.typecode, self.example)
|
||||
a[-1L] = a[0]
|
||||
a[-1] = a[0]
|
||||
self.assertEntryEqual(a[0], a[-1])
|
||||
|
||||
a = array.array(self.typecode, self.example)
|
||||
|
@ -777,7 +777,7 @@ class NumberTest(BaseTest):
|
|||
self.assertEqual(a[3::-2], array.array(self.typecode, [3,1]))
|
||||
self.assertEqual(a[-100:100:], a)
|
||||
self.assertEqual(a[100:-100:-1], a[::-1])
|
||||
self.assertEqual(a[-100L:100L:2L], array.array(self.typecode, [0,2,4]))
|
||||
self.assertEqual(a[-100:100:2], array.array(self.typecode, [0,2,4]))
|
||||
self.assertEqual(a[1000:2000:2], array.array(self.typecode, []))
|
||||
self.assertEqual(a[-1000:-2000:-2], array.array(self.typecode, []))
|
||||
|
||||
|
@ -863,8 +863,8 @@ class SignedNumberTest(NumberTest):
|
|||
|
||||
def test_overflow(self):
|
||||
a = array.array(self.typecode)
|
||||
lower = -1 * long(pow(2, a.itemsize * 8 - 1))
|
||||
upper = long(pow(2, a.itemsize * 8 - 1)) - 1L
|
||||
lower = -1 * int(pow(2, a.itemsize * 8 - 1))
|
||||
upper = int(pow(2, a.itemsize * 8 - 1)) - 1
|
||||
self.check_overflow(lower, upper)
|
||||
|
||||
class UnsignedNumberTest(NumberTest):
|
||||
|
@ -876,7 +876,7 @@ class UnsignedNumberTest(NumberTest):
|
|||
def test_overflow(self):
|
||||
a = array.array(self.typecode)
|
||||
lower = 0
|
||||
upper = long(pow(2, a.itemsize * 8)) - 1L
|
||||
upper = int(pow(2, a.itemsize * 8)) - 1
|
||||
self.check_overflow(lower, upper)
|
||||
|
||||
|
||||
|
|
|
@ -2,7 +2,7 @@ import sys, itertools
|
|||
import _ast
|
||||
|
||||
def to_tuple(t):
|
||||
if t is None or isinstance(t, (basestring, int, long, complex)):
|
||||
if t is None or isinstance(t, (basestring, int, int, complex)):
|
||||
return t
|
||||
elif isinstance(t, list):
|
||||
return [to_tuple(e) for e in t]
|
||||
|
@ -93,7 +93,7 @@ eval_tests = [
|
|||
# Call
|
||||
"f(1,2,c=3,*d,**e)",
|
||||
# Num
|
||||
"10L",
|
||||
"10",
|
||||
# Str
|
||||
"'string'",
|
||||
# Attribute
|
||||
|
|
|
@ -77,7 +77,7 @@ class TestAsynchat(unittest.TestCase):
|
|||
s = echo_server()
|
||||
s.start()
|
||||
time.sleep(1) # Give server time to initialize
|
||||
c = echo_client(6L)
|
||||
c = echo_client(6)
|
||||
c.push("hello ")
|
||||
c.push("world\n")
|
||||
asyncore.loop()
|
||||
|
|
|
@ -866,13 +866,13 @@ class ListTest(unittest.TestCase):
|
|||
|
||||
@bigmemtest(minsize=_2G // 5 + 2, memuse=8 * 5)
|
||||
def test_index(self, size):
|
||||
l = [1L, 2L, 3L, 4L, 5L] * size
|
||||
l = [1, 2, 3, 4, 5] * size
|
||||
size *= 5
|
||||
self.assertEquals(l.index(1), 0)
|
||||
self.assertEquals(l.index(5, size - 5), size - 1)
|
||||
self.assertEquals(l.index(5, size - 5, size), size - 1)
|
||||
self.assertRaises(ValueError, l.index, 1, size - 4, size)
|
||||
self.assertRaises(ValueError, l.index, 6L)
|
||||
self.assertRaises(ValueError, l.index, 6)
|
||||
|
||||
# This tests suffers from overallocation, just like test_append.
|
||||
@bigmemtest(minsize=_2G + 10, memuse=9)
|
||||
|
|
|
@ -11,11 +11,11 @@ def gcd(a, b):
|
|||
|
||||
def isint(x):
|
||||
"""Test whether an object is an instance of int or long."""
|
||||
return isinstance(x, int) or isinstance(x, long)
|
||||
return isinstance(x, int) or isinstance(x, int)
|
||||
|
||||
def isnum(x):
|
||||
"""Test whether an object is an instance of a built-in numeric type."""
|
||||
for T in int, long, float, complex:
|
||||
for T in int, int, float, complex:
|
||||
if isinstance(x, T):
|
||||
return 1
|
||||
return 0
|
||||
|
@ -30,7 +30,7 @@ class Rat(object):
|
|||
|
||||
__slots__ = ['_Rat__num', '_Rat__den']
|
||||
|
||||
def __init__(self, num=0L, den=1L):
|
||||
def __init__(self, num=0, den=1):
|
||||
"""Constructor: Rat([num[, den]]).
|
||||
|
||||
The arguments must be ints or longs, and default to (0, 1)."""
|
||||
|
@ -42,8 +42,8 @@ class Rat(object):
|
|||
if den == 0:
|
||||
raise ZeroDivisionError, "zero denominator"
|
||||
g = gcd(den, num)
|
||||
self.__num = long(num//g)
|
||||
self.__den = long(den//g)
|
||||
self.__num = int(num//g)
|
||||
self.__den = int(den//g)
|
||||
|
||||
def _get_num(self):
|
||||
"""Accessor function for read-only 'num' attribute of Rat."""
|
||||
|
@ -80,7 +80,7 @@ class Rat(object):
|
|||
def __long__(self):
|
||||
"""Convert a Rat to an long; self.den must be 1."""
|
||||
if self.__den == 1:
|
||||
return long(self.__num)
|
||||
return int(self.__num)
|
||||
raise ValueError, "can't convert %s to long" % repr(self)
|
||||
|
||||
def __add__(self, other):
|
||||
|
@ -225,7 +225,7 @@ class RatTestCase(unittest.TestCase):
|
|||
a = Rat(10, 15)
|
||||
self.assertEqual(a.num, 2)
|
||||
self.assertEqual(a.den, 3)
|
||||
a = Rat(10L, 15L)
|
||||
a = Rat(10, 15)
|
||||
self.assertEqual(a.num, 2)
|
||||
self.assertEqual(a.den, 3)
|
||||
a = Rat(10, -15)
|
||||
|
|
|
@ -122,9 +122,9 @@ class BuiltinTest(unittest.TestCase):
|
|||
self.assertEqual(abs(3.14), 3.14)
|
||||
self.assertEqual(abs(-3.14), 3.14)
|
||||
# long
|
||||
self.assertEqual(abs(0L), 0L)
|
||||
self.assertEqual(abs(1234L), 1234L)
|
||||
self.assertEqual(abs(-1234L), 1234L)
|
||||
self.assertEqual(abs(0), 0)
|
||||
self.assertEqual(abs(1234), 1234)
|
||||
self.assertEqual(abs(-1234), 1234)
|
||||
# str
|
||||
self.assertRaises(TypeError, abs, 'a')
|
||||
|
||||
|
@ -235,15 +235,15 @@ class BuiltinTest(unittest.TestCase):
|
|||
self.assertEqual(divmod(12, -7), (-2, -2))
|
||||
self.assertEqual(divmod(-12, -7), (1, -5))
|
||||
|
||||
self.assertEqual(divmod(12L, 7L), (1L, 5L))
|
||||
self.assertEqual(divmod(-12L, 7L), (-2L, 2L))
|
||||
self.assertEqual(divmod(12L, -7L), (-2L, -2L))
|
||||
self.assertEqual(divmod(-12L, -7L), (1L, -5L))
|
||||
self.assertEqual(divmod(12, 7), (1, 5))
|
||||
self.assertEqual(divmod(-12, 7), (-2, 2))
|
||||
self.assertEqual(divmod(12, -7), (-2, -2))
|
||||
self.assertEqual(divmod(-12, -7), (1, -5))
|
||||
|
||||
self.assertEqual(divmod(12, 7L), (1, 5L))
|
||||
self.assertEqual(divmod(-12, 7L), (-2, 2L))
|
||||
self.assertEqual(divmod(12L, -7), (-2L, -2))
|
||||
self.assertEqual(divmod(-12L, -7), (1L, -5))
|
||||
self.assertEqual(divmod(12, 7), (1, 5))
|
||||
self.assertEqual(divmod(-12, 7), (-2, 2))
|
||||
self.assertEqual(divmod(12, -7), (-2, -2))
|
||||
self.assertEqual(divmod(-12, -7), (1, -5))
|
||||
|
||||
self.assertEqual(divmod(-sys.maxint-1, -1),
|
||||
(sys.maxint+1, 0))
|
||||
|
@ -538,7 +538,7 @@ class BuiltinTest(unittest.TestCase):
|
|||
def test_float(self):
|
||||
self.assertEqual(float(3.14), 3.14)
|
||||
self.assertEqual(float(314), 314.0)
|
||||
self.assertEqual(float(314L), 314.0)
|
||||
self.assertEqual(float(314), 314.0)
|
||||
self.assertEqual(float(" 3.14 "), 3.14)
|
||||
self.assertRaises(ValueError, float, " 0x3.1 ")
|
||||
self.assertRaises(ValueError, float, " -0x3.p-1 ")
|
||||
|
@ -624,7 +624,7 @@ class BuiltinTest(unittest.TestCase):
|
|||
|
||||
def test_hash(self):
|
||||
hash(None)
|
||||
self.assertEqual(hash(1), hash(1L))
|
||||
self.assertEqual(hash(1), hash(1))
|
||||
self.assertEqual(hash(1), hash(1.0))
|
||||
hash('spam')
|
||||
if have_unicode:
|
||||
|
@ -642,22 +642,22 @@ class BuiltinTest(unittest.TestCase):
|
|||
def __hash__(self):
|
||||
return 2**100
|
||||
self.assertEquals(type(hash(Y())), int)
|
||||
class Z(long):
|
||||
class Z(int):
|
||||
def __hash__(self):
|
||||
return self
|
||||
self.assertEquals(hash(Z(42)), hash(42L))
|
||||
self.assertEquals(hash(Z(42)), hash(42))
|
||||
|
||||
def test_hex(self):
|
||||
self.assertEqual(hex(16), '0x10')
|
||||
self.assertEqual(hex(16L), '0x10')
|
||||
self.assertEqual(hex(16), '0x10')
|
||||
self.assertEqual(hex(-16), '-0x10')
|
||||
self.assertEqual(hex(-16), '-0x10')
|
||||
self.assertEqual(hex(-16L), '-0x10')
|
||||
self.assertRaises(TypeError, hex, {})
|
||||
|
||||
def test_id(self):
|
||||
id(None)
|
||||
id(1)
|
||||
id(1L)
|
||||
id(1)
|
||||
id(1.0)
|
||||
id('spam')
|
||||
id((0,1,2,3))
|
||||
|
@ -667,7 +667,7 @@ class BuiltinTest(unittest.TestCase):
|
|||
def test_int(self):
|
||||
self.assertEqual(int(314), 314)
|
||||
self.assertEqual(int(3.14), 3)
|
||||
self.assertEqual(int(314L), 314)
|
||||
self.assertEqual(int(314), 314)
|
||||
# Check that conversion from float truncates towards zero
|
||||
self.assertEqual(int(-3.14), -3)
|
||||
self.assertEqual(int(3.9), 3)
|
||||
|
@ -675,9 +675,9 @@ class BuiltinTest(unittest.TestCase):
|
|||
self.assertEqual(int(3.5), 3)
|
||||
self.assertEqual(int(-3.5), -3)
|
||||
# Different base:
|
||||
self.assertEqual(int("10",16), 16L)
|
||||
self.assertEqual(int("10",16), 16)
|
||||
if have_unicode:
|
||||
self.assertEqual(int(unicode("10"),16), 16L)
|
||||
self.assertEqual(int(unicode("10"),16), 16)
|
||||
# Test conversion from strings and various anomalies
|
||||
for s, v in L:
|
||||
for sign in "", "+", "-":
|
||||
|
@ -700,9 +700,9 @@ class BuiltinTest(unittest.TestCase):
|
|||
|
||||
# should return long
|
||||
x = int(1e100)
|
||||
self.assert_(isinstance(x, long))
|
||||
self.assert_(isinstance(x, int))
|
||||
x = int(-1e100)
|
||||
self.assert_(isinstance(x, long))
|
||||
self.assert_(isinstance(x, int))
|
||||
|
||||
|
||||
# SF bug 434186: 0x80000000/2 != 0x80000000>>1.
|
||||
|
@ -720,11 +720,11 @@ class BuiltinTest(unittest.TestCase):
|
|||
self.assertRaises(ValueError, int, '123\x00 245', 20)
|
||||
|
||||
x = int('1' * 600)
|
||||
self.assert_(isinstance(x, long))
|
||||
self.assert_(isinstance(x, int))
|
||||
|
||||
if have_unicode:
|
||||
x = int(unichr(0x661) * 600)
|
||||
self.assert_(isinstance(x, long))
|
||||
self.assert_(isinstance(x, int))
|
||||
|
||||
self.assertRaises(TypeError, int, 1, 12)
|
||||
|
||||
|
@ -735,79 +735,79 @@ class BuiltinTest(unittest.TestCase):
|
|||
# Various representations of 2**32 evaluated to 0
|
||||
# rather than 2**32 in previous versions
|
||||
|
||||
self.assertEqual(int('100000000000000000000000000000000', 2), 4294967296L)
|
||||
self.assertEqual(int('102002022201221111211', 3), 4294967296L)
|
||||
self.assertEqual(int('10000000000000000', 4), 4294967296L)
|
||||
self.assertEqual(int('32244002423141', 5), 4294967296L)
|
||||
self.assertEqual(int('1550104015504', 6), 4294967296L)
|
||||
self.assertEqual(int('211301422354', 7), 4294967296L)
|
||||
self.assertEqual(int('40000000000', 8), 4294967296L)
|
||||
self.assertEqual(int('12068657454', 9), 4294967296L)
|
||||
self.assertEqual(int('4294967296', 10), 4294967296L)
|
||||
self.assertEqual(int('1904440554', 11), 4294967296L)
|
||||
self.assertEqual(int('9ba461594', 12), 4294967296L)
|
||||
self.assertEqual(int('535a79889', 13), 4294967296L)
|
||||
self.assertEqual(int('2ca5b7464', 14), 4294967296L)
|
||||
self.assertEqual(int('1a20dcd81', 15), 4294967296L)
|
||||
self.assertEqual(int('100000000', 16), 4294967296L)
|
||||
self.assertEqual(int('a7ffda91', 17), 4294967296L)
|
||||
self.assertEqual(int('704he7g4', 18), 4294967296L)
|
||||
self.assertEqual(int('4f5aff66', 19), 4294967296L)
|
||||
self.assertEqual(int('3723ai4g', 20), 4294967296L)
|
||||
self.assertEqual(int('281d55i4', 21), 4294967296L)
|
||||
self.assertEqual(int('1fj8b184', 22), 4294967296L)
|
||||
self.assertEqual(int('1606k7ic', 23), 4294967296L)
|
||||
self.assertEqual(int('mb994ag', 24), 4294967296L)
|
||||
self.assertEqual(int('hek2mgl', 25), 4294967296L)
|
||||
self.assertEqual(int('dnchbnm', 26), 4294967296L)
|
||||
self.assertEqual(int('b28jpdm', 27), 4294967296L)
|
||||
self.assertEqual(int('8pfgih4', 28), 4294967296L)
|
||||
self.assertEqual(int('76beigg', 29), 4294967296L)
|
||||
self.assertEqual(int('5qmcpqg', 30), 4294967296L)
|
||||
self.assertEqual(int('4q0jto4', 31), 4294967296L)
|
||||
self.assertEqual(int('4000000', 32), 4294967296L)
|
||||
self.assertEqual(int('3aokq94', 33), 4294967296L)
|
||||
self.assertEqual(int('2qhxjli', 34), 4294967296L)
|
||||
self.assertEqual(int('2br45qb', 35), 4294967296L)
|
||||
self.assertEqual(int('1z141z4', 36), 4294967296L)
|
||||
self.assertEqual(int('100000000000000000000000000000000', 2), 4294967296)
|
||||
self.assertEqual(int('102002022201221111211', 3), 4294967296)
|
||||
self.assertEqual(int('10000000000000000', 4), 4294967296)
|
||||
self.assertEqual(int('32244002423141', 5), 4294967296)
|
||||
self.assertEqual(int('1550104015504', 6), 4294967296)
|
||||
self.assertEqual(int('211301422354', 7), 4294967296)
|
||||
self.assertEqual(int('40000000000', 8), 4294967296)
|
||||
self.assertEqual(int('12068657454', 9), 4294967296)
|
||||
self.assertEqual(int('4294967296', 10), 4294967296)
|
||||
self.assertEqual(int('1904440554', 11), 4294967296)
|
||||
self.assertEqual(int('9ba461594', 12), 4294967296)
|
||||
self.assertEqual(int('535a79889', 13), 4294967296)
|
||||
self.assertEqual(int('2ca5b7464', 14), 4294967296)
|
||||
self.assertEqual(int('1a20dcd81', 15), 4294967296)
|
||||
self.assertEqual(int('100000000', 16), 4294967296)
|
||||
self.assertEqual(int('a7ffda91', 17), 4294967296)
|
||||
self.assertEqual(int('704he7g4', 18), 4294967296)
|
||||
self.assertEqual(int('4f5aff66', 19), 4294967296)
|
||||
self.assertEqual(int('3723ai4g', 20), 4294967296)
|
||||
self.assertEqual(int('281d55i4', 21), 4294967296)
|
||||
self.assertEqual(int('1fj8b184', 22), 4294967296)
|
||||
self.assertEqual(int('1606k7ic', 23), 4294967296)
|
||||
self.assertEqual(int('mb994ag', 24), 4294967296)
|
||||
self.assertEqual(int('hek2mgl', 25), 4294967296)
|
||||
self.assertEqual(int('dnchbnm', 26), 4294967296)
|
||||
self.assertEqual(int('b28jpdm', 27), 4294967296)
|
||||
self.assertEqual(int('8pfgih4', 28), 4294967296)
|
||||
self.assertEqual(int('76beigg', 29), 4294967296)
|
||||
self.assertEqual(int('5qmcpqg', 30), 4294967296)
|
||||
self.assertEqual(int('4q0jto4', 31), 4294967296)
|
||||
self.assertEqual(int('4000000', 32), 4294967296)
|
||||
self.assertEqual(int('3aokq94', 33), 4294967296)
|
||||
self.assertEqual(int('2qhxjli', 34), 4294967296)
|
||||
self.assertEqual(int('2br45qb', 35), 4294967296)
|
||||
self.assertEqual(int('1z141z4', 36), 4294967296)
|
||||
|
||||
# SF bug 1334662: int(string, base) wrong answers
|
||||
# Checks for proper evaluation of 2**32 + 1
|
||||
self.assertEqual(int('100000000000000000000000000000001', 2), 4294967297L)
|
||||
self.assertEqual(int('102002022201221111212', 3), 4294967297L)
|
||||
self.assertEqual(int('10000000000000001', 4), 4294967297L)
|
||||
self.assertEqual(int('32244002423142', 5), 4294967297L)
|
||||
self.assertEqual(int('1550104015505', 6), 4294967297L)
|
||||
self.assertEqual(int('211301422355', 7), 4294967297L)
|
||||
self.assertEqual(int('40000000001', 8), 4294967297L)
|
||||
self.assertEqual(int('12068657455', 9), 4294967297L)
|
||||
self.assertEqual(int('4294967297', 10), 4294967297L)
|
||||
self.assertEqual(int('1904440555', 11), 4294967297L)
|
||||
self.assertEqual(int('9ba461595', 12), 4294967297L)
|
||||
self.assertEqual(int('535a7988a', 13), 4294967297L)
|
||||
self.assertEqual(int('2ca5b7465', 14), 4294967297L)
|
||||
self.assertEqual(int('1a20dcd82', 15), 4294967297L)
|
||||
self.assertEqual(int('100000001', 16), 4294967297L)
|
||||
self.assertEqual(int('a7ffda92', 17), 4294967297L)
|
||||
self.assertEqual(int('704he7g5', 18), 4294967297L)
|
||||
self.assertEqual(int('4f5aff67', 19), 4294967297L)
|
||||
self.assertEqual(int('3723ai4h', 20), 4294967297L)
|
||||
self.assertEqual(int('281d55i5', 21), 4294967297L)
|
||||
self.assertEqual(int('1fj8b185', 22), 4294967297L)
|
||||
self.assertEqual(int('1606k7id', 23), 4294967297L)
|
||||
self.assertEqual(int('mb994ah', 24), 4294967297L)
|
||||
self.assertEqual(int('hek2mgm', 25), 4294967297L)
|
||||
self.assertEqual(int('dnchbnn', 26), 4294967297L)
|
||||
self.assertEqual(int('b28jpdn', 27), 4294967297L)
|
||||
self.assertEqual(int('8pfgih5', 28), 4294967297L)
|
||||
self.assertEqual(int('76beigh', 29), 4294967297L)
|
||||
self.assertEqual(int('5qmcpqh', 30), 4294967297L)
|
||||
self.assertEqual(int('4q0jto5', 31), 4294967297L)
|
||||
self.assertEqual(int('4000001', 32), 4294967297L)
|
||||
self.assertEqual(int('3aokq95', 33), 4294967297L)
|
||||
self.assertEqual(int('2qhxjlj', 34), 4294967297L)
|
||||
self.assertEqual(int('2br45qc', 35), 4294967297L)
|
||||
self.assertEqual(int('1z141z5', 36), 4294967297L)
|
||||
self.assertEqual(int('100000000000000000000000000000001', 2), 4294967297)
|
||||
self.assertEqual(int('102002022201221111212', 3), 4294967297)
|
||||
self.assertEqual(int('10000000000000001', 4), 4294967297)
|
||||
self.assertEqual(int('32244002423142', 5), 4294967297)
|
||||
self.assertEqual(int('1550104015505', 6), 4294967297)
|
||||
self.assertEqual(int('211301422355', 7), 4294967297)
|
||||
self.assertEqual(int('40000000001', 8), 4294967297)
|
||||
self.assertEqual(int('12068657455', 9), 4294967297)
|
||||
self.assertEqual(int('4294967297', 10), 4294967297)
|
||||
self.assertEqual(int('1904440555', 11), 4294967297)
|
||||
self.assertEqual(int('9ba461595', 12), 4294967297)
|
||||
self.assertEqual(int('535a7988a', 13), 4294967297)
|
||||
self.assertEqual(int('2ca5b7465', 14), 4294967297)
|
||||
self.assertEqual(int('1a20dcd82', 15), 4294967297)
|
||||
self.assertEqual(int('100000001', 16), 4294967297)
|
||||
self.assertEqual(int('a7ffda92', 17), 4294967297)
|
||||
self.assertEqual(int('704he7g5', 18), 4294967297)
|
||||
self.assertEqual(int('4f5aff67', 19), 4294967297)
|
||||
self.assertEqual(int('3723ai4h', 20), 4294967297)
|
||||
self.assertEqual(int('281d55i5', 21), 4294967297)
|
||||
self.assertEqual(int('1fj8b185', 22), 4294967297)
|
||||
self.assertEqual(int('1606k7id', 23), 4294967297)
|
||||
self.assertEqual(int('mb994ah', 24), 4294967297)
|
||||
self.assertEqual(int('hek2mgm', 25), 4294967297)
|
||||
self.assertEqual(int('dnchbnn', 26), 4294967297)
|
||||
self.assertEqual(int('b28jpdn', 27), 4294967297)
|
||||
self.assertEqual(int('8pfgih5', 28), 4294967297)
|
||||
self.assertEqual(int('76beigh', 29), 4294967297)
|
||||
self.assertEqual(int('5qmcpqh', 30), 4294967297)
|
||||
self.assertEqual(int('4q0jto5', 31), 4294967297)
|
||||
self.assertEqual(int('4000001', 32), 4294967297)
|
||||
self.assertEqual(int('3aokq95', 33), 4294967297)
|
||||
self.assertEqual(int('2qhxjlj', 34), 4294967297)
|
||||
self.assertEqual(int('2br45qc', 35), 4294967297)
|
||||
self.assertEqual(int('1z141z5', 36), 4294967297)
|
||||
|
||||
def test_intconversion(self):
|
||||
# Test __int__()
|
||||
|
@ -829,7 +829,7 @@ class BuiltinTest(unittest.TestCase):
|
|||
|
||||
class Foo4(int):
|
||||
def __int__(self):
|
||||
return 42L
|
||||
return 42
|
||||
|
||||
class Foo5(int):
|
||||
def __int__(self):
|
||||
|
@ -839,7 +839,7 @@ class BuiltinTest(unittest.TestCase):
|
|||
self.assertEqual(int(Foo1()), 42)
|
||||
self.assertEqual(int(Foo2()), 42)
|
||||
self.assertEqual(int(Foo3()), 0)
|
||||
self.assertEqual(int(Foo4()), 42L)
|
||||
self.assertEqual(int(Foo4()), 42)
|
||||
self.assertRaises(TypeError, int, Foo5())
|
||||
|
||||
def test_iter(self):
|
||||
|
@ -935,32 +935,32 @@ class BuiltinTest(unittest.TestCase):
|
|||
self.assertEqual(x, [])
|
||||
|
||||
def test_long(self):
|
||||
self.assertEqual(long(314), 314L)
|
||||
self.assertEqual(long(3.14), 3L)
|
||||
self.assertEqual(long(314L), 314L)
|
||||
self.assertEqual(int(314), 314)
|
||||
self.assertEqual(int(3.14), 3)
|
||||
self.assertEqual(int(314), 314)
|
||||
# Check that conversion from float truncates towards zero
|
||||
self.assertEqual(long(-3.14), -3L)
|
||||
self.assertEqual(long(3.9), 3L)
|
||||
self.assertEqual(long(-3.9), -3L)
|
||||
self.assertEqual(long(3.5), 3L)
|
||||
self.assertEqual(long(-3.5), -3L)
|
||||
self.assertEqual(long("-3"), -3L)
|
||||
self.assertEqual(int(-3.14), -3)
|
||||
self.assertEqual(int(3.9), 3)
|
||||
self.assertEqual(int(-3.9), -3)
|
||||
self.assertEqual(int(3.5), 3)
|
||||
self.assertEqual(int(-3.5), -3)
|
||||
self.assertEqual(int("-3"), -3)
|
||||
if have_unicode:
|
||||
self.assertEqual(long(unicode("-3")), -3L)
|
||||
self.assertEqual(int(unicode("-3")), -3)
|
||||
# Different base:
|
||||
self.assertEqual(long("10",16), 16L)
|
||||
self.assertEqual(int("10",16), 16)
|
||||
if have_unicode:
|
||||
self.assertEqual(long(unicode("10"),16), 16L)
|
||||
self.assertEqual(int(unicode("10"),16), 16)
|
||||
# Check conversions from string (same test set as for int(), and then some)
|
||||
LL = [
|
||||
('1' + '0'*20, 10L**20),
|
||||
('1' + '0'*100, 10L**100)
|
||||
('1' + '0'*20, 10**20),
|
||||
('1' + '0'*100, 10**100)
|
||||
]
|
||||
L2 = L[:]
|
||||
if have_unicode:
|
||||
L2 += [
|
||||
(unicode('1') + unicode('0')*20, 10L**20),
|
||||
(unicode('1') + unicode('0')*100, 10L**100),
|
||||
(unicode('1') + unicode('0')*20, 10**20),
|
||||
(unicode('1') + unicode('0')*100, 10**100),
|
||||
]
|
||||
for s, v in L2 + LL:
|
||||
for sign in "", "+", "-":
|
||||
|
@ -970,120 +970,120 @@ class BuiltinTest(unittest.TestCase):
|
|||
if sign == "-" and v is not ValueError:
|
||||
vv = -v
|
||||
try:
|
||||
self.assertEqual(long(ss), long(vv))
|
||||
self.assertEqual(int(ss), int(vv))
|
||||
except v:
|
||||
pass
|
||||
|
||||
self.assertRaises(ValueError, long, '123\0')
|
||||
self.assertRaises(ValueError, long, '53', 40)
|
||||
self.assertRaises(TypeError, long, 1, 12)
|
||||
self.assertRaises(ValueError, int, '123\0')
|
||||
self.assertRaises(ValueError, int, '53', 40)
|
||||
self.assertRaises(TypeError, int, 1, 12)
|
||||
|
||||
self.assertEqual(long('100000000000000000000000000000000', 2),
|
||||
self.assertEqual(int('100000000000000000000000000000000', 2),
|
||||
4294967296)
|
||||
self.assertEqual(long('102002022201221111211', 3), 4294967296)
|
||||
self.assertEqual(long('10000000000000000', 4), 4294967296)
|
||||
self.assertEqual(long('32244002423141', 5), 4294967296)
|
||||
self.assertEqual(long('1550104015504', 6), 4294967296)
|
||||
self.assertEqual(long('211301422354', 7), 4294967296)
|
||||
self.assertEqual(long('40000000000', 8), 4294967296)
|
||||
self.assertEqual(long('12068657454', 9), 4294967296)
|
||||
self.assertEqual(long('4294967296', 10), 4294967296)
|
||||
self.assertEqual(long('1904440554', 11), 4294967296)
|
||||
self.assertEqual(long('9ba461594', 12), 4294967296)
|
||||
self.assertEqual(long('535a79889', 13), 4294967296)
|
||||
self.assertEqual(long('2ca5b7464', 14), 4294967296)
|
||||
self.assertEqual(long('1a20dcd81', 15), 4294967296)
|
||||
self.assertEqual(long('100000000', 16), 4294967296)
|
||||
self.assertEqual(long('a7ffda91', 17), 4294967296)
|
||||
self.assertEqual(long('704he7g4', 18), 4294967296)
|
||||
self.assertEqual(long('4f5aff66', 19), 4294967296)
|
||||
self.assertEqual(long('3723ai4g', 20), 4294967296)
|
||||
self.assertEqual(long('281d55i4', 21), 4294967296)
|
||||
self.assertEqual(long('1fj8b184', 22), 4294967296)
|
||||
self.assertEqual(long('1606k7ic', 23), 4294967296)
|
||||
self.assertEqual(long('mb994ag', 24), 4294967296)
|
||||
self.assertEqual(long('hek2mgl', 25), 4294967296)
|
||||
self.assertEqual(long('dnchbnm', 26), 4294967296)
|
||||
self.assertEqual(long('b28jpdm', 27), 4294967296)
|
||||
self.assertEqual(long('8pfgih4', 28), 4294967296)
|
||||
self.assertEqual(long('76beigg', 29), 4294967296)
|
||||
self.assertEqual(long('5qmcpqg', 30), 4294967296)
|
||||
self.assertEqual(long('4q0jto4', 31), 4294967296)
|
||||
self.assertEqual(long('4000000', 32), 4294967296)
|
||||
self.assertEqual(long('3aokq94', 33), 4294967296)
|
||||
self.assertEqual(long('2qhxjli', 34), 4294967296)
|
||||
self.assertEqual(long('2br45qb', 35), 4294967296)
|
||||
self.assertEqual(long('1z141z4', 36), 4294967296)
|
||||
self.assertEqual(int('102002022201221111211', 3), 4294967296)
|
||||
self.assertEqual(int('10000000000000000', 4), 4294967296)
|
||||
self.assertEqual(int('32244002423141', 5), 4294967296)
|
||||
self.assertEqual(int('1550104015504', 6), 4294967296)
|
||||
self.assertEqual(int('211301422354', 7), 4294967296)
|
||||
self.assertEqual(int('40000000000', 8), 4294967296)
|
||||
self.assertEqual(int('12068657454', 9), 4294967296)
|
||||
self.assertEqual(int('4294967296', 10), 4294967296)
|
||||
self.assertEqual(int('1904440554', 11), 4294967296)
|
||||
self.assertEqual(int('9ba461594', 12), 4294967296)
|
||||
self.assertEqual(int('535a79889', 13), 4294967296)
|
||||
self.assertEqual(int('2ca5b7464', 14), 4294967296)
|
||||
self.assertEqual(int('1a20dcd81', 15), 4294967296)
|
||||
self.assertEqual(int('100000000', 16), 4294967296)
|
||||
self.assertEqual(int('a7ffda91', 17), 4294967296)
|
||||
self.assertEqual(int('704he7g4', 18), 4294967296)
|
||||
self.assertEqual(int('4f5aff66', 19), 4294967296)
|
||||
self.assertEqual(int('3723ai4g', 20), 4294967296)
|
||||
self.assertEqual(int('281d55i4', 21), 4294967296)
|
||||
self.assertEqual(int('1fj8b184', 22), 4294967296)
|
||||
self.assertEqual(int('1606k7ic', 23), 4294967296)
|
||||
self.assertEqual(int('mb994ag', 24), 4294967296)
|
||||
self.assertEqual(int('hek2mgl', 25), 4294967296)
|
||||
self.assertEqual(int('dnchbnm', 26), 4294967296)
|
||||
self.assertEqual(int('b28jpdm', 27), 4294967296)
|
||||
self.assertEqual(int('8pfgih4', 28), 4294967296)
|
||||
self.assertEqual(int('76beigg', 29), 4294967296)
|
||||
self.assertEqual(int('5qmcpqg', 30), 4294967296)
|
||||
self.assertEqual(int('4q0jto4', 31), 4294967296)
|
||||
self.assertEqual(int('4000000', 32), 4294967296)
|
||||
self.assertEqual(int('3aokq94', 33), 4294967296)
|
||||
self.assertEqual(int('2qhxjli', 34), 4294967296)
|
||||
self.assertEqual(int('2br45qb', 35), 4294967296)
|
||||
self.assertEqual(int('1z141z4', 36), 4294967296)
|
||||
|
||||
self.assertEqual(long('100000000000000000000000000000001', 2),
|
||||
self.assertEqual(int('100000000000000000000000000000001', 2),
|
||||
4294967297)
|
||||
self.assertEqual(long('102002022201221111212', 3), 4294967297)
|
||||
self.assertEqual(long('10000000000000001', 4), 4294967297)
|
||||
self.assertEqual(long('32244002423142', 5), 4294967297)
|
||||
self.assertEqual(long('1550104015505', 6), 4294967297)
|
||||
self.assertEqual(long('211301422355', 7), 4294967297)
|
||||
self.assertEqual(long('40000000001', 8), 4294967297)
|
||||
self.assertEqual(long('12068657455', 9), 4294967297)
|
||||
self.assertEqual(long('4294967297', 10), 4294967297)
|
||||
self.assertEqual(long('1904440555', 11), 4294967297)
|
||||
self.assertEqual(long('9ba461595', 12), 4294967297)
|
||||
self.assertEqual(long('535a7988a', 13), 4294967297)
|
||||
self.assertEqual(long('2ca5b7465', 14), 4294967297)
|
||||
self.assertEqual(long('1a20dcd82', 15), 4294967297)
|
||||
self.assertEqual(long('100000001', 16), 4294967297)
|
||||
self.assertEqual(long('a7ffda92', 17), 4294967297)
|
||||
self.assertEqual(long('704he7g5', 18), 4294967297)
|
||||
self.assertEqual(long('4f5aff67', 19), 4294967297)
|
||||
self.assertEqual(long('3723ai4h', 20), 4294967297)
|
||||
self.assertEqual(long('281d55i5', 21), 4294967297)
|
||||
self.assertEqual(long('1fj8b185', 22), 4294967297)
|
||||
self.assertEqual(long('1606k7id', 23), 4294967297)
|
||||
self.assertEqual(long('mb994ah', 24), 4294967297)
|
||||
self.assertEqual(long('hek2mgm', 25), 4294967297)
|
||||
self.assertEqual(long('dnchbnn', 26), 4294967297)
|
||||
self.assertEqual(long('b28jpdn', 27), 4294967297)
|
||||
self.assertEqual(long('8pfgih5', 28), 4294967297)
|
||||
self.assertEqual(long('76beigh', 29), 4294967297)
|
||||
self.assertEqual(long('5qmcpqh', 30), 4294967297)
|
||||
self.assertEqual(long('4q0jto5', 31), 4294967297)
|
||||
self.assertEqual(long('4000001', 32), 4294967297)
|
||||
self.assertEqual(long('3aokq95', 33), 4294967297)
|
||||
self.assertEqual(long('2qhxjlj', 34), 4294967297)
|
||||
self.assertEqual(long('2br45qc', 35), 4294967297)
|
||||
self.assertEqual(long('1z141z5', 36), 4294967297)
|
||||
self.assertEqual(int('102002022201221111212', 3), 4294967297)
|
||||
self.assertEqual(int('10000000000000001', 4), 4294967297)
|
||||
self.assertEqual(int('32244002423142', 5), 4294967297)
|
||||
self.assertEqual(int('1550104015505', 6), 4294967297)
|
||||
self.assertEqual(int('211301422355', 7), 4294967297)
|
||||
self.assertEqual(int('40000000001', 8), 4294967297)
|
||||
self.assertEqual(int('12068657455', 9), 4294967297)
|
||||
self.assertEqual(int('4294967297', 10), 4294967297)
|
||||
self.assertEqual(int('1904440555', 11), 4294967297)
|
||||
self.assertEqual(int('9ba461595', 12), 4294967297)
|
||||
self.assertEqual(int('535a7988a', 13), 4294967297)
|
||||
self.assertEqual(int('2ca5b7465', 14), 4294967297)
|
||||
self.assertEqual(int('1a20dcd82', 15), 4294967297)
|
||||
self.assertEqual(int('100000001', 16), 4294967297)
|
||||
self.assertEqual(int('a7ffda92', 17), 4294967297)
|
||||
self.assertEqual(int('704he7g5', 18), 4294967297)
|
||||
self.assertEqual(int('4f5aff67', 19), 4294967297)
|
||||
self.assertEqual(int('3723ai4h', 20), 4294967297)
|
||||
self.assertEqual(int('281d55i5', 21), 4294967297)
|
||||
self.assertEqual(int('1fj8b185', 22), 4294967297)
|
||||
self.assertEqual(int('1606k7id', 23), 4294967297)
|
||||
self.assertEqual(int('mb994ah', 24), 4294967297)
|
||||
self.assertEqual(int('hek2mgm', 25), 4294967297)
|
||||
self.assertEqual(int('dnchbnn', 26), 4294967297)
|
||||
self.assertEqual(int('b28jpdn', 27), 4294967297)
|
||||
self.assertEqual(int('8pfgih5', 28), 4294967297)
|
||||
self.assertEqual(int('76beigh', 29), 4294967297)
|
||||
self.assertEqual(int('5qmcpqh', 30), 4294967297)
|
||||
self.assertEqual(int('4q0jto5', 31), 4294967297)
|
||||
self.assertEqual(int('4000001', 32), 4294967297)
|
||||
self.assertEqual(int('3aokq95', 33), 4294967297)
|
||||
self.assertEqual(int('2qhxjlj', 34), 4294967297)
|
||||
self.assertEqual(int('2br45qc', 35), 4294967297)
|
||||
self.assertEqual(int('1z141z5', 36), 4294967297)
|
||||
|
||||
|
||||
def test_longconversion(self):
|
||||
# Test __long__()
|
||||
class Foo0:
|
||||
def __long__(self):
|
||||
return 42L
|
||||
return 42
|
||||
|
||||
class Foo1(object):
|
||||
def __long__(self):
|
||||
return 42L
|
||||
return 42
|
||||
|
||||
class Foo2(long):
|
||||
def __long__(self):
|
||||
return 42L
|
||||
|
||||
class Foo3(long):
|
||||
def __long__(self):
|
||||
return self
|
||||
|
||||
class Foo4(long):
|
||||
class Foo2(int):
|
||||
def __long__(self):
|
||||
return 42
|
||||
|
||||
class Foo5(long):
|
||||
class Foo3(int):
|
||||
def __long__(self):
|
||||
return self
|
||||
|
||||
class Foo4(int):
|
||||
def __long__(self):
|
||||
return 42
|
||||
|
||||
class Foo5(int):
|
||||
def __long__(self):
|
||||
return 42.
|
||||
|
||||
self.assertEqual(long(Foo0()), 42L)
|
||||
self.assertEqual(long(Foo1()), 42L)
|
||||
self.assertEqual(int(Foo0()), 42)
|
||||
self.assertEqual(int(Foo1()), 42)
|
||||
# XXX invokes __int__ now
|
||||
# self.assertEqual(long(Foo2()), 42L)
|
||||
self.assertEqual(long(Foo3()), 0)
|
||||
self.assertEqual(int(Foo3()), 0)
|
||||
# XXX likewise
|
||||
# self.assertEqual(long(Foo4()), 42)
|
||||
# self.assertRaises(TypeError, long, Foo5())
|
||||
|
@ -1174,9 +1174,9 @@ class BuiltinTest(unittest.TestCase):
|
|||
self.assertEqual(max((1, 2, 3, 1, 2, 3)), 3)
|
||||
self.assertEqual(max([1, 2, 3, 1, 2, 3]), 3)
|
||||
|
||||
self.assertEqual(max(1, 2L, 3.0), 3.0)
|
||||
self.assertEqual(max(1L, 2.0, 3), 3)
|
||||
self.assertEqual(max(1.0, 2, 3L), 3L)
|
||||
self.assertEqual(max(1, 2, 3.0), 3.0)
|
||||
self.assertEqual(max(1, 2.0, 3), 3)
|
||||
self.assertEqual(max(1.0, 2, 3), 3)
|
||||
|
||||
for stmt in (
|
||||
"max(key=int)", # no args
|
||||
|
@ -1208,9 +1208,9 @@ class BuiltinTest(unittest.TestCase):
|
|||
self.assertEqual(min((1, 2, 3, 1, 2, 3)), 1)
|
||||
self.assertEqual(min([1, 2, 3, 1, 2, 3]), 1)
|
||||
|
||||
self.assertEqual(min(1, 2L, 3.0), 1)
|
||||
self.assertEqual(min(1L, 2.0, 3), 1L)
|
||||
self.assertEqual(min(1.0, 2, 3L), 1.0)
|
||||
self.assertEqual(min(1, 2, 3.0), 1)
|
||||
self.assertEqual(min(1, 2.0, 3), 1)
|
||||
self.assertEqual(min(1.0, 2, 3), 1.0)
|
||||
|
||||
self.assertRaises(TypeError, min)
|
||||
self.assertRaises(TypeError, min, 42)
|
||||
|
@ -1250,9 +1250,9 @@ class BuiltinTest(unittest.TestCase):
|
|||
|
||||
def test_oct(self):
|
||||
self.assertEqual(oct(100), '0144')
|
||||
self.assertEqual(oct(100L), '0144')
|
||||
self.assertEqual(oct(100), '0144')
|
||||
self.assertEqual(oct(-100), '-0144')
|
||||
self.assertEqual(oct(-100), '-0144')
|
||||
self.assertEqual(oct(-100L), '-0144')
|
||||
self.assertRaises(TypeError, oct, ())
|
||||
|
||||
def write_testfile(self):
|
||||
|
@ -1309,20 +1309,20 @@ class BuiltinTest(unittest.TestCase):
|
|||
self.assertEqual(pow(-2,2), 4)
|
||||
self.assertEqual(pow(-2,3), -8)
|
||||
|
||||
self.assertEqual(pow(0L,0), 1)
|
||||
self.assertEqual(pow(0L,1), 0)
|
||||
self.assertEqual(pow(1L,0), 1)
|
||||
self.assertEqual(pow(1L,1), 1)
|
||||
self.assertEqual(pow(0,0), 1)
|
||||
self.assertEqual(pow(0,1), 0)
|
||||
self.assertEqual(pow(1,0), 1)
|
||||
self.assertEqual(pow(1,1), 1)
|
||||
|
||||
self.assertEqual(pow(2L,0), 1)
|
||||
self.assertEqual(pow(2L,10), 1024)
|
||||
self.assertEqual(pow(2L,20), 1024*1024)
|
||||
self.assertEqual(pow(2L,30), 1024*1024*1024)
|
||||
self.assertEqual(pow(2,0), 1)
|
||||
self.assertEqual(pow(2,10), 1024)
|
||||
self.assertEqual(pow(2,20), 1024*1024)
|
||||
self.assertEqual(pow(2,30), 1024*1024*1024)
|
||||
|
||||
self.assertEqual(pow(-2L,0), 1)
|
||||
self.assertEqual(pow(-2L,1), -2)
|
||||
self.assertEqual(pow(-2L,2), 4)
|
||||
self.assertEqual(pow(-2L,3), -8)
|
||||
self.assertEqual(pow(-2,0), 1)
|
||||
self.assertEqual(pow(-2,1), -2)
|
||||
self.assertEqual(pow(-2,2), 4)
|
||||
self.assertEqual(pow(-2,3), -8)
|
||||
|
||||
self.assertAlmostEqual(pow(0.,0), 1.)
|
||||
self.assertAlmostEqual(pow(0.,1), 0.)
|
||||
|
@ -1339,9 +1339,9 @@ class BuiltinTest(unittest.TestCase):
|
|||
self.assertAlmostEqual(pow(-2.,2), 4.)
|
||||
self.assertAlmostEqual(pow(-2.,3), -8.)
|
||||
|
||||
for x in 2, 2L, 2.0:
|
||||
for y in 10, 10L, 10.0:
|
||||
for z in 1000, 1000L, 1000.0:
|
||||
for x in 2, 2, 2.0:
|
||||
for y in 10, 10, 10.0:
|
||||
for z in 1000, 1000, 1000.0:
|
||||
if isinstance(x, float) or \
|
||||
isinstance(y, float) or \
|
||||
isinstance(z, float):
|
||||
|
@ -1351,8 +1351,8 @@ class BuiltinTest(unittest.TestCase):
|
|||
|
||||
self.assertRaises(TypeError, pow, -1, -2, 3)
|
||||
self.assertRaises(ValueError, pow, 1, 2, 0)
|
||||
self.assertRaises(TypeError, pow, -1L, -2L, 3L)
|
||||
self.assertRaises(ValueError, pow, 1L, 2L, 0L)
|
||||
self.assertRaises(TypeError, pow, -1, -2, 3)
|
||||
self.assertRaises(ValueError, pow, 1, 2, 0)
|
||||
self.assertRaises(ValueError, pow, -342.43, 0.234)
|
||||
|
||||
self.assertRaises(TypeError, pow)
|
||||
|
@ -1371,12 +1371,12 @@ class BuiltinTest(unittest.TestCase):
|
|||
self.assertEqual(range(0, 2**100, -1), [])
|
||||
self.assertEqual(range(0, 2**100, -1), [])
|
||||
|
||||
a = long(10 * sys.maxint)
|
||||
b = long(100 * sys.maxint)
|
||||
c = long(50 * sys.maxint)
|
||||
a = int(10 * sys.maxint)
|
||||
b = int(100 * sys.maxint)
|
||||
c = int(50 * sys.maxint)
|
||||
|
||||
self.assertEqual(range(a, a+2), [a, a+1])
|
||||
self.assertEqual(range(a+2, a, -1L), [a+2, a+1])
|
||||
self.assertEqual(range(a+2, a, -1), [a+2, a+1])
|
||||
self.assertEqual(range(a+4, a, -2), [a+4, a+2])
|
||||
|
||||
seq = range(a, b, c)
|
||||
|
@ -1397,7 +1397,7 @@ class BuiltinTest(unittest.TestCase):
|
|||
self.assertRaises(TypeError, range)
|
||||
self.assertRaises(TypeError, range, 1, 2, 3, 4)
|
||||
self.assertRaises(ValueError, range, 1, 2, 0)
|
||||
self.assertRaises(ValueError, range, a, a + 1, long(0))
|
||||
self.assertRaises(ValueError, range, a, a + 1, int(0))
|
||||
|
||||
class badzero(int):
|
||||
def __eq__(self, other):
|
||||
|
@ -1428,7 +1428,7 @@ class BuiltinTest(unittest.TestCase):
|
|||
def test_repr(self):
|
||||
self.assertEqual(repr(''), '\'\'')
|
||||
self.assertEqual(repr(0), '0')
|
||||
self.assertEqual(repr(0L), '0')
|
||||
self.assertEqual(repr(0), '0')
|
||||
self.assertEqual(repr(()), '()')
|
||||
self.assertEqual(repr([]), '[]')
|
||||
self.assertEqual(repr({}), '{}')
|
||||
|
@ -1484,7 +1484,7 @@ class BuiltinTest(unittest.TestCase):
|
|||
def test_str(self):
|
||||
self.assertEqual(str(''), '')
|
||||
self.assertEqual(str(0), '0')
|
||||
self.assertEqual(str(0L), '0')
|
||||
self.assertEqual(str(0), '0')
|
||||
self.assertEqual(str(()), '()')
|
||||
self.assertEqual(str([]), '[]')
|
||||
self.assertEqual(str({}), '{}')
|
||||
|
|
|
@ -361,9 +361,9 @@ class BytesTest(unittest.TestCase):
|
|||
def test_contains(self):
|
||||
b = bytes("abc")
|
||||
self.failUnless(ord('a') in b)
|
||||
self.failUnless(long(ord('a')) in b)
|
||||
self.failUnless(int(ord('a')) in b)
|
||||
self.failIf(200 in b)
|
||||
self.failIf(200 in b)
|
||||
self.failIf(200L in b)
|
||||
self.assertRaises(ValueError, lambda: 300 in b)
|
||||
self.assertRaises(ValueError, lambda: -1 in b)
|
||||
self.assertRaises(TypeError, lambda: None in b)
|
||||
|
|
|
@ -84,10 +84,6 @@ class AllTests:
|
|||
print "__float__:", args
|
||||
return 1.0
|
||||
|
||||
def __long__(self, *args):
|
||||
print "__long__:", args
|
||||
return 1L
|
||||
|
||||
def __oct__(self, *args):
|
||||
print "__oct__:", args
|
||||
return '01'
|
||||
|
@ -238,7 +234,7 @@ else:
|
|||
+testme
|
||||
abs(testme)
|
||||
int(testme)
|
||||
long(testme)
|
||||
int(testme)
|
||||
float(testme)
|
||||
oct(testme)
|
||||
hex(testme)
|
||||
|
@ -289,7 +285,6 @@ class BadTypeClass:
|
|||
def __int__(self):
|
||||
return None
|
||||
__float__ = __int__
|
||||
__long__ = __int__
|
||||
__str__ = __int__
|
||||
__repr__ = __int__
|
||||
__oct__ = __int__
|
||||
|
@ -307,31 +302,11 @@ def check_exc(stmt, exception):
|
|||
|
||||
check_exc("int(BadTypeClass())", TypeError)
|
||||
check_exc("float(BadTypeClass())", TypeError)
|
||||
check_exc("long(BadTypeClass())", TypeError)
|
||||
check_exc("str(BadTypeClass())", TypeError)
|
||||
check_exc("repr(BadTypeClass())", TypeError)
|
||||
check_exc("oct(BadTypeClass())", TypeError)
|
||||
check_exc("hex(BadTypeClass())", TypeError)
|
||||
|
||||
# mixing up ints and longs is okay
|
||||
class IntLongMixClass:
|
||||
def __int__(self):
|
||||
return 0L
|
||||
|
||||
def __long__(self):
|
||||
return 0
|
||||
|
||||
try:
|
||||
int(IntLongMixClass())
|
||||
except TypeError:
|
||||
raise TestFailed, "TypeError should not be raised"
|
||||
|
||||
try:
|
||||
long(IntLongMixClass())
|
||||
except TypeError:
|
||||
raise TestFailed, "TypeError should not be raised"
|
||||
|
||||
|
||||
# Test correct errors from hash() on objects with comparisons but no __hash__
|
||||
|
||||
class C0:
|
||||
|
|
|
@ -70,7 +70,7 @@ consts: ('None',)
|
|||
... 'doc string'
|
||||
... 'not a docstring'
|
||||
... 53
|
||||
... 53L
|
||||
... 0x53
|
||||
|
||||
>>> dump(optimize_away.func_code)
|
||||
name: optimize_away
|
||||
|
|
|
@ -17,7 +17,7 @@ class Cmp:
|
|||
return self.arg == other
|
||||
|
||||
class ComparisonTest(unittest.TestCase):
|
||||
set1 = [2, 2.0, 2L, 2+0j, Cmp(2.0)]
|
||||
set1 = [2, 2.0, 2, 2+0j, Cmp(2.0)]
|
||||
set2 = [[1], (3,), None, Empty()]
|
||||
candidates = set1 + set2
|
||||
|
||||
|
|
|
@ -182,10 +182,8 @@ if 1:
|
|||
self.assertRaises(SyntaxError, eval, arg)
|
||||
|
||||
self.assertEqual(eval("0777"), 511)
|
||||
self.assertEqual(eval("0777L"), 511)
|
||||
self.assertEqual(eval("000777"), 511)
|
||||
self.assertEqual(eval("0xff"), 255)
|
||||
self.assertEqual(eval("0xffL"), 255)
|
||||
self.assertEqual(eval("0XfF"), 255)
|
||||
self.assertEqual(eval("0777."), 777)
|
||||
self.assertEqual(eval("0777.0"), 777)
|
||||
|
@ -212,19 +210,19 @@ if 1:
|
|||
if sys.maxint == 2147483647:
|
||||
# 32-bit machine
|
||||
all_one_bits = '0xffffffff'
|
||||
self.assertEqual(eval(all_one_bits), 4294967295L)
|
||||
self.assertEqual(eval("-" + all_one_bits), -4294967295L)
|
||||
self.assertEqual(eval(all_one_bits), 4294967295)
|
||||
self.assertEqual(eval("-" + all_one_bits), -4294967295)
|
||||
elif sys.maxint == 9223372036854775807:
|
||||
# 64-bit machine
|
||||
all_one_bits = '0xffffffffffffffff'
|
||||
self.assertEqual(eval(all_one_bits), 18446744073709551615L)
|
||||
self.assertEqual(eval("-" + all_one_bits), -18446744073709551615L)
|
||||
self.assertEqual(eval(all_one_bits), 18446744073709551615)
|
||||
self.assertEqual(eval("-" + all_one_bits), -18446744073709551615)
|
||||
else:
|
||||
self.fail("How many bits *does* this machine have???")
|
||||
# Verify treatment of contant folding on -(sys.maxint+1)
|
||||
# i.e. -2147483648 on 32 bit platforms. Should return int, not long.
|
||||
self.assertTrue(isinstance(eval("%s" % (-sys.maxint - 1)), int))
|
||||
self.assertTrue(isinstance(eval("%s" % (-sys.maxint - 2)), long))
|
||||
self.assertTrue(isinstance(eval("%s" % (-sys.maxint - 2)), int))
|
||||
|
||||
if sys.maxint == 9223372036854775807:
|
||||
def test_32_63_bit_values(self):
|
||||
|
|
|
@ -93,7 +93,7 @@ class ComplexTest(unittest.TestCase):
|
|||
self.assertRaises(ZeroDivisionError, complex.__floordiv__, 3+0j, 0+0j)
|
||||
|
||||
def test_richcompare(self):
|
||||
self.assertRaises(OverflowError, complex.__eq__, 1+1j, 1L<<10000)
|
||||
self.assertRaises(OverflowError, complex.__eq__, 1+1j, 1<<10000)
|
||||
self.assertEqual(complex.__lt__(1+1j, None), NotImplemented)
|
||||
self.assertIs(complex.__eq__(1+1j, 1+1j), True)
|
||||
self.assertIs(complex.__eq__(1+1j, 2+2j), False)
|
||||
|
@ -180,25 +180,25 @@ class ComplexTest(unittest.TestCase):
|
|||
self.assertAlmostEqual(complex("1+10j"), 1+10j)
|
||||
self.assertAlmostEqual(complex(10), 10+0j)
|
||||
self.assertAlmostEqual(complex(10.0), 10+0j)
|
||||
self.assertAlmostEqual(complex(10L), 10+0j)
|
||||
self.assertAlmostEqual(complex(10), 10+0j)
|
||||
self.assertAlmostEqual(complex(10+0j), 10+0j)
|
||||
self.assertAlmostEqual(complex(1,10), 1+10j)
|
||||
self.assertAlmostEqual(complex(1,10L), 1+10j)
|
||||
self.assertAlmostEqual(complex(1,10), 1+10j)
|
||||
self.assertAlmostEqual(complex(1,10.0), 1+10j)
|
||||
self.assertAlmostEqual(complex(1,10), 1+10j)
|
||||
self.assertAlmostEqual(complex(1,10), 1+10j)
|
||||
self.assertAlmostEqual(complex(1,10.0), 1+10j)
|
||||
self.assertAlmostEqual(complex(1L,10), 1+10j)
|
||||
self.assertAlmostEqual(complex(1L,10L), 1+10j)
|
||||
self.assertAlmostEqual(complex(1L,10.0), 1+10j)
|
||||
self.assertAlmostEqual(complex(1.0,10), 1+10j)
|
||||
self.assertAlmostEqual(complex(1.0,10L), 1+10j)
|
||||
self.assertAlmostEqual(complex(1.0,10), 1+10j)
|
||||
self.assertAlmostEqual(complex(1.0,10.0), 1+10j)
|
||||
self.assertAlmostEqual(complex(3.14+0j), 3.14+0j)
|
||||
self.assertAlmostEqual(complex(3.14), 3.14+0j)
|
||||
self.assertAlmostEqual(complex(314), 314.0+0j)
|
||||
self.assertAlmostEqual(complex(314L), 314.0+0j)
|
||||
self.assertAlmostEqual(complex(314), 314.0+0j)
|
||||
self.assertAlmostEqual(complex(3.14+0j, 0j), 3.14+0j)
|
||||
self.assertAlmostEqual(complex(3.14, 0.0), 3.14+0j)
|
||||
self.assertAlmostEqual(complex(314, 0), 314.0+0j)
|
||||
self.assertAlmostEqual(complex(314L, 0L), 314.0+0j)
|
||||
self.assertAlmostEqual(complex(314, 0), 314.0+0j)
|
||||
self.assertAlmostEqual(complex(0j, 3.14j), -3.14+0j)
|
||||
self.assertAlmostEqual(complex(0.0, 3.14j), -3.14+0j)
|
||||
self.assertAlmostEqual(complex(0j, 3.14), 3.14j)
|
||||
|
@ -232,7 +232,7 @@ class ComplexTest(unittest.TestCase):
|
|||
self.assertRaises(ValueError, complex, '1+1j\0j')
|
||||
|
||||
self.assertRaises(TypeError, int, 5+3j)
|
||||
self.assertRaises(TypeError, long, 5+3j)
|
||||
self.assertRaises(TypeError, int, 5+3j)
|
||||
self.assertRaises(TypeError, float, 5+3j)
|
||||
self.assertRaises(ValueError, complex, "")
|
||||
self.assertRaises(TypeError, complex, None)
|
||||
|
|
|
@ -103,7 +103,7 @@ class HeaderTests(TestCase):
|
|||
from cookielib import parse_ns_headers
|
||||
|
||||
# quotes should be stripped
|
||||
expected = [[('foo', 'bar'), ('expires', 2209069412L), ('version', '0')]]
|
||||
expected = [[('foo', 'bar'), ('expires', 2209069412), ('version', '0')]]
|
||||
for hdr in [
|
||||
'foo=bar; expires=01 Jan 2040 22:23:32 GMT',
|
||||
'foo=bar; expires="01 Jan 2040 22:23:32 GMT"',
|
||||
|
|
|
@ -82,7 +82,7 @@ class TestCopy(unittest.TestCase):
|
|||
pass
|
||||
def f():
|
||||
pass
|
||||
tests = [None, 42, 2L**100, 3.14, True, False, 1j,
|
||||
tests = [None, 42, 2**100, 3.14, True, False, 1j,
|
||||
"hello", u"hello\u1234", f.func_code,
|
||||
NewStyle, xrange(10), Classic, max]
|
||||
for x in tests:
|
||||
|
@ -255,7 +255,7 @@ class TestCopy(unittest.TestCase):
|
|||
pass
|
||||
def f():
|
||||
pass
|
||||
tests = [None, 42, 2L**100, 3.14, True, False, 1j,
|
||||
tests = [None, 42, 2**100, 3.14, True, False, 1j,
|
||||
"hello", u"hello\u1234", f.func_code,
|
||||
NewStyle, xrange(10), Classic, max]
|
||||
for x in tests:
|
||||
|
|
|
@ -96,7 +96,7 @@ class CopyRegTestCase(unittest.TestCase):
|
|||
e.restore()
|
||||
|
||||
# Ensure invalid codes blow up.
|
||||
for code in -1, 0, 0x80000000L:
|
||||
for code in -1, 0, 0x80000000:
|
||||
self.assertRaises(ValueError, copy_reg.add_extension,
|
||||
mod, func, code)
|
||||
|
||||
|
|
|
@ -32,7 +32,7 @@ else:
|
|||
|
||||
# An arbitrary collection of objects of non-datetime types, for testing
|
||||
# mixed-type comparisons.
|
||||
OTHERSTUFF = (10, 10L, 34.5, "abc", {}, [], ())
|
||||
OTHERSTUFF = (10, 10, 34.5, "abc", {}, [], ())
|
||||
|
||||
|
||||
#############################################################################
|
||||
|
@ -149,11 +149,11 @@ class HarmlessMixedComparison(unittest.TestCase):
|
|||
self.failIf(() == me)
|
||||
self.failUnless(() != me)
|
||||
|
||||
self.failUnless(me in [1, 20L, [], me])
|
||||
self.failIf(me not in [1, 20L, [], me])
|
||||
self.failUnless(me in [1, 20, [], me])
|
||||
self.failIf(me not in [1, 20, [], me])
|
||||
|
||||
self.failUnless([] in [me, 1, 20L, []])
|
||||
self.failIf([] not in [me, 1, 20L, []])
|
||||
self.failUnless([] in [me, 1, 20, []])
|
||||
self.failIf([] not in [me, 1, 20, []])
|
||||
|
||||
def test_harmful_mixed_comparison(self):
|
||||
me = self.theclass(1, 1, 1)
|
||||
|
@ -222,13 +222,13 @@ class TestTimeDelta(HarmlessMixedComparison):
|
|||
eq(td(0, 0, 60*1000000), b)
|
||||
eq(a*10, td(70))
|
||||
eq(a*10, 10*a)
|
||||
eq(a*10L, 10*a)
|
||||
eq(a*10, 10*a)
|
||||
eq(b*10, td(0, 600))
|
||||
eq(10*b, td(0, 600))
|
||||
eq(b*10L, td(0, 600))
|
||||
eq(b*10, td(0, 600))
|
||||
eq(c*10, td(0, 0, 10000))
|
||||
eq(10*c, td(0, 0, 10000))
|
||||
eq(c*10L, td(0, 0, 10000))
|
||||
eq(c*10, td(0, 0, 10000))
|
||||
eq(a*-1, -a)
|
||||
eq(b*-2, -b-b)
|
||||
eq(c*-2, -c+-c)
|
||||
|
@ -246,7 +246,7 @@ class TestTimeDelta(HarmlessMixedComparison):
|
|||
a = timedelta(42)
|
||||
|
||||
# Add/sub ints, longs, floats should be illegal
|
||||
for i in 1, 1L, 1.0:
|
||||
for i in 1, 1, 1.0:
|
||||
self.assertRaises(TypeError, lambda: a+i)
|
||||
self.assertRaises(TypeError, lambda: a-i)
|
||||
self.assertRaises(TypeError, lambda: i+a)
|
||||
|
@ -263,7 +263,7 @@ class TestTimeDelta(HarmlessMixedComparison):
|
|||
|
||||
# Divison of int by timedelta doesn't make sense.
|
||||
# Division by zero doesn't make sense.
|
||||
for zero in 0, 0L:
|
||||
for zero in 0, 0:
|
||||
self.assertRaises(TypeError, lambda: zero // a)
|
||||
self.assertRaises(ZeroDivisionError, lambda: a // zero)
|
||||
|
||||
|
@ -696,7 +696,7 @@ class TestDate(HarmlessMixedComparison):
|
|||
self.assertEqual(a - (a - day), day)
|
||||
|
||||
# Add/sub ints, longs, floats should be illegal
|
||||
for i in 1, 1L, 1.0:
|
||||
for i in 1, 1, 1.0:
|
||||
self.assertRaises(TypeError, lambda: a+i)
|
||||
self.assertRaises(TypeError, lambda: a-i)
|
||||
self.assertRaises(TypeError, lambda: i+a)
|
||||
|
@ -1325,7 +1325,7 @@ class TestDateTime(TestDate):
|
|||
self.assertEqual(a - (week + day + hour + millisec),
|
||||
(((a - week) - day) - hour) - millisec)
|
||||
# Add/sub ints, longs, floats should be illegal
|
||||
for i in 1, 1L, 1.0:
|
||||
for i in 1, 1, 1.0:
|
||||
self.assertRaises(TypeError, lambda: a+i)
|
||||
self.assertRaises(TypeError, lambda: a-i)
|
||||
self.assertRaises(TypeError, lambda: i+a)
|
||||
|
|
|
@ -907,8 +907,8 @@ class DecimalUsabilityTest(unittest.TestCase):
|
|||
self.assertEqual(int(d2), 15)
|
||||
|
||||
#long
|
||||
self.assertEqual(long(d1), 66)
|
||||
self.assertEqual(long(d2), 15)
|
||||
self.assertEqual(int(d1), 66)
|
||||
self.assertEqual(int(d2), 15)
|
||||
|
||||
#float
|
||||
self.assertEqual(float(d1), 66)
|
||||
|
|
|
@ -191,7 +191,7 @@ def dict_constructor():
|
|||
vereq(d, dict([("two", 2)], one=1))
|
||||
vereq(d, dict([("one", 100), ("two", 200)], **d))
|
||||
verify(d is not dict(**d))
|
||||
for badarg in 0, 0L, 0j, "0", [0], (0,):
|
||||
for badarg in 0, 0, 0j, "0", [0], (0,):
|
||||
try:
|
||||
dict(badarg)
|
||||
except TypeError:
|
||||
|
@ -264,7 +264,7 @@ def test_dir():
|
|||
del junk
|
||||
|
||||
# Just make sure these don't blow up!
|
||||
for arg in 2, 2L, 2j, 2e0, [2], "2", u"2", (2,), {2:2}, type, test_dir:
|
||||
for arg in 2, 2, 2j, 2e0, [2], "2", u"2", (2,), {2:2}, type, test_dir:
|
||||
dir(arg)
|
||||
|
||||
# Test dir on custom classes. Since these have object as a
|
||||
|
@ -385,7 +385,6 @@ unops = {
|
|||
'abs': 'abs',
|
||||
'invert': '~',
|
||||
'int': 'int',
|
||||
'long': 'long',
|
||||
'float': 'float',
|
||||
'oct': 'oct',
|
||||
'hex': 'hex',
|
||||
|
@ -423,7 +422,7 @@ def ints():
|
|||
class C(int):
|
||||
def __add__(self, other):
|
||||
return NotImplemented
|
||||
vereq(C(5L), 5)
|
||||
vereq(C(5), 5)
|
||||
try:
|
||||
C() + ""
|
||||
except TypeError:
|
||||
|
@ -433,7 +432,7 @@ def ints():
|
|||
|
||||
def longs():
|
||||
if verbose: print "Testing long operations..."
|
||||
numops(100L, 3L)
|
||||
numops(100, 3)
|
||||
|
||||
def floats():
|
||||
if verbose: print "Testing float operations..."
|
||||
|
@ -1263,10 +1262,10 @@ def dynamics():
|
|||
vereq(I(3)*I(2), 6)
|
||||
|
||||
# Test handling of long*seq and seq*long
|
||||
class L(long):
|
||||
class L(int):
|
||||
pass
|
||||
vereq("a"*L(2L), "aa")
|
||||
vereq(L(2L)*"a", "aa")
|
||||
vereq("a"*L(2), "aa")
|
||||
vereq(L(2)*"a", "aa")
|
||||
vereq(2*L(3), 6)
|
||||
vereq(L(3)*2, 6)
|
||||
vereq(L(3)*L(2), 6)
|
||||
|
@ -2041,7 +2040,7 @@ def inherits():
|
|||
verify((hexint(0) << 12).__class__ is int)
|
||||
verify((hexint(0) >> 12).__class__ is int)
|
||||
|
||||
class octlong(long):
|
||||
class octlong(int):
|
||||
__slots__ = []
|
||||
def __str__(self):
|
||||
s = oct(self)
|
||||
|
@ -2056,39 +2055,39 @@ def inherits():
|
|||
# because the example uses a short int left argument.)
|
||||
vereq(str(5 + octlong(3000)), "05675")
|
||||
a = octlong(12345)
|
||||
vereq(a, 12345L)
|
||||
vereq(long(a), 12345L)
|
||||
vereq(hash(a), hash(12345L))
|
||||
verify(long(a).__class__ is long)
|
||||
verify((+a).__class__ is long)
|
||||
verify((-a).__class__ is long)
|
||||
verify((-octlong(0)).__class__ is long)
|
||||
verify((a >> 0).__class__ is long)
|
||||
verify((a << 0).__class__ is long)
|
||||
verify((a - 0).__class__ is long)
|
||||
verify((a * 1).__class__ is long)
|
||||
verify((a ** 1).__class__ is long)
|
||||
verify((a // 1).__class__ is long)
|
||||
verify((1 * a).__class__ is long)
|
||||
verify((a | 0).__class__ is long)
|
||||
verify((a ^ 0).__class__ is long)
|
||||
verify((a & -1L).__class__ is long)
|
||||
verify((octlong(0) << 12).__class__ is long)
|
||||
verify((octlong(0) >> 12).__class__ is long)
|
||||
verify(abs(octlong(0)).__class__ is long)
|
||||
vereq(a, 12345)
|
||||
vereq(int(a), 12345)
|
||||
vereq(hash(a), hash(12345))
|
||||
verify(int(a).__class__ is int)
|
||||
verify((+a).__class__ is int)
|
||||
verify((-a).__class__ is int)
|
||||
verify((-octlong(0)).__class__ is int)
|
||||
verify((a >> 0).__class__ is int)
|
||||
verify((a << 0).__class__ is int)
|
||||
verify((a - 0).__class__ is int)
|
||||
verify((a * 1).__class__ is int)
|
||||
verify((a ** 1).__class__ is int)
|
||||
verify((a // 1).__class__ is int)
|
||||
verify((1 * a).__class__ is int)
|
||||
verify((a | 0).__class__ is int)
|
||||
verify((a ^ 0).__class__ is int)
|
||||
verify((a & -1).__class__ is int)
|
||||
verify((octlong(0) << 12).__class__ is int)
|
||||
verify((octlong(0) >> 12).__class__ is int)
|
||||
verify(abs(octlong(0)).__class__ is int)
|
||||
|
||||
# Because octlong overrides __add__, we can't check the absence of +0
|
||||
# optimizations using octlong.
|
||||
class longclone(long):
|
||||
class longclone(int):
|
||||
pass
|
||||
a = longclone(1)
|
||||
verify((a + 0).__class__ is long)
|
||||
verify((0 + a).__class__ is long)
|
||||
verify((a + 0).__class__ is int)
|
||||
verify((0 + a).__class__ is int)
|
||||
|
||||
# Check that negative clones don't segfault
|
||||
a = longclone(-1)
|
||||
vereq(a.__dict__, {})
|
||||
vereq(long(a), -1) # verify PyNumber_Long() copies the sign bit
|
||||
vereq(int(a), -1) # verify PyNumber_Long() copies the sign bit
|
||||
|
||||
class precfloat(float):
|
||||
__slots__ = ['prec']
|
||||
|
@ -2366,7 +2365,7 @@ def keywords():
|
|||
print "Testing keyword args to basic type constructors ..."
|
||||
vereq(int(x=1), 1)
|
||||
vereq(float(x=2), 2.0)
|
||||
vereq(long(x=3), 3L)
|
||||
vereq(int(x=3), 3)
|
||||
vereq(complex(imag=42, real=666), complex(666, 42))
|
||||
vereq(str(object=500), '500')
|
||||
vereq(unicode(string='abc', errors='strict'), u'abc')
|
||||
|
@ -2374,7 +2373,7 @@ def keywords():
|
|||
vereq(list(sequence=(0, 1, 2)), range(3))
|
||||
# note: as of Python 2.3, dict() no longer has an "items" keyword arg
|
||||
|
||||
for constructor in (int, float, long, complex, str, unicode,
|
||||
for constructor in (int, float, int, complex, str, unicode,
|
||||
tuple, list, file):
|
||||
try:
|
||||
constructor(bogus_keyword_arg=1)
|
||||
|
@ -2472,37 +2471,37 @@ def classic_comparisons():
|
|||
def __eq__(self, other):
|
||||
if isinstance(other, C):
|
||||
return self.value == other.value
|
||||
if isinstance(other, int) or isinstance(other, long):
|
||||
if isinstance(other, int) or isinstance(other, int):
|
||||
return self.value == other
|
||||
return NotImplemented
|
||||
def __ne__(self, other):
|
||||
if isinstance(other, C):
|
||||
return self.value != other.value
|
||||
if isinstance(other, int) or isinstance(other, long):
|
||||
if isinstance(other, int) or isinstance(other, int):
|
||||
return self.value != other
|
||||
return NotImplemented
|
||||
def __lt__(self, other):
|
||||
if isinstance(other, C):
|
||||
return self.value < other.value
|
||||
if isinstance(other, int) or isinstance(other, long):
|
||||
if isinstance(other, int) or isinstance(other, int):
|
||||
return self.value < other
|
||||
return NotImplemented
|
||||
def __le__(self, other):
|
||||
if isinstance(other, C):
|
||||
return self.value <= other.value
|
||||
if isinstance(other, int) or isinstance(other, long):
|
||||
if isinstance(other, int) or isinstance(other, int):
|
||||
return self.value <= other
|
||||
return NotImplemented
|
||||
def __gt__(self, other):
|
||||
if isinstance(other, C):
|
||||
return self.value > other.value
|
||||
if isinstance(other, int) or isinstance(other, long):
|
||||
if isinstance(other, int) or isinstance(other, int):
|
||||
return self.value > other
|
||||
return NotImplemented
|
||||
def __ge__(self, other):
|
||||
if isinstance(other, C):
|
||||
return self.value >= other.value
|
||||
if isinstance(other, int) or isinstance(other, long):
|
||||
if isinstance(other, int) or isinstance(other, int):
|
||||
return self.value >= other
|
||||
return NotImplemented
|
||||
|
||||
|
@ -2550,37 +2549,37 @@ def rich_comparisons():
|
|||
def __eq__(self, other):
|
||||
if isinstance(other, C):
|
||||
return self.value == other.value
|
||||
if isinstance(other, int) or isinstance(other, long):
|
||||
if isinstance(other, int) or isinstance(other, int):
|
||||
return self.value == other
|
||||
return NotImplemented
|
||||
def __ne__(self, other):
|
||||
if isinstance(other, C):
|
||||
return self.value != other.value
|
||||
if isinstance(other, int) or isinstance(other, long):
|
||||
if isinstance(other, int) or isinstance(other, int):
|
||||
return self.value != other
|
||||
return NotImplemented
|
||||
def __lt__(self, other):
|
||||
if isinstance(other, C):
|
||||
return self.value < other.value
|
||||
if isinstance(other, int) or isinstance(other, long):
|
||||
if isinstance(other, int) or isinstance(other, int):
|
||||
return self.value < other
|
||||
return NotImplemented
|
||||
def __le__(self, other):
|
||||
if isinstance(other, C):
|
||||
return self.value <= other.value
|
||||
if isinstance(other, int) or isinstance(other, long):
|
||||
if isinstance(other, int) or isinstance(other, int):
|
||||
return self.value <= other
|
||||
return NotImplemented
|
||||
def __gt__(self, other):
|
||||
if isinstance(other, C):
|
||||
return self.value > other.value
|
||||
if isinstance(other, int) or isinstance(other, long):
|
||||
if isinstance(other, int) or isinstance(other, int):
|
||||
return self.value > other
|
||||
return NotImplemented
|
||||
def __ge__(self, other):
|
||||
if isinstance(other, C):
|
||||
return self.value >= other.value
|
||||
if isinstance(other, int) or isinstance(other, long):
|
||||
if isinstance(other, int) or isinstance(other, int):
|
||||
return self.value >= other
|
||||
return NotImplemented
|
||||
c1 = C(1)
|
||||
|
@ -3250,11 +3249,11 @@ def imulbug():
|
|||
y *= 2
|
||||
vereq(y, (x, 2))
|
||||
y = x
|
||||
y *= 3L
|
||||
vereq(y, (x, 3L))
|
||||
y *= 3
|
||||
vereq(y, (x, 3))
|
||||
y = x
|
||||
y *= 1L<<100
|
||||
vereq(y, (x, 1L<<100))
|
||||
y *= 1<<100
|
||||
vereq(y, (x, 1<<100))
|
||||
y = x
|
||||
y *= None
|
||||
vereq(y, (x, None))
|
||||
|
@ -3444,7 +3443,7 @@ def do_this_first():
|
|||
def __pow__(self, *args):
|
||||
pass
|
||||
try:
|
||||
pow(0L, UserLong(), 0L)
|
||||
pow(0, UserLong(), 0)
|
||||
except:
|
||||
pass
|
||||
|
||||
|
@ -3956,7 +3955,7 @@ def notimplemented():
|
|||
else:
|
||||
raise TestFailed("no TypeError from %r" % (expr,))
|
||||
|
||||
N1 = sys.maxint + 1L # might trigger OverflowErrors instead of TypeErrors
|
||||
N1 = sys.maxint + 1 # might trigger OverflowErrors instead of TypeErrors
|
||||
N2 = sys.maxint # if sizeof(int) < sizeof(long), might trigger
|
||||
# ValueErrors instead of TypeErrors
|
||||
for metaclass in [type, types.ClassType]:
|
||||
|
|
|
@ -314,7 +314,7 @@ class DictTest(unittest.TestCase):
|
|||
|
||||
# verify longs/ints get same value when key > 32 bits (for 64-bit archs)
|
||||
# see SF bug #689659
|
||||
x = 4503599627370496L
|
||||
x = 4503599627370496
|
||||
y = 4503599627370496
|
||||
h = {x: 'anything', y: 'something else'}
|
||||
self.assertEqual(h[x], h[y])
|
||||
|
@ -371,7 +371,7 @@ class DictTest(unittest.TestCase):
|
|||
|
||||
def test_eq(self):
|
||||
self.assertEqual({}, {})
|
||||
self.assertEqual({1: 2}, {1L: 2L})
|
||||
self.assertEqual({1: 2}, {1: 2})
|
||||
|
||||
class Exc(Exception): pass
|
||||
|
||||
|
|
|
@ -57,14 +57,14 @@ testboth('%12.*f', (123456, 1.0))
|
|||
|
||||
# Formatting of long integers. Overflow is not ok
|
||||
overflowok = 0
|
||||
testboth("%x", 10L, "a")
|
||||
testboth("%x", 100000000000L, "174876e800")
|
||||
testboth("%o", 10L, "12")
|
||||
testboth("%o", 100000000000L, "1351035564000")
|
||||
testboth("%d", 10L, "10")
|
||||
testboth("%d", 100000000000L, "100000000000")
|
||||
testboth("%x", 10, "a")
|
||||
testboth("%x", 100000000000, "174876e800")
|
||||
testboth("%o", 10, "12")
|
||||
testboth("%o", 100000000000, "1351035564000")
|
||||
testboth("%d", 10, "10")
|
||||
testboth("%d", 100000000000, "100000000000")
|
||||
|
||||
big = 123456789012345678901234567890L
|
||||
big = 123456789012345678901234567890
|
||||
testboth("%d", big, "123456789012345678901234567890")
|
||||
testboth("%d", -big, "-123456789012345678901234567890")
|
||||
testboth("%5d", -big, "-123456789012345678901234567890")
|
||||
|
@ -83,7 +83,7 @@ testboth("%.30d", big, "123456789012345678901234567890")
|
|||
testboth("%.31d", big, "0123456789012345678901234567890")
|
||||
testboth("%32.31d", big, " 0123456789012345678901234567890")
|
||||
|
||||
big = 0x1234567890abcdef12345L # 21 hex digits
|
||||
big = 0x1234567890abcdef12345 # 21 hex digits
|
||||
testboth("%x", big, "1234567890abcdef12345")
|
||||
testboth("%x", -big, "-1234567890abcdef12345")
|
||||
testboth("%5x", -big, "-1234567890abcdef12345")
|
||||
|
@ -120,7 +120,7 @@ testboth("%#+027.23X", big, "+0X0001234567890ABCDEF12345")
|
|||
# same, except no 0 flag
|
||||
testboth("%#+27.23X", big, " +0X001234567890ABCDEF12345")
|
||||
|
||||
big = 012345670123456701234567012345670L # 32 octal digits
|
||||
big = 012345670123456701234567012345670 # 32 octal digits
|
||||
testboth("%o", big, "12345670123456701234567012345670")
|
||||
testboth("%o", -big, "-12345670123456701234567012345670")
|
||||
testboth("%5o", -big, "-12345670123456701234567012345670")
|
||||
|
@ -163,34 +163,34 @@ testboth("%0#34.33o", big, "0012345670123456701234567012345670")
|
|||
# Some small ints, in both Python int and long flavors).
|
||||
testboth("%d", 42, "42")
|
||||
testboth("%d", -42, "-42")
|
||||
testboth("%d", 42L, "42")
|
||||
testboth("%d", -42L, "-42")
|
||||
testboth("%d", 42, "42")
|
||||
testboth("%d", -42, "-42")
|
||||
testboth("%#x", 1, "0x1")
|
||||
testboth("%#x", 1, "0x1")
|
||||
testboth("%#x", 1L, "0x1")
|
||||
testboth("%#X", 1, "0X1")
|
||||
testboth("%#X", 1L, "0X1")
|
||||
testboth("%#X", 1, "0X1")
|
||||
testboth("%#o", 1, "01")
|
||||
testboth("%#o", 1, "01")
|
||||
testboth("%#o", 1L, "01")
|
||||
testboth("%#o", 0, "0")
|
||||
testboth("%#o", 0L, "0")
|
||||
testboth("%#o", 0, "0")
|
||||
testboth("%o", 0, "0")
|
||||
testboth("%o", 0, "0")
|
||||
testboth("%o", 0L, "0")
|
||||
testboth("%d", 0, "0")
|
||||
testboth("%d", 0L, "0")
|
||||
testboth("%d", 0, "0")
|
||||
testboth("%#x", 0, "0x0")
|
||||
testboth("%#x", 0, "0x0")
|
||||
testboth("%#x", 0L, "0x0")
|
||||
testboth("%#X", 0, "0X0")
|
||||
testboth("%#X", 0L, "0X0")
|
||||
testboth("%#X", 0, "0X0")
|
||||
|
||||
testboth("%x", 0x42, "42")
|
||||
testboth("%x", -0x42, "-42")
|
||||
testboth("%x", 0x42L, "42")
|
||||
testboth("%x", -0x42L, "-42")
|
||||
testboth("%x", 0x42, "42")
|
||||
testboth("%x", -0x42, "-42")
|
||||
|
||||
testboth("%o", 042, "42")
|
||||
testboth("%o", -042, "-42")
|
||||
testboth("%o", 042L, "42")
|
||||
testboth("%o", -042L, "-42")
|
||||
testboth("%o", 042, "42")
|
||||
testboth("%o", -042, "-42")
|
||||
|
||||
# Test exception for unknown format characters
|
||||
if verbose:
|
||||
|
@ -230,7 +230,7 @@ test_exc(u'no format', '1', TypeError,
|
|||
test_exc(u'no format', u'1', TypeError,
|
||||
"not all arguments converted during string formatting")
|
||||
|
||||
class Foobar(long):
|
||||
class Foobar(int):
|
||||
def __oct__(self):
|
||||
# Returning a non-string should not blow up.
|
||||
return self + 1
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue