# limitations under the License.
# The Foundation Kit provides basic Objective-C classes and structures
-module foundation is c_linker_option "-framework Foundation"
+module foundation is ldflags "-framework Foundation"
in "ObjC Header" `{
#import <Foundation/Foundation.h>
redef class NativeString
# Get a `NSString` from `self` with the specified `length`
fun to_nsstring(length: Int): NSString in "ObjC" `{
- return [[NSString alloc] initWithBytes:recv
+ return [[NSString alloc] initWithBytes:self
length:length
encoding:NSASCIIStringEncoding];
`}