Convert all uses of *_from_slice to *_from_bytes where appropriate

This commit is contained in:
gingerBill
2022-05-16 01:43:43 +01:00
parent e10105a780
commit 33895b6d92
11 changed files with 31 additions and 26 deletions
+3 -3
View File
@@ -27,7 +27,7 @@ TS_XML_Options := xml.Options{
expected_doctype = "TS",
}
parse_qt_linguist_from_slice :: proc(data: []u8, options := DEFAULT_PARSE_OPTIONS, pluralizer: proc(int) -> int = nil, allocator := context.allocator) -> (translation: ^Translation, err: Error) {
parse_qt_linguist_from_bytes :: proc(data: []byte, options := DEFAULT_PARSE_OPTIONS, pluralizer: proc(int) -> int = nil, allocator := context.allocator) -> (translation: ^Translation, err: Error) {
context.allocator = allocator
ts, xml_err := xml.parse(data, TS_XML_Options)
@@ -150,7 +150,7 @@ parse_qt_linguist_file :: proc(filename: string, options := DEFAULT_PARSE_OPTION
if !data_ok { return {}, .File_Error }
return parse_qt_linguist_from_slice(data, options, pluralizer, allocator)
return parse_qt_linguist_from_bytes(data, options, pluralizer, allocator)
}
parse_qt :: proc { parse_qt_linguist_file, parse_qt_linguist_from_slice }
parse_qt :: proc { parse_qt_linguist_file, parse_qt_linguist_from_bytes }