]> 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.Allocator.Types
8 import Bindings.APR.Errno
9 import Bindings.APR.Thread.Mutex
10 import Bindings.APR.Pools
11
12 #num APR_MEMNODE_T_SIZE
13 #num APR_ALLOCATOR_MAX_FREE_UNLIMITED
14
15 #ccall apr_allocator_create , Ptr (Ptr <apr_allocator_t>) -> IO <apr_status_t>
16 #ccall apr_allocator_destroy, Ptr <apr_allocator_t> -> IO ()
17 #ccall apr_allocator_alloc  , Ptr <apr_allocator_t> -> <apr_size_t> -> IO (Ptr <apr_memnode_t>)
18 #ccall apr_allocator_free   , Ptr <apr_allocator_t> -> Ptr <apr_memnode_t> -> IO ()
19
20 #ccall apr_allocator_owner_set, Ptr <apr_allocator_t> -> Ptr <apr_pool_t> -> IO ()
21 #ccall apr_allocator_owner_get, Ptr <apr_allocator_t> -> IO (Ptr <apr_pool_t>)
22
23 #ccall apr_allocator_max_free_set, Ptr <apr_allocator_t> -> <apr_size_t> -> IO ()
24
25 #ccall apr_allocator_mutex_set, Ptr <apr_allocator_t> -> Ptr <apr_thread_mutex_t> -> IO ()
26 #ccall apr_allocator_mutex_get, Ptr <apr_allocator_t> -> IO (Ptr <apr_thread_mutex_t>)