]> gitweb @ CieloNegro.org - bindings-apr.git/blob - Bindings/APR/Allocator.hsc
more bindings
[bindings-apr.git] / Bindings / APR / Allocator.hsc
1 #include <bindings.dsl.h>
2 #include <apr_allocator.h>
3
4 module Bindings.APR.Allocator where
5 #strict_import
6 import Bindings.APR
7 import Bindings.APR.Errno
8
9 #opaque_t apr_allocator_t
10
11 #starttype struct apr_memnode_t
12 #field next       , Ptr <apr_memnode_t>
13 #field ref        , Ptr (Ptr <apr_memnode_t>)
14 #field index      , <apr_uint32_t>
15 #field free_index , <apr_uint32_t>
16 #field first_avail, Ptr CChar
17 #field endp       , Ptr CChar
18 #stoptype
19
20 #num APR_MEMNODE_T_SIZE
21 #num APR_ALLOCATOR_MAX_FREE_UNLIMITED
22
23 #ccall apr_allocator_create , Ptr (Ptr <apr_allocator_t>) -> IO <apr_status_t>
24 #ccall apr_allocator_destroy, Ptr <apr_allocator_t> -> IO ()
25 #ccall apr_allocator_alloc  , Ptr <apr_allocator_t> -> <apr_size_t> -> IO (Ptr <apr_memnode_t>)
26 #ccall apr_allocator_free   , Ptr <apr_allocator_t> -> Ptr <apr_memnode_t> -> IO ()
27
28 -- FIXME: incomplete