X-Git-Url: https://git.m6w6.name/?a=blobdiff_plain;f=docs%2Fhashkit_create.rst;h=a46729a9729cd38f7eb372a4ee1f96c475df9800;hb=1adc67d1609fd71308b822e153dcb08ad7fbf9c2;hp=bf96da751716277eeed2b283336bf181393468cd;hpb=357e1856bb92abd6bef6423f1d95e8afb17a872d;p=awesomized%2Flibmemcached diff --git a/docs/hashkit_create.rst b/docs/hashkit_create.rst index bf96da75..a46729a9 100644 --- a/docs/hashkit_create.rst +++ b/docs/hashkit_create.rst @@ -2,6 +2,8 @@ Creating a hashkit structure ============================ +.. highlightlang:: c + .. index:: object: hashkit_st -------- @@ -12,13 +14,13 @@ SYNOPSIS .. c:type:: hashkit_st -.. c:function:: hashkit_st *hashkit_create(hashkit_st *hash); +.. c:function:: hashkit_st *hashkit_create(hashkit_st *hash) -.. c:function:: hashkit_st *hashkit_clone(hashkit_st *destination, const hashkit_st *ptr); +.. c:function:: hashkit_st *hashkit_clone(hashkit_st *destination, const hashkit_st *ptr) -.. c:function:: void hashkit_free(hashkit_st *hash); +.. c:function:: void hashkit_free(hashkit_st *hash) -.. c:function:: bool hashkit_is_allocated(const hashkit_st *hash); +.. c:function:: bool hashkit_is_allocated(const hashkit_st *hash) Compile and link with -lhashkit @@ -27,19 +29,19 @@ DESCRIPTION ----------- -The :c:func:`hashkit_create()` function initializes a hashkit object for use. If +The :c:func:`hashkit_create` function initializes a hashkit object for use. If you pass a NULL argument for hash, then the memory for the object is allocated. If you specify a pre-allocated piece of memory, that is initialized for use. -The :c:func:`hashkit_clone()` function initializes a hashkit object much like -:c:func:`hashkit_create()`, but instead of using default settings it will use +The :c:func:`hashkit_clone` function initializes a hashkit object much like +:c:func:`hashkit_create`, but instead of using default settings it will use the settings of the ptr hashkit object. -The :c:func:`hashkit_free()` frees any resources being consumed by the hashkit -objects that were initialized with :c:func:`hashkit_create()` or :c:func:`hashkit_clone()`. +The :c:func:`hashkit_free` frees any resources being consumed by the hashkit +objects that were initialized with :c:func:`hashkit_create` or :c:func:`hashkit_clone`. -The :c:func:`hashkit_is_allocated()` reports where the memory was allocated +The :c:func:`hashkit_is_allocated` reports where the memory was allocated for a hashkit object. @@ -48,12 +50,12 @@ RETURN VALUE ------------ -:c:func:`hashkit_create()` and :c:func:`hashkit_clone()` will return NULL on +:c:func:`hashkit_create` and :c:func:`hashkit_clone` will return NULL on failure or non-NULL on success. -:c:func:`hashkit_is_allocated()` returns true if the memory for the hashkit -object was allocated inside of :c:func:`hashkit_create()` or -:c:func:`hashkit_clone()`, otherwise it is false and was user-supplied memory. +:c:func:`hashkit_is_allocated` returns true if the memory for the hashkit +object was allocated inside of :c:func:`hashkit_create` or +:c:func:`hashkit_clone`, otherwise it is false and was user-supplied memory. ----