X-Git-Url: https://git.m6w6.name/?a=blobdiff_plain;f=libmemcached%2Fallocators.h;h=b525e9016cbdf16799dadf4ee6986640e553a603;hb=f283b947353ca50d35adad5326700df66a86c1a5;hp=d22bc65235d23b1d23c5b61de86eecba48feb50b;hpb=8f36e509f6130022162abf7cde7e6c8acbbe224c;p=awesomized%2Flibmemcached diff --git a/libmemcached/allocators.h b/libmemcached/allocators.h index d22bc652..b525e901 100644 --- a/libmemcached/allocators.h +++ b/libmemcached/allocators.h @@ -9,8 +9,8 @@ * */ -#ifndef __MEMCACHED_ALLOCATORS_H__ -#define __MEMCACHED_ALLOCATORS_H__ +#ifndef __LIBMEMCACHED_ALLOCATORS_H__ +#define __LIBMEMCACHED_ALLOCATORS_H__ #ifdef __cplusplus extern "C" { @@ -21,18 +21,36 @@ memcached_return_t memcached_set_memory_allocators(memcached_st *ptr, memcached_malloc_fn mem_malloc, memcached_free_fn mem_free, memcached_realloc_fn mem_realloc, - memcached_calloc_fn mem_calloc); + memcached_calloc_fn mem_calloc, + void *context); LIBMEMCACHED_API -void memcached_get_memory_allocators(memcached_st *ptr, +void memcached_get_memory_allocators(const memcached_st *ptr, memcached_malloc_fn *mem_malloc, memcached_free_fn *mem_free, memcached_realloc_fn *mem_realloc, memcached_calloc_fn *mem_calloc); +LIBMEMCACHED_API +void *memcached_get_memory_allocators_context(const memcached_st *ptr); + +LIBMEMCACHED_LOCAL +void _libmemcached_free(const memcached_st *ptr, void *mem, void *context); + +LIBMEMCACHED_LOCAL +void *_libmemcached_malloc(const memcached_st *ptr, const size_t size, void *context); + +LIBMEMCACHED_LOCAL +void *_libmemcached_realloc(const memcached_st *ptr, void *mem, const size_t size, void *context); + +LIBMEMCACHED_LOCAL +void *_libmemcached_calloc(const memcached_st *ptr, size_t nelem, size_t size, void *context); + +LIBMEMCACHED_LOCAL +struct _allocators_st memcached_allocators_return_default(void); #ifdef __cplusplus } #endif -#endif /* __MEMCACHED_ALLOCATORS_H__ */ +#endif /* __LIBMEMCACHED_ALLOCATORS_H__ */