fixed Array (again)

This commit is contained in:
2022-10-28 14:30:20 +06:00
parent 5e907327d6
commit 67680b8157
4 changed files with 57 additions and 28 deletions

View File

@@ -16,13 +16,13 @@ typedef struct Array_##type{\
\
static inline Array_##type Array_##type##_allocValues(uint32 length){\
return (Array_##type) {\
.values=(type##*)malloc(sizeof(type)*length),\
.values=(type*)malloc(sizeof(type)*length),\
.length=length,\
.allocatedOnHeap=true\
};\
}\
\
static inline Array_##type Array_##type##_fromBuffer(type##* buffer, uint32 bufferLength, bool allocatedOnHeap){\
static inline Array_##type Array_##type##_fromBuffer(type* buffer, uint32 bufferLength, bool allocatedOnHeap){\
return (Array_##type) {\
.values=buffer,\
.length=bufferLength,\