Home | History | Annotate | Download | only in include

Lines Matching refs:buf

31 // Creates a new reference to the buffer |buf|. A reference is indistinguishable
33 // and vice versa. In other words, this function creates an alias to |buf|. The
35 // releasing the returned buffer does not release |buf|. |buf| must not be NULL.
36 buffer_t* buffer_new_ref(const buffer_t* buf);
38 // Creates a new reference to the last |slice_size| bytes of |buf|. See
41 // (0 < slice_size <= buffer_length). |buf| must not be NULL.
42 buffer_t* buffer_new_slice(const buffer_t* buf, size_t slice_size);
44 // Frees a buffer object. |buf| may be NULL.
45 void buffer_free(buffer_t* buf);
47 // Returns a pointer to a writeable memory region for |buf|. All references
51 // this function. |buf| must not be NULL.
52 void* buffer_ptr(const buffer_t* buf);
54 // Returns the length of the writeable memory region referred to by |buf|.
55 // |buf| must not be NULL.
56 size_t buffer_length(const buffer_t* buf);