tech-userlevel archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

prop_number(3) and portability of externalized plists


I'm bothered by the unconventional (for a Apple plists anyway) encoding
of unsigned integers in externalized proplib(3) plists.

At least Python's plistlib is unequiped to handle internalizing and
reexternalizing such numbers in base-16.

Is there a reason we absolutely need to have this
contrary-to-comment-in-Apple's-DTD encoding?

It seems to me that the unsigned attribute does not need to be
exposed outside of proplib.  When proplib internalizes a number
beyond INT64_MAX it can mark it as unsigned, and thus then later
externalize it as the same base-10 number.  The only difference I
can see such a change making is prop_number_unsigned(3) would
only claim a number beyond INT64_MAX was unsigned, but this
does not seem like it would be relied upon in existing code.

        Jonathan Kollasch

Home | Main Index | Thread Index | Old Index