Skip to content

Instantly share code, notes, and snippets.

JasonY iJasonY

View GitHub Profile
@iJasonY
iJasonY / main.m
Created Mar 12, 2019 — forked from Skifary/main.m
替换block原有实现
View main.m
#import <Foundation/Foundation.h>
typedef struct __block_impl {
void *isa;
int Flags;
int Reserved;
void *FuncPtr;
}__block_impl;
typedef void(^GlobalBlock)(void);
@iJasonY
iJasonY / main.m
Created Mar 12, 2019 — forked from Skifary/main.m
修改block的实现,先打印参数,再输出原有实现
View main.m
#import <Foundation/Foundation.h>
#import "ffi.h"
NSMutableArray *g_allocations;
ffi_cif g_cif;
ffi_closure *g_closure;
void *g_replacement_invoke;
void *g_origin_invoke;
You can’t perform that action at this time.