From 12277333d0895231db94eb58604391d7a754b2d6 Mon Sep 17 00:00:00 2001 From: Jo-Philipp Wich Date: Mon, 11 Sep 2023 12:48:33 +0200 Subject: lib: fix documented return value for `splice()` Make the `splice()` documentation match the actual implementation. Fixes: #170 Signed-off-by: Jo-Philipp Wich --- lib.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'lib.c') diff --git a/lib.c b/lib.c index a16190c..d23dde2 100644 --- a/lib.c +++ b/lib.c @@ -1516,7 +1516,7 @@ uc_sort(uc_vm_t *vm, size_t nargs) * * The array grows or shrinks as necessary. * - * Returns the last element removed, or `null` if no elements are removed. + * Returns the modified input array. * * @function module:core#splice * @@ -1536,7 +1536,7 @@ uc_sort(uc_vm_t *vm, size_t nargs) * * @example * let x = [ 1, 2, 3, 4 ]; - * splice(x, 1, 2, "a", "b", "c"); // 3 + * splice(x, 1, 2, "a", "b", "c"); // [ 1, "a", "b", "c", 4 ] * print(x, "\n"); // [ 1, "a", "b", "c", 4 ] */ static uc_value_t * -- cgit v1.2.3