diff options
author | Ronald Oussoren <ronaldoussoren@mac.com> | 2014-02-06 10:19:18 (GMT) |
---|---|---|
committer | Ronald Oussoren <ronaldoussoren@mac.com> | 2014-02-06 10:19:18 (GMT) |
commit | 94e44a935b3dc1e67a6a3357f64324ee0c81d40c (patch) | |
tree | 7c8a8cb61491ec46dbe5e2042aa7fcaee4785fab /Mac/Tools | |
parent | 3dcb0cf9b195afc9d3a5c79f8b0a6cd755bc7bd0 (diff) | |
download | cpython-94e44a935b3dc1e67a6a3357f64324ee0c81d40c.zip cpython-94e44a935b3dc1e67a6a3357f64324ee0c81d40c.tar.gz cpython-94e44a935b3dc1e67a6a3357f64324ee0c81d40c.tar.bz2 |
Issue #14455: fix handling of unsigned long long values for binary plist files
Values in the range of an unsigned long long, but outside of the range
of a signed long long were serialized as a negative value.
Due to a bug in PyObjC my test scripts indicated that the previous behavior
matched Apple's plist code, instead the handle large unsigned values correctly.
The change to plistlib.py is from a patch by Serhiy.
Diffstat (limited to 'Mac/Tools')
-rwxr-xr-x | Mac/Tools/plistlib_generate_testdata.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/Mac/Tools/plistlib_generate_testdata.py b/Mac/Tools/plistlib_generate_testdata.py index 68d4d74..057b617 100755 --- a/Mac/Tools/plistlib_generate_testdata.py +++ b/Mac/Tools/plistlib_generate_testdata.py @@ -1,6 +1,6 @@ #!/usr/bin/env python3 -from Cocoa import NSMutableDictionary, NSMutableArray, NSString, NSDate +from Cocoa import NSMutableDictionary, NSMutableArray, NSString, NSDate, NSNumber from Cocoa import NSPropertyListSerialization, NSPropertyListOpenStepFormat from Cocoa import NSPropertyListXMLFormat_v1_0, NSPropertyListBinaryFormat_v1_0 from Cocoa import CFUUIDCreateFromString, NSNull, NSUUID, CFPropertyListCreateData @@ -30,6 +30,7 @@ def main(): seconds = datetime.datetime(2004, 10, 26, 10, 33, 33, tzinfo=datetime.timezone(datetime.timedelta(0))).timestamp() pl[nsstr('aBigInt')] = 2 ** 63 - 44 + pl[nsstr('aBigInt2')] = NSNumber.numberWithUnsignedLongLong_(2 ** 63 + 44) pl[nsstr('aDate')] = NSDate.dateWithTimeIntervalSince1970_(seconds) pl[nsstr('aDict')] = d = OrderedDict() |