Repository navigation
Carbon: one Apple Event Manager, CoreServices', for every Mac program - #464
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.
Phase 2 of
Documentation/Plans/graphite.md, third of three PRs, against master. It removes the last 20 exports Carbon and CoreServices both provided.Before: Carbon's C (
appleevents.c) had its own Apple Event Manager, with its own descriptor storage and handler table, for 32-bit programs. CoreServices' Swift (AppleEvents.swift,AEBuild.swift,AEStream.swift) had a fuller one, but only on x86_64 and arm64. Twenty names were exported by both, and which one a program got depended on the loader's re-export order.After:
Gestaltin phase 1.AEPrintDescToHandleuseGraphiteAppleEvents(GraphiteAppleEvents: descriptors, coercions and handlers PureSwift/Graphite#14) instead of a copy of their own.AEResumeTheCurrentEvent's dispatcher and object accessors are called throughdarwinCallable, so ppc programs' callbacks get Darwin's frame.appleevents.ckeepsAEProcessAppleEvent. Carbon's event loop sendsoappandquitthroughperry_apple_event_send_core, CoreServices' entry for it, found withcarbon_functionasfiles.cfinds_FSPathMakeRef. A quit with no handler still quits.exports.txt: 588 → 568.That completes phase 2's removal of the 26 duplicates: the 6 file calls went in #462, and these 20.
Checks
PerryCarbonandPerryUniformTypeIdentifiers, no warnings in the changed files.Scripts/check-carbon-exports.sh libPerryCarbon.so libPerryUniformTypeIdentifiers.sopasses for the SwiftPM library and the C-only one: 568 exports, as listed, and none of them exported by CoreServices too.