brintos

brintos / llvm-project-archived public Read only

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