Repository navigation
Write and read descriptor data as Mac OS 9.2.2 keeps it - #75
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Lists, records and Apple events keep their data in a handle, and some programs write that data themselves. BBEdit Lite 6.1 appends parameters straight into an event's handle, so a host that stores descriptors any other way makes it fail.
ReferenceTests/Retro68/AEDescLayoutCapture.cand its capture from Mac OS 9.2.2 record the layout; the Retro68 README describes it.Descriptor.classicData()writes a list, record or event as that data, andDescriptor(type:classicData:)reads it back. Numbers are big-endian, so a descriptor made with host numbers goes throughtoBigEndian()first.DescriptorClassicDataTestsreplays the capture byte for byte, except two places where Mac OS leaves earlier memory behind (the long at offset 4 and a pad byte), which the tests clear.The layout of an event nested inside another descriptor wasn't captured, so writing one is
errAEWrongDataType.swift testpassed locally. swift-pef'sblueboxuses these two calls; its change follows once this is merged.