search for: block_release

Displaying 2 results from an estimated 2 matches for "block_release".

Did you mean: lock_release
2009 Sep 22
0
[LLVMdev] Status of blocks runtime in compiler-rt?
...> #include <stdlib.h> #include <Block.h> int main(int argc, char *argv[]) { int x = 123; void (^printXAndY)(int) = ^(int y) { printf("%d %d\n", x, y); }; void (^copyPrintXAndY)(int) = Block_copy(printXAndY); copyPrintXAndY(456); // prints: 123 456 Block_release(copyPrintXAndY); return 0; } $ clang -I$PREFIX/include -fblocks -c foo.c $ clang -L$PREFIX/lib -Wl,-rpath,$PREFIX/lib -o foo foo.o - lBlocksRuntime $ ./foo 123 456 $ I've also tried similar steps on Ubuntu Linux, as well as with llvm- gcc-4.2, which also worked. Shantonu Sen ssen at a...
2009 Sep 16
3
[LLVMdev] Status of blocks runtime in compiler-rt?
The Blocks language and implementation specifications are checked into clang/docs. More generally, on Mac OS X, the blocks runtime is linked into the C library ("libSystem"), and available to the entire OS. Clients that create blocks may implicitly get compiler-generated calls to some of the runtime functions, and the developer may also make explicit calls to, e.g.,