__args__: []cstring

This commit is contained in:
gingerBill
2018-03-04 11:25:23 +00:00
parent 105de7705a
commit 6db95b554f
4 changed files with 11 additions and 14 deletions
+1 -2
View File
@@ -132,8 +132,7 @@ Type_Info :: struct {
// This will be set by the compiler
__type_table: []Type_Info;
__argc__: i32;
__argv__: ^^byte;
__args__: []cstring;
// IMPORTANT NOTE(bill): Must be in this order (as the compiler relies upon it)
+3 -3
View File
@@ -269,9 +269,9 @@ dlerror :: proc() -> string {
_alloc_command_line_arguments :: proc() -> []string {
args := make([]string, __argc__);
for i in 0..__argc__ {
args[i] = string(cstring((__argv__+i)^));
args := make([]string, len(__args__));
for arg, i in __args__ {
args[i] = string(arg);
}
return args;
}
+3 -3
View File
@@ -284,9 +284,9 @@ dlerror :: proc() -> string {
_alloc_command_line_arguments :: proc() -> []string {
args := make([]string, __argc__);
for i in 0..__argc__ {
args[i] = string((__argv__+i)^);
args := make([]string, len(__args__));
for arg, i in __args__ {
args[i] = string(arg);
}
return args;
}