mirror of
https://github.com/Ed94/Odin.git
synced 2026-08-05 15:18:49 +00:00
remove win32 ref
This commit is contained in:
@@ -18,7 +18,6 @@
|
|||||||
package net
|
package net
|
||||||
|
|
||||||
import sys "core:sys/windows"
|
import sys "core:sys/windows"
|
||||||
import win32 "core:sys/win32"
|
|
||||||
import strings "core:strings"
|
import strings "core:strings"
|
||||||
|
|
||||||
MAX_INTERFACE_ENUMERATION_TRIES :: 3
|
MAX_INTERFACE_ENUMERATION_TRIES :: 3
|
||||||
@@ -144,7 +143,7 @@ enumerate_interfaces :: proc(allocator := context.allocator) -> (interfaces: []N
|
|||||||
Takes a UTF-16 Wstring and clones it.
|
Takes a UTF-16 Wstring and clones it.
|
||||||
*/
|
*/
|
||||||
wstring_to_string :: proc(s: ^u16, max_size := 256, allocator := context.allocator) -> (res: string) {
|
wstring_to_string :: proc(s: ^u16, max_size := 256, allocator := context.allocator) -> (res: string) {
|
||||||
temp := win32.wstring_to_utf8((win32.Wstring)(s), max_size, context.temp_allocator)
|
temp := sys.wstring_to_utf8((sys.Wstring)(s), max_size, context.temp_allocator)
|
||||||
return strings.clone(temp[:len(temp)], allocator)
|
return strings.clone(temp[:len(temp)], allocator)
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -179,4 +178,4 @@ parse_socket_address :: proc(addr_in: sys.SOCKET_ADDRESS) -> (addr: Endpoint) {
|
|||||||
case: return // Empty or invalid address type
|
case: return // Empty or invalid address type
|
||||||
}
|
}
|
||||||
unreachable()
|
unreachable()
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user