diff options
author | Bill Janssen <janssen@parc.com> | 2007-10-30 18:12:39 (GMT) |
---|---|---|
committer | Bill Janssen <janssen@parc.com> | 2007-10-30 18:12:39 (GMT) |
commit | 8cfe3a32763895b86eff1a7eb79f56774896645f (patch) | |
tree | 51c8afb3d23e62dd5753fe807186446622bc19ba | |
parent | 316414e435988864a6d475dbfefbc0ebdf0fbe2d (diff) | |
download | cpython-8cfe3a32763895b86eff1a7eb79f56774896645f.zip cpython-8cfe3a32763895b86eff1a7eb79f56774896645f.tar.gz cpython-8cfe3a32763895b86eff1a7eb79f56774896645f.tar.bz2 |
remove ord() calls on what are now integers rather than characters
-rw-r--r-- | Lib/plat-mac/ic.py | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/Lib/plat-mac/ic.py b/Lib/plat-mac/ic.py index ba21461..5a377ebc 100644 --- a/Lib/plat-mac/ic.py +++ b/Lib/plat-mac/ic.py @@ -41,27 +41,27 @@ _ICOpaqueDataType=type(ICOpaqueData('')) def _decode_default(data, key): if len(data) == 0: return data - if ord(data[0]) == len(data)-1: + if data[0] == len(data)-1: # Assume Pstring return data[1:] return ICOpaqueData(data) def _decode_multistr(data, key): - numstr = ord(data[0]) << 8 | ord(data[1]) + numstr = data[0] << 8 | data[1] rv = [] ptr = 2 for i in range(numstr): - strlen = ord(data[ptr]) + strlen = data[ptr] str = data[ptr+1:ptr+strlen+1] rv.append(str) ptr = ptr + strlen + 1 return rv def _decode_fontrecord(data, key): - size = ord(data[0]) << 8 | ord(data[1]) - face = ord(data[2]) - namelen = ord(data[4]) + size = data[0] << 8 | data[1] + face = data[2] + namelen = data[4] return size, face, data[5:5+namelen] def _decode_boolean(data, key): @@ -74,7 +74,7 @@ def _decode_charset(data, key): return data[:256], data[256:] def _decode_appspec(data, key): - namelen = ord(data[4]) + namelen = data[4] return data[0:4], data[5:5+namelen] def _code_default(data, key): |