MCPcopy Create free account
hub / github.com/cococry/leif / props_stack_create

Function props_stack_create

leif.c:1644–1651  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1642}
1643
1644void props_stack_create(PropsStack* stack) {
1645 stack->data = (LfUIElementProps*)malloc(LF_STACK_INIT_CAP * sizeof(LfUIElementProps));
1646 if(!stack->data) {
1647 LF_ERROR("Failed to allocate memory for stack data structure.\n");
1648 }
1649 stack->count = 0;
1650 stack->cap = LF_STACK_INIT_CAP;
1651}
1652
1653void props_stack_resize(PropsStack* stack, uint32_t newcap) {
1654 LfUIElementProps* newdata = (LfUIElementProps*)realloc(stack->data, newcap * sizeof(LfUIElementProps));

Callers 1

lf_init_glfwFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected