mirror of
https://github.com/Ed94/Odin.git
synced 2026-08-06 15:48:51 +00:00
Assert that _Path_Separator is 7-bit ASCII
There are several places where this is assumed to be true, most visibly in `is_path_separator`, as it takes a `byte` argument. Note that the data type of `_Path_Separator` is a rune, which allows any Unicode value.
This commit is contained in:
@@ -8,6 +8,8 @@ Path_Separator :: _Path_Separator // OS-Specific
|
|||||||
Path_Separator_String :: _Path_Separator_String // OS-Specific
|
Path_Separator_String :: _Path_Separator_String // OS-Specific
|
||||||
Path_List_Separator :: _Path_List_Separator // OS-Specific
|
Path_List_Separator :: _Path_List_Separator // OS-Specific
|
||||||
|
|
||||||
|
#assert(_Path_Separator <= rune(0x7F), "The system-specific path separator rune is expected to be within the 7-bit ASCII character set.")
|
||||||
|
|
||||||
@(require_results)
|
@(require_results)
|
||||||
is_path_separator :: proc(c: byte) -> bool {
|
is_path_separator :: proc(c: byte) -> bool {
|
||||||
return _is_path_separator(c)
|
return _is_path_separator(c)
|
||||||
|
|||||||
Reference in New Issue
Block a user