From 7bd3207921b3db0b329c397c4dac8b25bd713ff3 Mon Sep 17 00:00:00 2001 From: Andrew Kelley Date: Sun, 27 Apr 2025 12:17:59 -0700 Subject: make `@memcpy` and `@memmove` share panic handlers --- lib/std/debug/simple_panic.zig | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) (limited to 'lib/std/debug/simple_panic.zig') diff --git a/lib/std/debug/simple_panic.zig b/lib/std/debug/simple_panic.zig index 724061021f..568f7de495 100644 --- a/lib/std/debug/simple_panic.zig +++ b/lib/std/debug/simple_panic.zig @@ -120,18 +120,17 @@ pub fn forLenMismatch() noreturn { call("for loop over objects with non-equal lengths", null); } -pub fn memcpyLenMismatch() noreturn { - call("@memcpy arguments have non-equal lengths", null); +/// Delete after next zig1.wasm update +pub const memcpyLenMismatch = copyLenMismatch; + +pub fn copyLenMismatch() noreturn { + call("source and destination have non-equal lengths", null); } pub fn memcpyAlias() noreturn { call("@memcpy arguments alias", null); } -pub fn memmoveLenMismatch() noreturn { - call("@memmove arguments have non-equal lengths", null); -} - pub fn noreturnReturned() noreturn { call("'noreturn' function returned", null); } -- cgit v1.2.3