mirror of
https://github.com/python/cpython.git
synced 2025-07-16 07:45:20 +00:00
Changes in anticipation of stricter str vs. bytes enforcement.
This commit is contained in:
parent
739e2ad64b
commit
09549f4407
9 changed files with 97 additions and 115 deletions
|
@ -191,8 +191,8 @@ class BinHex:
|
|||
nl = len(name)
|
||||
if nl > 63:
|
||||
raise Error, 'Filename too long'
|
||||
d = bytes([nl]) + bytes(name) + b'\0'
|
||||
d2 = bytes(finfo.Type) + bytes(finfo.Creator)
|
||||
d = bytes([nl]) + name.encode("latin-1") + b'\0'
|
||||
d2 = bytes(finfo.Type, "ascii") + bytes(finfo.Creator, "ascii")
|
||||
|
||||
# Force all structs to be packed with big-endian
|
||||
d3 = struct.pack('>h', finfo.Flags)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue