My C function looks like this:
void *c_shm_create(char*, int);
My .chs
file looks like this:
{-# LANGUAGE ForeignFunctionInterface #-}
module System.Shm.Internal.Bindings
( c_shmCreate
)
where
#include "hs_shm.h"
import C2HS
{#fun unsafe c_shm_create as c_shmCreate
{ `String'
, `Int' } -> `Ptr ()' #}
This is the error I get:
src\System\Shm\Internal\Bindings.chs:12: (column 18) [ERROR] >>> Missing "out" marshaller!
There is no default marshaller for this combination of Haskell and C type:
Haskell type: Ptr ()
C type : (Ptr ())
I can't find any mention for void pointer (Ptr ()
) in the c2hs documentation. How do I marshal this?