Use memcpy to copy stack.

This commit is contained in:
Yukihiro "Matz" Matsumoto
2020-08-06 11:27:44 +09:00
parent 57a798e687
commit 0b95c8a1e8
+1 -3
View File
@@ -115,9 +115,7 @@ stack_clear(mrb_value *from, size_t count)
static inline void
stack_copy(mrb_value *dst, const mrb_value *src, size_t size)
{
while (size-- > 0) {
*dst++ = *src++;
}
memcpy(dst, src, sizeof(mrb_value)*size);
}
static void