Skip to content

Commit

Permalink
fix docs to new ring_array_destroy semantics (twitter#163)
Browse files Browse the repository at this point in the history
  • Loading branch information
slyphon authored and kevyang committed Jul 19, 2018
1 parent 95e04b0 commit b39086d
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions docs/modules/cc_ring_array.rst
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ Synopsis
ring_array_create(size_t elem_size, uint32_t cap);
void
ring_array_destroy(struct ring_array *arr);
ring_array_destroy(struct ring_array **arr);
rstatus_i
ring_array_push(const void *elem, struct ring_array *arr);
Expand All @@ -33,7 +33,7 @@ Creation/Destruction
.. code-block:: C
struct ring_array *ring_array_create(size_t elem_size, uint32_t cap);
void ring_array_destroy(struct ring_array *arr);
void ring_array_destroy(struct ring_array **arr);
In order to create a ccommon ``ring_array`` data structure, call ``ring_array_create()`` with ``elem_size`` as the ``sizeof`` the elements the ``ring_array`` contains and with ``cap`` as the maximum number of elements the ``ring_array`` should be able to hold. This function returns a pointer to the ``ring_array`` that it creates.

Expand Down Expand Up @@ -99,7 +99,7 @@ Hello World! with ccommon ``ring_array``:
}
/* Destroy ring_array */
ring_array_destroy(arr);
ring_array_destroy(&arr);
return 0;
}

0 comments on commit b39086d

Please sign in to comment.