1
0
mirror of https://github.com/janet-lang/janet synced 2025-11-27 04:25:14 +00:00

Get dst to compile on windows

This commit is contained in:
Calvin Rose
2018-02-01 17:09:22 -08:00
parent 776addfc07
commit ccdf758e83
16 changed files with 46 additions and 35 deletions

View File

@@ -275,7 +275,7 @@ void dst_sweep() {
}
/* Allocate some memory that is tracked for garbage collection */
void *dst_gcalloc(DstMemoryType type, size_t size) {
void *dst_gcalloc(enum DstMemoryType type, size_t size) {
DstGCMemoryHeader *mdata;
size_t total = size + sizeof(DstGCMemoryHeader);
@@ -298,11 +298,11 @@ void *dst_gcalloc(DstMemoryType type, size_t size) {
mdata->next = dst_vm_blocks;
dst_vm_blocks = mdata;
return mem + sizeof(DstGCMemoryHeader);
return (char *) mem + sizeof(DstGCMemoryHeader);
}
/* Run garbage collection */
void dst_collect() {
void dst_collect(void) {
uint32_t i;
if (dst_vm_gc_suspend) return;
if (dst_vm_fiber)
@@ -362,7 +362,7 @@ int dst_gcunrootall(Dst root) {
}
/* Free all allocated memory */
void dst_clear_memory() {
void dst_clear_memory(void) {
DstGCMemoryHeader *current = dst_vm_blocks;
while (NULL != current) {
dst_deinit_block(current);