1 | #import <Foundation/Foundation.h> |
2 | #include <stdio.h> |
3 | |
4 | extern int AddElement (char *value); |
5 | extern char *GetElement (int idx); |
6 | extern void *GetArray(); |
7 | |
8 | int |
9 | main () |
10 | { |
11 | NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init]; |
12 | |
13 | int idx = AddElement (value: "some string" ); |
14 | void *array_token = GetArray(); |
15 | |
16 | char *string = GetElement (idx: 0); // Set breakpoint here, then do 'expr (NSArray*)array_token'. |
17 | if (string) |
18 | printf (format: "This: %s.\n" , string); |
19 | |
20 | [pool release]; |
21 | return 0; |
22 | } |
23 | |