summaryrefslogtreecommitdiffhomepage
path: root/lib.c
diff options
context:
space:
mode:
authorJo-Philipp Wich <jo@mein.io>2023-09-11 12:48:33 +0200
committerJo-Philipp Wich <jo@mein.io>2023-09-11 12:49:23 +0200
commit12277333d0895231db94eb58604391d7a754b2d6 (patch)
tree851d5c49aa3d31dd186228920f1ade597f49f800 /lib.c
parent9fb270e23afae419b4a724364680c3ea6cb4ba69 (diff)
lib: fix documented return value for `splice()`
Make the `splice()` documentation match the actual implementation. Fixes: #170 Signed-off-by: Jo-Philipp Wich <jo@mein.io>
Diffstat (limited to 'lib.c')
-rw-r--r--lib.c4
1 files changed, 2 insertions, 2 deletions
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 *