]> gitweb @ CieloNegro.org - bindings-apr.git/commitdiff
new header: bindings.apr.ring.h
authorPHO <pho@cielonegro.org>
Tue, 31 Aug 2010 13:37:08 +0000 (22:37 +0900)
committerPHO <pho@cielonegro.org>
Tue, 31 Aug 2010 13:37:08 +0000 (22:37 +0900)
Bindings/APR/MMap.hsc
bindings-apr.cabal
include/bindings.apr.ring.h [new file with mode: 0644]

index 376702d72282669638268e6621c60f9ea3b32659..de1d94d2b11d60ddf4c65131199f09812a64574c 100644 (file)
@@ -1,5 +1,6 @@
 #include <bindings.dsl.h>
 #include <apr_mmap.h>
+#include "bindings.apr.ring.h"
 
 module Bindings.APR.MMap where
 #strict_import
@@ -15,8 +16,7 @@ import Bindings.APR.File.Types
 #  field cntxt    , Ptr <apr_pool_t>
 #  field mm       , Ptr ()
 #  field size     , <apr_size_t>
-#  field link.next, Ptr <apr_mmap_t>
-#  field link.prev, Ptr <apr_mmap_t>
+#  apr_ring_entry_field link, <apr_mmap_t>
 #stoptype
 
 #if APR_HAS_MMAP
index 4da632a8da777c0a2ffaa1d202aef0b0fe564421..4e8628e29693286c2ab3de122604f98c6609d23f 100644 (file)
@@ -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 (file)
index 0000000..68f7bf7
--- /dev/null
@@ -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