1
0
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:
Alexander Medvednikov
2020-08-22 17:09:22 +02:00
parent 0bdb096bfa
commit 9e12095111
9 changed files with 101 additions and 66 deletions

9
vlib/darwin/darwin.m Normal file
View 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];
}