Require @(init) and @(fini) to be proc "contextless" ()

This commit is contained in:
gingerBill
2025-08-08 12:10:01 +01:00
parent 3194fda8f3
commit 7642e0a0e0
47 changed files with 170 additions and 102 deletions
+4 -2
View File
@@ -1098,7 +1098,8 @@ _processor_core_count :: proc() -> int {
}
@(private, require_results)
_alloc_command_line_arguments :: proc() -> []string {
_alloc_command_line_arguments :: proc "contextless" () -> []string {
context = runtime.default_context()
res := make([]string, len(runtime.args__))
for _, i in res {
res[i] = string(runtime.args__[i])
@@ -1107,7 +1108,8 @@ _alloc_command_line_arguments :: proc() -> []string {
}
@(private, fini)
_delete_command_line_arguments :: proc() {
_delete_command_line_arguments :: proc "contextless" () {
context = runtime.default_context()
delete(args)
}