Repository navigation
Conversation
…SObject category The UIImage selectors were declared as a category on NSObject, which adds them to NSObject and NSImage for every translation unit that sees the header. Declare a protocol and cast to it at the call sites instead. The class lookup now also honours the requested system (NSImage for AppKit, UIImage otherwise) and is no longer cached in statics. (cherry picked from commit 9a67fb2)
Author
|
Cold review: FIX-NEEDED on wording, now fixed in the PR title and body: this is a behaviour fix (macOS with a non-AppKit system now selects UIImage), not a pure refactor. Code otherwise reads correct (system is a parameter in scope). Not compiled. |
This branch has not been deployed
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.
Summary
RFC, draft, unbuilt.
system(NSImage for AppKit, UIImage otherwise) instead of caching one class in statics.Impact to review: on macOS with a non-AppKit
systemthe class changes from NSImage to UIImage, which fixes an unrecognized-selector path but raises if UIKit is not loaded. iOS and visionOS only lose the cache.Verification
Run: the commit cherry-picks cleanly onto current main; a cold review read the call sites. Not run: no compiler was available, so this was not compiled. CONTRIBUTING.md asks for an issue first for large work; this is one concern. Related RFC draft: #1246.