RESULT_ERROR_FMT -> RESULT_ERROR_HEAP
This commit is contained in:
@@ -22,9 +22,10 @@ Result(Table*) toml_walk_table_path(TomlParser* parser, TomlTable* table,
|
||||
TomlTable_set(real_table, part, new_table_value);
|
||||
real_table = new_table_value.table;
|
||||
} else {
|
||||
Return RESULT_ERROR_CODE_FMT(TLIBTOML, TLIBTOML_ERR_SYNTAX,
|
||||
char* err = sprintf_malloc(
|
||||
"%s:%d:%d: not found key '" FMT_str "'",
|
||||
parser->filename, parser->lineno, parser->colno, part.len, part.data);
|
||||
Return RESULT_ERROR_CODE_HEAP(TLIBTOML, TLIBTOML_ERR_SYNTAX, err);
|
||||
}
|
||||
} else {
|
||||
real_table = t->table;
|
||||
@@ -41,15 +42,17 @@ Result(Table*) toml_walk_table_path(TomlParser* parser, TomlTable* table,
|
||||
TomlTable_set(real_table, part, array_value);
|
||||
real_table = new_table_value.table;
|
||||
} else {
|
||||
Return RESULT_ERROR_CODE_FMT(TLIBTOML, TLIBTOML_ERR_SYNTAX,
|
||||
char* err = sprintf_malloc(
|
||||
"%s:%d:%d: not found key '" FMT_str "'",
|
||||
parser->filename, parser->lineno, parser->colno, part.len, part.data);
|
||||
Return RESULT_ERROR_CODE_HEAP(TLIBTOML, TLIBTOML_ERR_SYNTAX, err);
|
||||
}
|
||||
} else {
|
||||
if (t->type != TLIBTOML_ARRAY) {
|
||||
Return RESULT_ERROR_CODE_FMT(TLIBTOML, TLIBTOML_ERR_SYNTAX,
|
||||
char* err = sprintf_malloc(
|
||||
"%s:%d:%d: this key was not an array",
|
||||
parser->filename, parser->lineno, parser->colno);
|
||||
Return RESULT_ERROR_CODE_HEAP(TLIBTOML, TLIBTOML_ERR_SYNTAX, err);
|
||||
}
|
||||
|
||||
TomlValue new_table_value = TomlValue_new_table();
|
||||
@@ -66,9 +69,10 @@ Result(Table*) toml_walk_table_path(TomlParser* parser, TomlTable* table,
|
||||
TomlTable_set(real_table, part, new_table_value);
|
||||
real_table = new_table_value.table;
|
||||
} else {
|
||||
Return RESULT_ERROR_CODE_FMT(TLIBTOML, TLIBTOML_ERR_SYNTAX,
|
||||
char* err = sprintf_malloc(
|
||||
"%s:%d:%d: not found key '" FMT_str "'",
|
||||
parser->filename, parser->lineno, parser->colno, part.len, part.data);
|
||||
Return RESULT_ERROR_CODE_HEAP(TLIBTOML, TLIBTOML_ERR_SYNTAX, err);
|
||||
}
|
||||
} else {
|
||||
if (t->type == TLIBTOML_ARRAY) {
|
||||
|
||||
Reference in New Issue
Block a user