• Home
  • History
  • Annotate
  • only in this directory
1/*
2 * Copyright (c) 2010 Apple Inc. All rights reserved.
3 *
4 * @APPLE_LLVM_LICENSE_HEADER@
5 */
6
7// TEST_CFLAGS -framework Foundation
8
9#import <Foundation/Foundation.h>
10#import <Block_private.h>
11#import "test.h"
12
13typedef void (^void_block_t)(void);
14
15int main () {
16    void_block_t c = ^{ NSLog(@"Hello!"); };
17
18    //printf("global block c looks like: %s\n", _Block_dump(c));
19    int j;
20    for (j = 0; j < 1000; j++)
21    {
22        void_block_t d = [c copy];
23        //if (j == 0) printf("copy looks like %s\n", _Block_dump(d));
24        [d release];
25    }
26
27    succeed(__FILE__);
28}
29