mirror of
https://github.com/python-pillow/Pillow.git
synced 2025-01-26 17:24:31 +03:00
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:
parent
31c454b925
commit
af94e2d93d
|
@ -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)
|
||||
|
||||
|
|
|
@ -21,6 +21,9 @@ from . import Image, ImageFile
|
|||
|
||||
_handler = None
|
||||
|
||||
if str != bytes:
|
||||
long = int
|
||||
|
||||
##
|
||||
# Install application-specific WMF image handler.
|
||||
#
|
||||
|
|
Loading…
Reference in New Issue
Block a user