X-Git-Url: http://nitlanguage.org diff --git a/lib/cocoa/foundation.nit b/lib/cocoa/foundation.nit index ab027fd..06c8ffd 100644 --- a/lib/cocoa/foundation.nit +++ b/lib/cocoa/foundation.nit @@ -15,7 +15,7 @@ # 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 @@ -35,7 +35,7 @@ end 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]; `}