Skip to content

Instantly share code, notes, and snippets.

View phausler's full-sized avatar

Philippe Hausler phausler

View GitHub Profile
@phausler
phausler / gist:7079724
Created October 21, 2013 07:05
example bridge callbacks
/*
Foo.java
*/
package com.apportable.example;
...
public class Foo {
public static void initialize(Activity activity, String appId) {
@phausler
phausler / gist:6725188
Created September 27, 2013 07:21
just because...
#import <objc/message.h>
typedef struct class_t {
struct class_t *isa;
struct class_t *superclass;
void *cache;
IMP *vtable;
uintptr_t data_NEVER_USE;
} class_t;
@phausler
phausler / gist:6058774
Last active December 20, 2015 02:49
NEVER EVER DO THIS!
struct BlockObject {
Class isa;
int retainCount;
struct BlockObject *(^alloc)();
struct BlockObject *(^init)();
struct BlockObject *(^retain)();
void (^release)();
struct BlockObject *(^autorelease)();
void (^dealloc)();
} BlockObject = {