mirror of
https://github.com/bjornbytes/lovr.git
synced 2024-07-15 18:23:35 +00:00
- Ref struct only stores refcount now and is more general. - Proxy stores a hash of its type name instead of an enum. - Variants store additional information instead of using a vtable. - Remove the concept of superclasses from the API. - Clean up some miscellaneous includes.
10 lines
198 B
C
10 lines
198 B
C
#include "ref.h"
|
|
#include "util.h"
|
|
#include <stdlib.h>
|
|
|
|
void* _lovrAlloc(size_t size) {
|
|
Ref* ref = calloc(1, sizeof(Ref) + size);
|
|
lovrAssert(ref, "Out of memory");
|
|
return *ref = 1, ref + 1;
|
|
}
|