mirror of
https://github.com/c3lang/c3c.git
synced 2026-02-27 12:01:16 +00:00
Better lowering of distinct types. Noreturn function call expr recognized as a "jump" for escape analysis. Preferring "def" in libs. To upper / to lower for ascii. Initial dynlib support.
This commit is contained in:
committed by
Christoffer Lerno
parent
a877d4458c
commit
ddd0497922
@@ -2,9 +2,9 @@ module std::os::macos::cf;
|
||||
|
||||
$if env::os_is_darwin():
|
||||
|
||||
typedef CFAllocatorRef = distinct void*;
|
||||
typedef CFAllocatorContextRef = distinct void*;
|
||||
typedef CFOptionFlags = usz;
|
||||
def CFAllocatorRef = distinct void*;
|
||||
def CFAllocatorContextRef = distinct void*;
|
||||
def CFOptionFlags = usz;
|
||||
|
||||
macro CFAllocatorRef default_allocator() => _macos_CFAllocatorGetDefault();
|
||||
macro void CFAllocatorRef.dealloc(CFAllocatorRef allocator, void* ptr) => _macos_CFAllocatorDeallocate(allocator, ptr);
|
||||
|
||||
@@ -2,9 +2,9 @@ module std::os::macos::cf;
|
||||
|
||||
$if env::os_is_darwin():
|
||||
|
||||
typedef CFArrayRef = distinct void*;
|
||||
typedef CFArrayCallBacksRef = distinct void*;
|
||||
typedef CFMutableArrayRef = distinct void*;
|
||||
def CFArrayRef = distinct void*;
|
||||
def CFArrayCallBacksRef = distinct void*;
|
||||
def CFMutableArrayRef = distinct void*;
|
||||
extern fn CFArrayRef _macos_CFArrayCreate(CFAllocatorRef allocator, void** values, CFIndex num_values, CFArrayCallBacksRef callBacks) @extern("CFArrayCreate");
|
||||
extern fn CFArrayRef _macos_CFArrayCopy(CFAllocatorRef allocator, CFArrayRef array) @extern("CFArrayCopy");
|
||||
extern fn CFIndex _macos_CFArrayGetCount(CFArrayRef array) @extern("CFArrayGetCount");
|
||||
|
||||
@@ -2,8 +2,8 @@ module std::os::macos::cf;
|
||||
|
||||
$if env::os_is_darwin():
|
||||
|
||||
typedef CFTypeRef = distinct void*;
|
||||
typedef CFIndex = isz;
|
||||
def CFTypeRef = distinct void*;
|
||||
def CFIndex = isz;
|
||||
struct CFRange
|
||||
{
|
||||
CFIndex location;
|
||||
|
||||
@@ -2,10 +2,10 @@ module std::os::macos::objc;
|
||||
|
||||
$if env::os_is_darwin():
|
||||
|
||||
typedef Class = distinct void*;
|
||||
typedef Method = distinct void*;
|
||||
typedef Ivar = distinct void*;
|
||||
typedef Selector = distinct void*;
|
||||
def Class = distinct void*;
|
||||
def Method = distinct void*;
|
||||
def Ivar = distinct void*;
|
||||
def Selector = distinct void*;
|
||||
|
||||
fault ObjcFailure
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user