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
NSUInteger lengthA = [a length]; | |
NSUInteger lengthB = [b length]; | |
NSUInteger keyLength = lengthA + lengthB + 1; | |
assert(keyLength * sizeof(unichar) < SOME_REASONABLE_MAXIMUM_FOR_STACK_ALLOCATION); | |
unichar cat[keyLength]; | |
[a getCharacters:cat range:NSMakeRange(0, lengthA)]; | |
cat[lengthA] = '.'; | |
[b getCharacters:cat + lengthA + 1 range:NSMakeRange(0, lengthB)]; | |
NSString *key = [[NSString alloc] initWithCharactersNoCopy:cat length:keyLength freeWhenDone:NO]; | |
... [dict objectForKey:key]; |
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
-[XPSettingsView tableView:numberOfRowsInSection:]: | |
00000000000005e0 pushq %rbp | |
00000000000005e1 movq %rsp, %rbp | |
00000000000005e4 movl $0x4, %eax | |
00000000000005e9 popq %rbp | |
00000000000005ea retq |
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 <Foundation/Foundation.h> | |
@interface Foo : NSObject | |
@property (readwrite, copy) void (^array)(); | |
@end | |
@implementation Foo | |
- (id)initWithError:(NSString **)errorHandle; | |
{ |
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
2014-11-13 20:51:24.187 a.out[78021:7001297] int, immediate call of block | |
2014-11-13 20:51:24.188 a.out[78021:7001297] 42 | |
2014-11-13 20:51:24.564 a.out[78025:7001307] int, block called after return | |
2014-11-13 20:51:24.565 a.out[78025:7001307] 42 | |
2014-11-13 20:51:24.921 a.out[78029:7001313] NSString, immediate call of block | |
2014-11-13 20:51:24.922 a.out[78029:7001313] 42 | |
2014-11-13 20:51:25.295 a.out[78033:7001323] NSString, block called after return | |
2014-11-13 20:51:25.297 a.out[78033:7001323] (null) |
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
// c++ -std=c++11 -fobjc-arc -framework Foundation test.mm && ./a.out | |
#import <Foundation/Foundation.h> | |
#import <objc/runtime.h> | |
@interface X : NSObject | |
- (void)method1; | |
- (int)method2:(int)arg; | |
@end |
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
// c++ -g -std=c++11 -fobjc-arc -framework Foundation test.mm && ./a.out | |
#import <Foundation/Foundation.h> | |
#import <objc/runtime.h> | |
@interface X : NSObject | |
- (void)method1; | |
- (int)method2:(int)arg; | |
- (BOOL)method3:(BOOL)arg; |
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 <Foundation/Foundation.h> | |
template<class T> | |
T *objc_faithcast(id u) | |
{ | |
assert([u isKindOfClass:[T class]]); | |
return reinterpret_cast<T *>(u); | |
} | |
template<class T, class U> |
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
switch (condition) | |
{ | |
case constant: | |
{ | |
// code | |
} | |
break; | |
case simply: | |
// code |
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
gl_bindings.rs:17611:30: 17611:56 error: mismatched types: | |
expected `*const libc::types::common::c95::c_void`, | |
found `*const libc::types::common::c95::c_void` | |
(expected enum `libc::types::common::c95::c_void`, | |
found a different enum `libc::types::common::c95::c_void`) [E0308] | |
/Users/keith/Code/Rustermind/target/debug/build/Rustermind-93cd331803113f4a/out/gl_bindings.rs:17611 load_with(|name| loader.get_proc_addr(name)); | |
^~~~~~~~~~~~~~~~~~~~~~~~~~ |
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
__ZN13CVDisplayLink11runIOThreadEv: | |
00002450 pushl %ebp | |
00002451 movl %esp, %ebp | |
00002453 pushl %ebx | |
00002454 pushl %edi | |
00002455 pushl %esi | |
00002456 subl $0x21c, %esp ## imm = 0x21C | |
0000245c calll 0x2461 | |
00002461 popl %edi | |
00002462 movl 0x2dbbf(%edi), %eax |
OlderNewer