libxputty 0.1
Loading...
Searching...
No Matches
Functions
xchildlist_private.c File Reference

Go to the source code of this file.

Functions

void _childlist_add_elem (Childlist_t *childlist)
 _childlist_add_elem - internal use to reallocate the childlist array to new size
You didn't need to call this
 

Function Documentation

◆ _childlist_add_elem()

void _childlist_add_elem ( Childlist_t childlist)

_childlist_add_elem - internal use to reallocate the childlist array to new size
You didn't need to call this

Parameters
*childlist- pointer to the Childlist_t

Definition at line 23 of file xchildlist_private.c.

23 {
24 childlist->childs = (Widget_t**)realloc(childlist->childs, sizeof(Widget_t*) * (4+childlist->cap));
25 assert(childlist->childs != NULL);
26 childlist->cap +=4;
27 childlist->size = sizeof(childlist);
28 int i = childlist->elem+1;
29 for(;i<childlist->cap;i++) {
30 childlist->childs[i] = NULL;
31 }
32}
Widget_t ** childs
Definition xchildlist.h:51
size_t size
Definition xchildlist.h:53
Widget_t - struct to hold the basic Widget_t info.
Definition xwidget.h:457

References Childlist_t::cap, Childlist_t::childs, Childlist_t::elem, and Childlist_t::size.

Referenced by childlist_add_child().