lun-4 / zigdig

naive dns client library in zig
MIT License
33 stars 5 forks source link

remove allocator requirement from rdata.prettyRData #1

Closed lun-4 closed 5 years ago

lun-4 commented 5 years ago

we already just allocate 256 u8's and hope for the best, better keep something on the stack then. function return type doesn't change which is good

lun-4 commented 5 years ago

welp, changing it to not require an allocator causes issues, didn't notice that the memory would be fucked up by the time we leave the prettyRData function.

another idea though would be having the caller give the Stream itself.

lun-4 commented 5 years ago

Issue with doing it as Stream is that the IPv6 printer needs its own memory to work on. until the socket module in zig gets merged (with a better algorithm) this issue will stay closed.