src/cx/buffer.h

changeset 989
8aa57a7fecc4
parent 985
68754c7de906
child 1004
d8044fd5005c
equal deleted inserted replaced
988:15b3ca7ee33f 989:8aa57a7fecc4
149 * @param buffer the buffer to initialize 149 * @param buffer the buffer to initialize
150 * @param space pointer to the memory area, or \c NULL to allocate 150 * @param space pointer to the memory area, or \c NULL to allocate
151 * new memory 151 * new memory
152 * @param capacity the capacity of the buffer 152 * @param capacity the capacity of the buffer
153 * @param allocator the allocator this buffer shall use for automatic 153 * @param allocator the allocator this buffer shall use for automatic
154 * memory management. If \c NULL, the default heap allocator will be used. 154 * memory management
155 * (if \c NULL, a default stdlib allocator will be used)
155 * @param flags buffer features (see cx_buffer_s.flags) 156 * @param flags buffer features (see cx_buffer_s.flags)
156 * @return zero on success, non-zero if a required allocation failed 157 * @return zero on success, non-zero if a required allocation failed
157 */ 158 */
158 cx_attr_nonnull_arg(1) 159 cx_attr_nonnull_arg(1)
159 int cxBufferInit( 160 int cxBufferInit(
199 * 200 *
200 * @param space pointer to the memory area, or \c NULL to allocate 201 * @param space pointer to the memory area, or \c NULL to allocate
201 * new memory 202 * new memory
202 * @param capacity the capacity of the buffer 203 * @param capacity the capacity of the buffer
203 * @param allocator the allocator to use for allocating the structure and the automatic 204 * @param allocator the allocator to use for allocating the structure and the automatic
204 * memory management within the buffer. If \c NULL, the default heap allocator will be used. 205 * memory management within the buffer
206 * (if \c NULL, a default stdlib allocator will be used)
205 * @param flags buffer features (see cx_buffer_s.flags) 207 * @param flags buffer features (see cx_buffer_s.flags)
206 * @return a pointer to the buffer on success, \c NULL if a required allocation failed 208 * @return a pointer to the buffer on success, \c NULL if a required allocation failed
207 */ 209 */
208 cx_attr_malloc 210 cx_attr_malloc
209 cx_attr_dealloc(cxBufferFree, 1) 211 cx_attr_dealloc(cxBufferFree, 1)

mercurial