You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Add support for compiling without the Objective-C runtime. (swiftlang#17)
* Restore Linux support
On Linux, Cocoa strings aren't supported; however, we still support opaque strings via the new _OpaqueString protocol, whose requirements approximate a minimal NSString API. (One use of this would be to allow NSString from the open source Foundation lib to be bridged directly. This isn't implemented yet.)
_OpaqueString's interface is not a subset of NSString; in particular, the method getCharacters(_:, range:) is replaced with copyCodeUnits(from:,into:), to get around dealing with _SwiftNSRange.
_OpaqueString is not yet supported on Apple platforms.
* _NSStringCore: Fix length requirement
Be consistent with Foundation; NSString.length is imported/defined as `var length: Int`, not `func length() -> UInt`.
* _StringGuts: Add file header
* _StringGuts: Add _objectIdentifier property, for testing allocation behavior
Also, update tests that used to rely on _underlyingCocoaString -- it is only available with the Objective-C runtime.
* Fix lowercased()/uppercased() on Linux.
* [test] Relax check for realloc behavior on widening String storage
Widening a String from single-byte to two-byte storage may increase available capacity.
* Add deprecated compatibility definitions for SPI used by swift-corelibs-foundation
0 commit comments