replaced TomlArray with tlibc List
This commit is contained in:
@@ -14,7 +14,7 @@ Result(Table*) toml_walk_table_path(TomlParser* parser, TomlTable* table,
|
||||
if (is_array) {
|
||||
u64 i = 0;
|
||||
for (; i < key_path->len - 1; i++) {
|
||||
str part = *key_path->elements[i].value.s;
|
||||
str part = *key_path->data[i].value.s;
|
||||
TomlValue* t = TomlTable_get(real_table, part);
|
||||
if (t == NULL) {
|
||||
if (create_if_not_exist) {
|
||||
@@ -31,7 +31,7 @@ Result(Table*) toml_walk_table_path(TomlParser* parser, TomlTable* table,
|
||||
}
|
||||
}
|
||||
|
||||
str part = *key_path->elements[i].value.s;
|
||||
str part = *key_path->data[i].value.s;
|
||||
TomlValue* t = TomlTable_get(real_table, part);
|
||||
if (t == NULL) {
|
||||
if (create_if_not_exist) {
|
||||
@@ -58,7 +58,7 @@ Result(Table*) toml_walk_table_path(TomlParser* parser, TomlTable* table,
|
||||
}
|
||||
} else {
|
||||
for (u64 i = 0; i < key_path->len; i++) {
|
||||
str part = *key_path->elements[i].value.s;
|
||||
str part = *key_path->data[i].value.s;
|
||||
TomlValue* t = TomlTable_get(real_table, part);
|
||||
if (t == NULL) {
|
||||
if (create_if_not_exist) {
|
||||
@@ -72,7 +72,7 @@ Result(Table*) toml_walk_table_path(TomlParser* parser, TomlTable* table,
|
||||
}
|
||||
} else {
|
||||
if (t->type == TLIBTOML_ARRAY) {
|
||||
real_table = t->value.array->elements[t->value.array->len - 1].value.table;
|
||||
real_table = t->value.array->data[t->value.array->len - 1].value.table;
|
||||
} else if (t->type == TLIBTOML_TABLE) {
|
||||
real_table = t->value.table;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user