py3k: Map long type to int

int() is really now long() in py3k, but to avoid breaking 2.6/2.7, we leave
the integer types where they are and just map long to int in py3k.

Also, pretty proud of myself for finding an easy way of detecting py3k.
This commit is contained in:
Brian Crowell 2012-10-16 22:54:38 -05:00 committed by Brian Crowell
parent 31c454b925
commit af94e2d93d
2 changed files with 6 additions and 0 deletions

View File

@ -41,6 +41,9 @@ from __future__ import print_function
import io
import sys
if str != bytes:
long = int
def i16(c, o = 0):
return ord(c[o])+(ord(c[o+1])<<8)

View File

@ -21,6 +21,9 @@ from . import Image, ImageFile
_handler = None
if str != bytes:
long = int
##
# Install application-specific WMF image handler.
#