Updated malloc/calloc/realloc/free deprecation of old helper functions. Add checks to prevent incorrect alignment on types when using malloc. Better errors from $assert. Added @deprecated. Fixed issue using named arguments after varargs.

This commit is contained in:
Christoffer Lerno
2023-02-27 14:51:35 +01:00
committed by Christoffer Lerno
parent 8ad8af861e
commit dd4edfb747
28 changed files with 705 additions and 343 deletions

View File

@@ -17,7 +17,7 @@ macro int @main_to_void_main(#m, int, char**)
macro String[] args_to_strings(int argc, char** argv) @private
{
String *list = malloc(String.sizeof * argc);
String *list = malloc(String, argc);
for (int i = 0; i < argc; i++)
{
char* arg = argv[i];
@@ -63,7 +63,7 @@ macro String[] win_command_line_to_strings(ushort* cmd_line) @private
macro String[] wargs_strings(int argc, Char16** argv) @private
{
String *list = malloc(String.sizeof * argc);
String *list = malloc(String, argc);
for (int i = 0; i < argc; i++)
{
Char16* arg = argv[i];