TomlTable_get -> TomlTable_tryGet

This commit is contained in:
2026-06-07 21:54:33 +05:00
parent 5cb121d1de
commit b95b6b150d
3 changed files with 11 additions and 11 deletions

View File

@@ -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();