Fixed MSVC VLAs

This commit is contained in:
CPunch 2022-03-14 12:17:19 -05:00
parent a8c1b44bb9
commit dfdcb04608
1 changed files with 2 additions and 2 deletions

View File

@ -7,8 +7,8 @@
/* microsoft strikes again with their lack of support for VLAs */
#if _MSC_VER
#define VLA(type, var, sz) type var = laikaM_malloc(sizeof(type)*sz);
#define ENDVLA(var) laikaM_free(var);
#define VLA(type, var, sz) type *var = laikaM_malloc(sizeof(type)*sz);
#define ENDVLA(var) laikaM_free(var);
#else
#define VLA(type, var, sz) type var[sz];
/* stubbed */