NSKeyValueCoding: Safe-Caching for -[NSObject valueForKey:] (#445)

* KVC Caching Implementation

* Do not ignore struct name when comparing type encoding as NSPoint and NSSize have the same layout

* Use fast-path when using Objective-C 2

* Guard old ValueForKey function when using the fast-path

* Add basic NSKeyValueCoding tests

* Update Copyright Years

* NSKeyValueCoding+Caching: Add Versioning to IVar Slot

* safe_caching: Remove Guards

* Add type encoding helper header

* Rename geometry structs (NSRect, NSPoint, NSSize) for toll-free bridging with CoreGraphics

* Move CG struct definitions to CFCGTypes.h

* Update known struct encoding prefixes

* Windows 64-bit is LLP64 and not LP64

* Re-order to avoid complier warning

---------

Co-authored-by: rfm <richardfrithmacdonald@gmail.com>
This commit is contained in:
Hugo Melder 2024-10-29 06:12:34 -07:00 committed by GitHub
parent 4f0a8d60c2
commit 6eef1c3289
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
37 changed files with 1549 additions and 49 deletions

Binary file not shown.