Overview
Comment: | Move global block to global scope.
Some old clang revisions do not create global blocks in local scopes. |
---|---|
Downloads: | Tarball | ZIP archive | SQL archive |
Timelines: | family | ancestors | descendants | both | trunk |
Files: | files | file ages | folders |
SHA3-256: |
86c967829f7c6ce193eac0888c9e0465 |
User & Date: | js on 2010-12-27 01:15:36 |
Other Links: | manifest | tags |
Context
2010-12-27
| ||
01:29 | Update PLATFORMS. check-in: d3c3a28b6b user: js tags: trunk | |
01:15 | Move global block to global scope. check-in: 86c967829f user: js tags: trunk | |
2010-12-26
| ||
23:53 | Update buildsys. check-in: 30e655261a user: js tags: trunk | |
Changes
Modified tests/OFBlockTests.m from [a7923e2912] to [a4019c97d2].
︙ | ︙ | |||
28 29 30 31 32 33 34 35 36 37 38 39 40 41 | #import "TestsAppDelegate.h" static OFString *module = @"OFBlock"; extern void *_NSConcreteStackBlock; extern void *_NSConcreteGlobalBlock; extern void *_NSConcreteMallocBlock; @implementation TestsAppDelegate (OFBlockTests) - (void)blockTests { OFAutoreleasePool *pool = [[OFAutoreleasePool alloc] init]; __block int x; void (^s)() = ^ { x = 0; }; | > > < | 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 | #import "TestsAppDelegate.h" static OFString *module = @"OFBlock"; extern void *_NSConcreteStackBlock; extern void *_NSConcreteGlobalBlock; extern void *_NSConcreteMallocBlock; static void (^g)() = ^ {}; @implementation TestsAppDelegate (OFBlockTests) - (void)blockTests { OFAutoreleasePool *pool = [[OFAutoreleasePool alloc] init]; __block int x; void (^s)() = ^ { x = 0; }; void (^m)(); TEST(@"Class of stack block", (Class)&_NSConcreteStackBlock == objc_getClass("OFStackBlock") && [s isKindOfClass: [OFBlock class]]) TEST(@"Class of global block", |
︙ | ︙ |