mirror of
https://github.com/darlinghq/darling-corefoundation.git
synced 2024-11-26 21:30:22 +00:00
Move NS run loop mode definitions into CF
This commit is contained in:
parent
b93972862e
commit
60edc4fb97
@ -153,6 +153,7 @@ set(cf_sources
|
||||
NSZombie.m
|
||||
CFForwardingPrep.S
|
||||
FoundationExceptions.m
|
||||
NSRunLoopModes.m
|
||||
)
|
||||
|
||||
add_separated_framework(CoreFoundation
|
||||
|
25
NSRunLoopModes.m
Normal file
25
NSRunLoopModes.m
Normal file
@ -0,0 +1,25 @@
|
||||
//
|
||||
// NSRunLoopModes.m
|
||||
// Foundation
|
||||
//
|
||||
// Copyright (c) 2014 Apportable. All rights reserved.
|
||||
//
|
||||
|
||||
#import <Foundation/NSString.h>
|
||||
#import <CoreFoundation/CFRunLoop.h>
|
||||
|
||||
#import "NSRunLoopModesInternal.h"
|
||||
|
||||
// Forgive me, the loader is not merging NSStrings/CFStrings correctly
|
||||
// This is a VERY hacky workaround.
|
||||
#warning https://code.google.com/p/apportable/issues/detail?id=370
|
||||
|
||||
NSString *NSDefaultRunLoopMode = nil;
|
||||
NSString *NSRunLoopCommonModes = nil;
|
||||
|
||||
static void NSRunLoopModeFix(void) __attribute__((constructor));
|
||||
static void NSRunLoopModeFix(void)
|
||||
{
|
||||
NSDefaultRunLoopMode = (NSString *)kCFRunLoopDefaultMode;
|
||||
NSRunLoopCommonModes = (NSString *)kCFRunLoopCommonModes;
|
||||
}
|
4
NSRunLoopModesInternal.h
Normal file
4
NSRunLoopModesInternal.h
Normal file
@ -0,0 +1,4 @@
|
||||
@class NSString;
|
||||
|
||||
extern NSString *NSDefaultRunLoopMode;
|
||||
extern NSString *NSRunLoopCommonModes;
|
Loading…
Reference in New Issue
Block a user