--- those functions are for the "global map hax"
--- TODO(bernhard): other solution please
-foreign import ccall "get_trapmap"
- get_trapmap :: IO (Ptr ())
-
-foreign import ccall "set_trapmap"
- set_trapmap :: Ptr () -> IO ()
-
-foreign import ccall "get_methodmap"
- get_methodmap :: IO (Ptr ())
-
-foreign import ccall "set_methodmap"
- set_methodmap :: Ptr () -> IO ()
-
-foreign import ccall "get_classmap"
- get_classmap :: IO (Ptr ())
-
-foreign import ccall "set_classmap"
- set_classmap :: Ptr () -> IO ()
-
-foreign import ccall "get_virtualmap"
- get_virtualmap :: IO (Ptr ())
-
-foreign import ccall "set_virtualmap"
- set_virtualmap :: Ptr () -> IO ()
-
-foreign import ccall "get_stringsmap"
- get_stringsmap :: IO (Ptr ())
-
-foreign import ccall "set_stringsmap"
- set_stringsmap :: Ptr () -> IO ()
-
-foreign import ccall "get_interfacesmap"
- get_interfacesmap :: IO (Ptr ())
-
-foreign import ccall "set_interfacesmap"
- set_interfacesmap :: Ptr () -> IO ()
-
-foreign import ccall "get_interfacemethodmap"
- get_interfacemethodmap :: IO (Ptr ())
-
-foreign import ccall "set_interfacemethodmap"
- set_interfacemethodmap :: Ptr () -> IO ()
+data MateCtx = MateCtx {
+ ctxMethodMap :: MethodMap,
+ ctxTrapMap :: TrapMap,
+ ctxClassMap :: ClassMap,
+ ctxVirtualMap :: VirtualMap,
+ ctxStringMap :: StringMap,
+ ctxInterfaceMap :: InterfaceMap,
+ ctxInterfaceMethodMap :: InterfaceMethodMap }