Manual Pages for Linux CentOS command on man wl_array
MyWebUniversity

Manual Pages for Linux CentOS command on man wl_array

wlarray(3) Wayland wlarray(3)

NAME

wlarray - SYNOPSIS

#include Public Member Functions void wlarrayinit (struct wlarray *array) void wlarrayrelease (struct wlarray *array) void * wlarrayadd (struct wlarray *array, sizet size) int wlarraycopy (struct wlarray *array, struct wlarray *source) Data Fields sizet size sizet alloc void * data Related Functions (Note that these are not member functions.)

#define wlarrayforeach(pos, array) Detailed Description Dynamic array A wlarray is a dynamic array that can only grow until released. It is intended for relatively small allocations whose size is variable or not known in advance. While construction of a wlarray does not require all elements to be of the same size, wlarrayforeach() does require all elements to have the same type and size. Member Function Documentation void * wlarrayadd (struct wlarray *array, sizetsize) Increases the size of the array by size bytes. Parameters: array Array whose size is to be increased size Number of bytes to increase the size of the array by Returns: A pointer to the beginning of the newly appended space, or NULL when resizing fails. int wlarraycopy (struct wlarray *array, struct wlarray *source) Copies the contents of source to array. Parameters: array Destination array to copy to source Source array to copy from Returns:

0 on success, or -1 on failure void wlarrayinit (struct wlarray *array) Initializes the array. Parameters: array Array to initialize void wlarrayrelease (struct wlarray *array) Releases the array data. Note: Leaves the array in an invalid state. Parameters: array Array whose data is to be released Friends And Related Function Documentation

#define wlarrayforeach(pos, array) [related] Value:

for (pos = (array)->data; (const char *) pos < ((const char *) (array)->data + (array)->size); (pos)++) Iterates over an array.

This macro expresses a for-each iterator for wlarray. It assigns each element in the array to pos, which can then be referenced in a trailing code block. pos must be a pointer to the array element type, and all array elements must be of the same type and size. Parameters: pos Cursor that each array element will be assigned to array Array to iterate over See Also: wllistforeach() Field Documentation sizet wlarray::alloc Allocated space void* wlarray::data Array data sizet wlarray::size Array size Author Generated automatically by Doxygen for Wayland from the source code. Version 1.15.0 Tue Oct 30 2018 wlarray(3)




Contact us      |      About us      |      Term of use      |       Copyright © 2000-2019 MyWebUniversity.com ™