source: trunk/dports/editors/bean/files/ApplicationDelegate.m.diff @ 75698

Last change on this file since 75698 was 75698, checked in by jmr@…, 9 years ago

bean: update to 2.4.2

File size: 1.1 KB
  • ApplicationDelegate.m

    old new  
    5959                {
    6060                        //NSLog(@"TIGER SWIZZLE");
    6161                        //Tiger only code -- method_types and method_imp are deprecated on Leopard
     62#if defined(MAC_OS_X_VERSION_MIN_REQUIRED) && MAC_OS_X_VERSION_MIN_REQUIRED < 1050
    6263                        char *temp1;
    6364                        IMP temp2;
    6465                        temp1 = orig_method->method_types;
     
    6869                        temp2 = orig_method->method_imp;
    6970                        orig_method->method_imp = alt_method->method_imp;
    7071                        alt_method->method_imp = temp2;
     72#endif
    7173                }
    7274                else
    7375                {
     76#if defined(MAC_OS_X_VERSION_MIN_REQUIRED) && MAC_OS_X_VERSION_MIN_REQUIRED >= 1050
    7477                        //NSLog(@"LEOPARD SWIZZLE");
    7578                        //these obj-c 2.0 runtime msg's work on Leopard only -- see CocoaDev: Swizzle
    7679                        if(class_addMethod(c, orig_sel, method_getImplementation(alt_method), method_getTypeEncoding(alt_method)))
    7780                                class_replaceMethod(c, alt_sel, method_getImplementation(orig_method), method_getTypeEncoding(orig_method));
    7881                        else
    7982                                method_exchangeImplementations(orig_method, alt_method);
     83#endif
    8084                }
    8185        } else NSLog(@"Attempt to swizzle nonexistent methods!");
    8286}
Note: See TracBrowser for help on using the repository browser.