私のC関数は次のようになります。
void *c_shm_create(char*, int);
私の.chs
ファイルは次のようになります。
{-# 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 ()' #}
これは私が得るエラーです:
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 ())
Ptr ()
c2hs のドキュメントにvoid ポインター ( ) に関する言及が見つかりません。これをマーシャリングするにはどうすればよいですか?