mirror of
https://github.com/vlang/v.git
synced 2023-08-10 21:13:21 +03:00
gg: image: return an optional instead of panic(); darwin: fix nsstring()
This commit is contained in:
9
vlib/darwin/darwin.m
Normal file
9
vlib/darwin/darwin.m
Normal file
@ -0,0 +1,9 @@
|
||||
|
||||
///void NSLog(id x);
|
||||
|
||||
#include <Cocoa/Cocoa.h>
|
||||
|
||||
NSString* nsstring2(string s) {
|
||||
return [ [ NSString alloc ] initWithBytesNoCopy:s.str length:s.len
|
||||
encoding:NSUTF8StringEncoding freeWhenDone: false];
|
||||
}
|
Reference in New Issue
Block a user