interpreter&vm: handle multi-iterator
[nit.git] / lib / cocoa / foundation.nit
index ab027fd..06c8ffd 100644 (file)
@@ -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 <Foundation/Foundation.h>
@@ -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];
        `}