authorgravatar for 15335529+Sobeston@users.noreply.github.comSebastian <15335529+Sobeston@users.noreply.github.com> 2020-04-01 09:11:05+01:00
committergravatar for 15335529+Sobeston@users.noreply.github.comSebastian <15335529+Sobeston@users.noreply.github.com> 2020-04-01 10:08:29+01:00
log92a423739d91bd0677940fc1a86b593649cafaa6
treef290c16bc84254da82eae5a752072f4b69a52f63
parenta5af78c376fc41424b81ea83766b38a0a1d17870

mem.zeroes - add sentinel terminated array support


1 files changed, 3 insertions(+), 0 deletions(-)

lib/std/mem.zig+3
......@@ -341,6 +341,9 @@ pub fn zeroes(comptime T: type) T {
341341 }
342342 },
343343 .Array => |info| {
344 if (info.sentinel) |sentinel| {
345 return [_:info.sentinel]info.child{zeroes(info.child)} ** info.len;
346 }
344347 return [_]info.child{zeroes(info.child)} ** info.len;
345348 },
346349 .Vector,