| 1631 | } |
| 1632 | |
| 1633 | uint64_t djb2_hash(uint64_t hash, const void* buf, size_t size) { |
| 1634 | uint8_t* bytes = (uint8_t*)buf; |
| 1635 | int c; |
| 1636 | |
| 1637 | while ((c = *bytes++)) { |
| 1638 | hash = ((hash << 5) + hash) + c; /* hash * 33 + c */ |
| 1639 | } |
| 1640 | |
| 1641 | return hash; |
| 1642 | } |
| 1643 | |
| 1644 | void props_stack_create(PropsStack* stack) { |
| 1645 | stack->data = (LfUIElementProps*)malloc(LF_STACK_INIT_CAP * sizeof(LfUIElementProps)); |
no outgoing calls
no test coverage detected