]> gitweb @ CieloNegro.org - bindings-apr-util.git/commitdiff
Bindings.APR.StrMatch
authorPHO <pho@cielonegro.org>
Wed, 6 Oct 2010 14:00:47 +0000 (23:00 +0900)
committerPHO <pho@cielonegro.org>
Wed, 6 Oct 2010 14:00:47 +0000 (23:00 +0900)
Bindings/APR/StrMatch.hsc [new file with mode: 0644]
bindings-apr-util.cabal
cbits/helper_apr_strmatch.c [new file with mode: 0644]

diff --git a/Bindings/APR/StrMatch.hsc b/Bindings/APR/StrMatch.hsc
new file mode 100644 (file)
index 0000000..298fa8f
--- /dev/null
@@ -0,0 +1,18 @@
+#include <bindings.dsl.h>
+#include <apr_strmatch.h>
+
+module Bindings.APR.StrMatch where
+#strict_import
+import Bindings.APR
+import Bindings.APR.Pools
+
+#starttype struct apr_strmatch_pattern
+#  field compare, FunPtr (Ptr <apr_strmatch_pattern> -> Ptr CChar -> <apr_size_t> -> IO (Ptr CChar))
+#  field pattern, Ptr CChar
+#  field length , <apr_size_t>
+#  field context, Ptr ()
+#stoptype
+
+#cinline apr_strmach, Ptr <apr_strmatch_pattern> -> Ptr CChar -> <apr_size_t> -> IO (Ptr CChar)
+
+#ccall apr_strmatch_precompile, Ptr <apr_pool_t> -> Ptr CChar -> CInt -> IO (Ptr <apr_strmatch_pattern>)
index 9b5aed583d696a12a5af29440c872148ad981e26..b7d1c24e4f769d828050cd152f188ba65404fea8 100644 (file)
@@ -50,6 +50,7 @@ Library
         Bindings.APR.ResList
         Bindings.APR.SDBM
         Bindings.APR.SHA1
+        Bindings.APR.StrMatch
         Bindings.APR.XLate
 
     C-Sources:
@@ -61,6 +62,7 @@ Library
         cbits/helper_apr_md4.c
         cbits/helper_apr_sdbm.c
         cbits/helper_apr_sha1.c
+        cbits/helper_apr_strmatch.c
 
     Extensions:
         ForeignFunctionInterface
diff --git a/cbits/helper_apr_strmatch.c b/cbits/helper_apr_strmatch.c
new file mode 100644 (file)
index 0000000..d89d1f5
--- /dev/null
@@ -0,0 +1,4 @@
+#include <bindings.cmacros.h>
+#include <apr_strmatch.h>
+
+BC_INLINE3(apr_strmatch, const apr_strmatch_pattern*, const char*, apr_size_t, const char*)