This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
void foo(id self, SEL _cmd); | |
void foo(id self, SEL _cmd) | |
{ | |
NSLog(@"foo"); | |
} | |
- (void)applicationDidFinishLaunching:(NSNotification *)aNotification | |
{ | |
NSString * flubber = @"flubber"; | |
void (^barGlobal)(void) = ^{ NSLog(@"bar"); }; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/opt/bin/perl -w | |
package IRC::Bot2; | |
use strict; | |
use warnings; | |
use Moose; | |
extends 'IRC::Bot'; | |
use IRC::Bot::Log::Extended; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env perl | |
# You can use this script in a pipe. It's input will become an emacs buffer | |
# via emacsclient (so you need server-start etc.) | |
# See http://mark.aufflick.com/o/886457 for more information | |
# Copyright (C) 2011 by Mark Aufflick <mark@aufflick.com> | |
# | |
# Permission is hereby granted, free of charge, to any person obtaining a copy |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
gen/wxe_events.cpp: In function 'void initEventTable()': | |
gen/wxe_events.cpp:277: error: 'wxEVT_COMMAND_AUINOTEBOOK_TAB_MIDDLE_DOWN' was not declared in this scope | |
gen/wxe_events.cpp:278: error: 'wxEVT_COMMAND_AUINOTEBOOK_TAB_MIDDLE_UP' was not declared in this scope | |
gen/wxe_events.cpp:279: error: 'wxEVT_COMMAND_AUINOTEBOOK_TAB_RIGHT_DOWN' was not declared in this scope | |
gen/wxe_events.cpp:280: error: 'wxEVT_COMMAND_AUINOTEBOOK_TAB_RIGHT_UP' was not declared in this scope | |
gen/wxe_events.cpp:281: error: 'wxEVT_COMMAND_AUINOTEBOOK_PAGE_CLOSED' was not declared in this scope | |
gen/wxe_events.cpp:282: error: 'wxEVT_COMMAND_AUINOTEBOOK_DRAG_DONE' was not declared in this scope | |
gen/wxe_events.cpp:283: error: 'wxEVT_COMMAND_AUINOTEBOOK_BG_DCLICK' was not declared in this scope | |
make[3]: *** [i386-apple-darwin9.8.0/wxe_events.o] Error 1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
release: NSInvocation | |
autorelease: UINavigationItem | |
release: GHUnitIPhoneViewController | |
autorelease: UINavigationButton | |
release: NSInvocation | |
autorelease: UINavigationItem | |
release: NSMethodSignature | |
autorelease: NSCFString | |
release: NSThread |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#0 0x90f4ced7 in objc_msgSend | |
#1 0x03d25400 in ?? | |
#2 0x00002754 in -[CJTestCJCard testBInsert] at CJTestCJCard.m:91 | |
#3 0x0000dfc2 in +[GHTesting runTestWithTarget:selector:exception: | |
interval:reraiseExceptions:] at GHTesting.m:245 | |
#4 0x0000e6fd in -[GHTest run:] at GHTest.m:205 | |
#5 0x0000fbec in -[GHTestGroup _run:] at GHTestGroup.m:304 | |
#6 0x0000fbec in -[GHTestGroup _run:] at GHTestGroup.m:304 | |
#7 0x0001199b in -[GHTestRunner runTests] at GHTestRunner.m:132 | |
#8 0x000115c9 in -[GHTestRunner _runInBackground] at GHTestRunner.m:150 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@implementation CJTestCJCard | |
- (void)setUpClass { | |
// swap the release implementations | |
Method releaseMethod = class_getInstanceMethod([NSObject class], | |
@selector(release)); | |
Method releaseLogMethod = class_getInstanceMethod([NSObject class], | |
@selector(releaseLog)); | |
IMP origReleaseImp = method_setImplementation(releaseMethod, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#import <objc/objc-class.h> | |
@implementation NSObject (override) | |
- (void) releaseLog | |
{ | |
fprintf(stderr, "release: %s\n", class_getName([self class])); | |
// now call the original implementation (swapped with releaseLog) | |
// to actually effect the release | |
[self releaseLog]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- (void) testBInsert | |
{ | |
NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init]; | |
for (int i=0 ; i < 10 ; i++) { | |
CJCard *card = [[CJCard alloc] init]; | |
card.name = [NSString stringWithFormat:@"card %d", i]; | |
card.type = CJCARD_OTHER_STRING; | |
[card commit]; | |
[card release]; |
NewerOlder