| 1642 | } |
| 1643 | |
| 1644 | void 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 | |
| 1653 | void props_stack_resize(PropsStack* stack, uint32_t newcap) { |
| 1654 | LfUIElementProps* newdata = (LfUIElementProps*)realloc(stack->data, newcap * sizeof(LfUIElementProps)); |