From a79a6d8f9be059b2bf2c1fc6548592546322f53d Mon Sep 17 00:00:00 2001 From: Kai Gunger Date: Sun, 14 Jun 2026 03:24:29 -0400 Subject: [tnslc] string literal gen in func scope --- tnslc/utils/c_wrap_linux.tnsl | 8 ++++---- tnslc/utils/c_wrap_windows.tnsl | 8 ++++---- 2 files changed, 8 insertions(+), 8 deletions(-) (limited to 'tnslc/utils') diff --git a/tnslc/utils/c_wrap_linux.tnsl b/tnslc/utils/c_wrap_linux.tnsl index 97a93ba..71a5b47 100644 --- a/tnslc/utils/c_wrap_linux.tnsl +++ b/tnslc/utils/c_wrap_linux.tnsl @@ -1,9 +1,9 @@ # Must be included at the top of the file asm "extern malloc, realloc, free, printf, putchar, open, close, read, write, lseek, perror" -{}uint8 _alert = "Alert!\n\0" -{}uint8 _dec = "%d\n\0" -{}uint8 _ptr = "%p\n\0" +~uint8 _alert = "Alert!\n\0" +~uint8 _dec = "%d\n\0" +~uint8 _ptr = "%p\n\0" ~void NULL = 0 @@ -275,5 +275,5 @@ asm "extern malloc, realloc, free, printf, putchar, open, close, read, write, ls ;/ /; print_alert - _printf(~_alert{0}) + _printf(_alert) ;/ diff --git a/tnslc/utils/c_wrap_windows.tnsl b/tnslc/utils/c_wrap_windows.tnsl index 577ca25..839c976 100644 --- a/tnslc/utils/c_wrap_windows.tnsl +++ b/tnslc/utils/c_wrap_windows.tnsl @@ -10,9 +10,9 @@ asm "extern ReadFile" asm "extern WriteFile" asm "extern CloseHandle" -{}uint8 _alert = "Alert!\n\0" -{}uint8 _dec = "%d\n\0" -{}uint8 _ptr = "%p\n\0" +~uint8 _alert = "Alert!\n\0" +~uint8 _dec = "%d\n\0" +~uint8 _ptr = "%p\n\0" /; _alloc (uint size) [~void] ~void out @@ -280,5 +280,5 @@ asm "extern CloseHandle" ;/ /; print_alert - _printf(~_alert{0}) + _printf(_alert) ;/ -- cgit v1.2.3