mirror of
https://github.com/Ed94/Odin.git
synced 2026-08-07 16:18:52 +00:00
Require @(init) and @(fini) to be proc "contextless" ()
This commit is contained in:
@@ -317,7 +317,8 @@ file_size :: proc(fd: Handle) -> (i64, Error) {
|
||||
args := _alloc_command_line_arguments()
|
||||
|
||||
@(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 arg, i in runtime.args__ {
|
||||
res[i] = string(arg)
|
||||
@@ -326,7 +327,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)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user