From: PHO Date: Tue, 31 Aug 2010 13:37:08 +0000 (+0900) Subject: new header: bindings.apr.ring.h X-Git-Tag: RELEASE-0.1~6 X-Git-Url: https://git.cielonegro.org/gitweb.cgi?a=commitdiff_plain;h=bcd52d085f2d06edab7dd48046202df59a626ea7;p=bindings-apr.git new header: bindings.apr.ring.h --- diff --git a/Bindings/APR/MMap.hsc b/Bindings/APR/MMap.hsc index 376702d..de1d94d 100644 --- a/Bindings/APR/MMap.hsc +++ b/Bindings/APR/MMap.hsc @@ -1,5 +1,6 @@ #include #include +#include "bindings.apr.ring.h" module Bindings.APR.MMap where #strict_import @@ -15,8 +16,7 @@ import Bindings.APR.File.Types # field cntxt , Ptr # field mm , Ptr () # field size , -# field link.next, Ptr -# field link.prev, Ptr +# apr_ring_entry_field link, #stoptype #if APR_HAS_MMAP diff --git a/bindings-apr.cabal b/bindings-apr.cabal index 4da632a..4e8628e 100644 --- a/bindings-apr.cabal +++ b/bindings-apr.cabal @@ -77,5 +77,11 @@ Library cbits/helper_apr_user.c cbits/helper_apr_version.c + Include-Dirs: + include + + Install-Includes: + include/bindings.apr.ring.h + Extensions: ForeignFunctionInterface diff --git a/include/bindings.apr.ring.h b/include/bindings.apr.ring.h new file mode 100644 index 0000000..68f7bf7 --- /dev/null +++ b/include/bindings.apr.ring.h @@ -0,0 +1,14 @@ +#ifndef __BINDINGS_APR_RING_H__ +#define __BINDINGS_APR_RING_H__ + +#define hsc_apr_ring_entry_field(NAME, TYPE) \ + hsc_field(NAME.next, Ptr TYPE) \ + hsc_field(NAME.prev, Ptr TYPE) + +#define hsc_apr_ring_head_t(NAME, TYPE) \ + hsc_starttype(NAME) \ + hsc_field(next, Ptr TYPE) \ + hsc_field(prev, Ptr TYPE) \ + hsc_stoptype(dummy) + +#endif