ikskuh / zig-network

A smallest-common-subset of socket functions for crossplatform networking, TCP & UDP
MIT License
484 stars 59 forks source link

reallocAdvanced call uses old signature #50

Closed RobinKa closed 1 year ago

RobinKa commented 1 year ago

The signature for reallocAdvanaced was changed here https://github.com/ziglang/zig/commit/ceb0a632cfd6a4eada6bd27bf6a3754e95dcac86#diff-29d26e272ecc9cdcc97fd8c9ed45792cbbddd826ef399e9528490389f12d36e2L362

It is used here https://github.com/MasterQ32/zig-network/blob/caa31ef8783695f0441b1f6812985e6a46b32c96/network.zig#L801 and needs to be updated.

New to Zig so not sure how to do it myself yet :)

// This works I think?

fd_set.* = @ptrCast(*align(8) FdSet, (try allocator.reallocAdvanced(@alignCast(8, fd_set.*.memSlice()), new_mem_size, @returnAddress())).ptr);