1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40
| void test { auto int a = 10; static int b = 10; block = ^{ NSLog(@"age is %d, height is %d", a, b); }; }
struct __test_block_impl_0 { struct __block_impl impl; struct __test_block_desc_0* Desc; int a; int *b; __test_block_impl_0(void *fp, struct __test_block_desc_0 *desc, int _a, int *_b, int flags=0) : a(_a), b(_b) { impl.isa = &_NSConcreteStackBlock; impl.Flags = flags; impl.FuncPtr = fp; Desc = desc; } }; static void __test_block_func_0(struct __test_block_impl_0 *__cself) { int a = __cself->a; int *b = __cself->b;
NSLog((NSString *)&__NSConstantStringImpl__var_folders_2r__m13fp2x2n9dvlr8d68yry500000gn_T_main_fd2a14_mi_0, a, (*b)); }
static struct __test_block_desc_0 { size_t reserved; size_t Block_size; } __test_block_desc_0_DATA = { 0, sizeof(struct __test_block_impl_0)};
void test() { auto int a = 10; static int b = 10; block = ((void (*)())&__test_block_impl_0((void *)__test_block_func_0, &__test_block_desc_0_DATA, a, &b)); }
|