~sircmpwn/hare-dev

harec: gen_expr_delete: use memcpy instead of memmove v1 REJECTED

Bor Grošelj Simić: 1
 gen_expr_delete: use memcpy instead of memmove

 1 files changed, 1 insertions(+), 1 deletions(-)
#1061653 alpine.yml success
#1061654 freebsd.yml success
#1061655 netbsd.yml success
Export patchset (mbox)
How do I use this?

Copy & paste the following snippet into your terminal to import this patchset into git:

curl -s https://lists.sr.ht/~sircmpwn/hare-dev/patches/44960/mbox | git am -3
Learn more about email & git

[PATCH harec] gen_expr_delete: use memcpy instead of memmove Export this patch

It is guaranteed that dest < src, so we can safely use memcpy
Signed-off-by: Bor Grošelj Simić <bgs@turminal.net>
---
 src/gen.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/gen.c b/src/gen.c
index 73cda32..c6e7d3e 100644
--- a/src/gen.c
+++ b/src/gen.c
@@ -2186,7 +2186,7 @@ gen_expr_delete(struct gen_context *ctx, const struct expression *expr)
	pushi(ctx->current, &qlen, Q_SUB, &qlen, &qend, NULL);
	pushi(ctx->current, &mlen, Q_MUL, &qlen, &membsz, NULL);

	pushi(ctx->current, NULL, Q_CALL, &ctx->rt.memmove, &startptr, &endptr, &mlen,
	pushi(ctx->current, NULL, Q_CALL, &ctx->rt.memcpy, &startptr, &endptr, &mlen,
		NULL);

	pushi(ctx->current, &qlen, Q_ADD, &qlen, &qstart, NULL);
-- 
2.38.4
harec/patches: SUCCESS in 53s

[gen_expr_delete: use memcpy instead of memmove][0] from [Bor Grošelj Simić][1]

[0]: https://lists.sr.ht/~sircmpwn/hare-dev/patches/44960
[1]: mailto:bgs@turminal.net

✓ #1061654 SUCCESS harec/patches/freebsd.yml https://builds.sr.ht/~sircmpwn/job/1061654
✓ #1061655 SUCCESS harec/patches/netbsd.yml  https://builds.sr.ht/~sircmpwn/job/1061655
✓ #1061653 SUCCESS harec/patches/alpine.yml  https://builds.sr.ht/~sircmpwn/job/1061653