Use `memcpy` to copy stack.
@@ -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
