X-Git-Url: http://wien.tomnetworks.com/gitweb/?a=blobdiff_plain;f=ffi%2Ftrap.c;h=0302c5ea0667659c4ce21bd6728c31b49f574a8a;hb=55d3b7af8c3a1fdef0c5e470e649d180dc0a3911;hp=5230c0cc7c1c9f8a867a194def8f833540f71226;hpb=ee844c4902a9511762ae291b2cd9ac21c13f524c;p=mate.git diff --git a/ffi/trap.c b/ffi/trap.c index 5230c0c..0302c5e 100644 --- a/ffi/trap.c +++ b/ffi/trap.c @@ -32,27 +32,17 @@ unsigned int mallocObject(int); #define dprintf(args...) #endif -#define NEW_MAP(prefix) \ - void* prefix ## _map = NULL; \ - void set_ ## prefix ## map(void *map) \ - { \ - dprintf("set_%s: 0x%08x\n", #prefix , (unsigned int) map); \ - prefix ## _map = map; \ - } \ - void *get_ ## prefix ## map() \ - { \ - dprintf("get_%s: 0x%08x\n", #prefix , (unsigned int) prefix ## _map); \ - return prefix ## _map; \ - } +void *mate_ctx = NULL; -NEW_MAP(method) -NEW_MAP(trap) -NEW_MAP(class) -NEW_MAP(virtual) -NEW_MAP(strings) -NEW_MAP(interfaces) -NEW_MAP(interfacemethod) +void *get_mate_context() +{ + return mate_ctx; +} +void *set_mate_context(void *ctx) +{ + mate_ctx = ctx; +} void mainresult(unsigned int a) {