TomlTable_get -> TomlTable_tryGet
This commit is contained in:
@@ -15,7 +15,7 @@ Result(Table*) toml_walk_table_path(TomlParser* parser, TomlTable* table,
|
||||
u64 i = 0;
|
||||
for (; i < key_path->len - 1; i++) {
|
||||
str part = *key_path->data[i].s;
|
||||
TomlValue* t = TomlTable_get(real_table, part);
|
||||
TomlValue* t = TomlTable_tryGet(real_table, part);
|
||||
if (t == NULL) {
|
||||
if (create_if_not_exist) {
|
||||
TomlValue new_table_value = TomlValue_new_table();
|
||||
@@ -32,7 +32,7 @@ Result(Table*) toml_walk_table_path(TomlParser* parser, TomlTable* table,
|
||||
}
|
||||
|
||||
str part = *key_path->data[i].s;
|
||||
TomlValue* t = TomlTable_get(real_table, part);
|
||||
TomlValue* t = TomlTable_tryGet(real_table, part);
|
||||
if (t == NULL) {
|
||||
if (create_if_not_exist) {
|
||||
TomlValue array_value = TomlValue_new_array();
|
||||
@@ -59,7 +59,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->data[i].s;
|
||||
TomlValue* t = TomlTable_get(real_table, part);
|
||||
TomlValue* t = TomlTable_tryGet(real_table, part);
|
||||
if (t == NULL) {
|
||||
if (create_if_not_exist) {
|
||||
TomlValue new_table_value = TomlValue_new_table();
|
||||
|
||||
Reference in New Issue
Block a user