Explicitly take the address of potentially-missing weak-linked functions.

This commit is contained in:
Josh Petrie
2015-05-28 18:34:46 -07:00
parent b5f6174c70
commit 4a20795452
2 changed files with 8 additions and 8 deletions
+4 -4
View File
@@ -2076,7 +2076,7 @@ fsEventCallback(ConstFSEventStreamRef streamRef,
#if (MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_5)
if (fsEventStream)
return;
if (NULL == FSEventStreamStart)
if (NULL == &FSEventStreamStart)
return; // FSEvent functions are weakly linked
NSString *path = [@"~/.vim" stringByExpandingTildeInPath];
@@ -2098,7 +2098,7 @@ fsEventCallback(ConstFSEventStreamRef streamRef,
- (void)stopWatchingVimDir
{
#if (MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_5)
if (NULL == FSEventStreamStop)
if (NULL == &FSEventStreamStop)
return; // FSEvent functions are weakly linked
if (fsEventStream) {
@@ -2489,7 +2489,7 @@ fsEventCallback(ConstFSEventStreamRef streamRef,
{
#if (MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_5)
// The TIS symbols are weakly linked.
if (NULL != TISCopyCurrentKeyboardInputSource) {
if (NULL != &TISCopyCurrentKeyboardInputSource) {
// We get here when compiled on >=10.5 and running on >=10.5.
id nc = [NSDistributedNotificationCenter defaultCenter];
@@ -2507,7 +2507,7 @@ fsEventCallback(ConstFSEventStreamRef streamRef,
{
#if (MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_5)
// The TIS symbols are weakly linked.
if (NULL != TISCopyCurrentKeyboardInputSource) {
if (NULL != &TISCopyCurrentKeyboardInputSource) {
// We get here when compiled on >=10.5 and running on >=10.5.
id nc = [NSDistributedNotificationCenter defaultCenter];
+4 -4
View File
@@ -130,7 +130,7 @@ KeyboardInputSourcesEqual(TISInputSourceRef a, TISInputSourceRef b)
ASLogDebug(@"%@", event);
#if (MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_5)
if (NULL == TISCopyCurrentKeyboardInputSource) {
if (NULL == &TISCopyCurrentKeyboardInputSource) {
#endif
// NOTE: Check IM state _before_ key has been interpreted or we'll pick
@@ -787,7 +787,7 @@ KeyboardInputSourcesEqual(TISInputSourceRef a, TISInputSourceRef b)
#if (MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_5)
// The TIS symbols are weakly linked.
if (NULL != TISCopyCurrentKeyboardInputSource) {
if (NULL != &TISCopyCurrentKeyboardInputSource) {
// We get here when compiled on >=10.5 and running on >=10.5.
if (asciiImSource) {
@@ -824,7 +824,7 @@ KeyboardInputSourcesEqual(TISInputSourceRef a, TISInputSourceRef b)
#if (MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_5)
// The TIS symbols are weakly linked.
if (NULL != TISCopyCurrentKeyboardInputSource) {
if (NULL != &TISCopyCurrentKeyboardInputSource) {
// We get here when compiled on >=10.5 and running on >=10.5.
// Enable IM: switch back to input source used when IM was last on
@@ -862,7 +862,7 @@ KeyboardInputSourcesEqual(TISInputSourceRef a, TISInputSourceRef b)
- (void)checkImState
{
#if (MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_5)
if (imControl && NULL != TISCopyCurrentKeyboardInputSource) {
if (imControl && NULL != &TISCopyCurrentKeyboardInputSource) {
// We get here when compiled on >=10.5 and running on >=10.5.
TISInputSourceRef cur = TISCopyCurrentKeyboardInputSource();
BOOL state = !KeyboardInputSourcesEqual(asciiImSource, cur);