#pragma once #ifdef _gdjn_shims // install shims for code compiled in library mode // yes this is awful, why do you ask void* gdjn_janet_malloc(size_t sz) { return malloc(sz); } void* gdjn_janet_realloc(void* ptr, size_t sz) { return realloc(ptr, sz); } void* gdjn_janet_calloc(size_t n, size_t sz) { return calloc(n, sz); } void gdjn_janet_free(void* ptr) { free(ptr); } #else # define janet_malloc gdjn_janet_malloc # define janet_calloc gdjn_janet_calloc # define janet_realloc gdjn_janet_realloc # define janet_free gdjn_janet_free #endif