mirror of
https://github.com/Ed94/Odin.git
synced 2026-08-06 15:48:51 +00:00
Update comments
This commit is contained in:
+11
-10
@@ -22,14 +22,16 @@ import "core:mem"
|
||||
|
||||
import win "core:sys/windows"
|
||||
|
||||
// Performs a recursive DNS query for records of a particular type for the hostname.
|
||||
//
|
||||
// NOTE: This procedure instructs the DNS resolver to recursively perform CNAME requests on our behalf,
|
||||
// meaning that DNS queries for a hostname will resolve through CNAME records until an
|
||||
// IP address is reached.
|
||||
//
|
||||
// WARNING: This procedure allocates memory for each record returned; deleting just the returned slice is not enough!
|
||||
// See `destroy_records`.
|
||||
/*
|
||||
Performs a recursive DNS query for records of a particular type for the hostname.
|
||||
|
||||
NOTE: This procedure instructs the DNS resolver to recursively perform CNAME requests on our behalf,
|
||||
meaning that DNS queries for a hostname will resolve through CNAME records until an
|
||||
IP address is reached.
|
||||
|
||||
WARNING: This procedure allocates memory for each record returned; deleting just the returned slice is not enough!
|
||||
See `destroy_records`.
|
||||
*/
|
||||
get_dns_records_windows :: proc(hostname: string, type: DNS_Record_Type, allocator := context.allocator) -> (records: []DNS_Record, err: DNS_Error) {
|
||||
context.allocator = allocator
|
||||
|
||||
@@ -55,7 +57,6 @@ get_dns_records_windows :: proc(hostname: string, type: DNS_Record_Type, allocat
|
||||
count += 1
|
||||
}
|
||||
|
||||
|
||||
recs := make([dynamic]DNS_Record, 0, count)
|
||||
if recs == nil do return nil, .System_Error // return no results if OOM.
|
||||
|
||||
@@ -163,4 +164,4 @@ get_dns_records_windows :: proc(hostname: string, type: DNS_Record_Type, allocat
|
||||
|
||||
records = recs[:]
|
||||
return
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user