/[svn]/gigedit/trunk/src/gigedit/MacHelper.mm
ViewVC logotype

Diff of /gigedit/trunk/src/gigedit/MacHelper.mm

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

gigedit/trunk/src/gigedit/MacHelper.m revision 3064 by schoenebeck, Sun Sep 15 18:16:21 2013 UTC gigedit/trunk/src/gigedit/MacHelper.mm revision 3068 by schoenebeck, Mon Jan 2 22:13:01 2017 UTC
# Line 1  Line 1 
1  /*  /*
2      Copyright (c) 2013 Christian Schoenebeck      Copyright (c) 2013 - 2017 Christian Schoenebeck
3            
4      This file is part of "gigedit" and released under the terms of the      This file is part of "gigedit" and released under the terms of the
5      GNU General Public License version 2.      GNU General Public License version 2.
# Line 9  Line 9 
9  #import <Cocoa/Cocoa.h>  #import <Cocoa/Cocoa.h>
10  #import <stdio.h>  #import <stdio.h>
11    
12    #if __clang__
13    # define HAS_OBJC_ARC    __has_feature(objc_arc)
14    #else
15    # define HAS_OBJC_ARC 0
16    #endif
17    
18  @interface MacHelper : NSObject {  @interface MacHelper : NSObject {
19  @public  @public
20      void (*m_fn)(void* info);      void (*m_fn)(void* info);
# Line 43  void macHelperRunCFuncOnMainThread(void Line 49  void macHelperRunCFuncOnMainThread(void
49      printf("perfoming selector on main thread ...\n"); fflush(stdout);      printf("perfoming selector on main thread ...\n"); fflush(stdout);
50      [obj performSelectorOnMainThread:@selector(runCFunc) withObject:obj waitUntilDone:NO];      [obj performSelectorOnMainThread:@selector(runCFunc) withObject:obj waitUntilDone:NO];
51      printf("Selector scheduled async. (on main thread).\n"); fflush(stdout);      printf("Selector scheduled async. (on main thread).\n"); fflush(stdout);
52        #if !HAS_OBJC_ARC
53      [obj release];      [obj release];
54        #endif
55  }  }
56    
57  #if defined(__cplusplus)  #if defined(__cplusplus)

Legend:
Removed from v.3064  
changed lines
  Added in v.3068

  ViewVC Help
Powered by ViewVC