Use `memcpy` to copy stack.

parent 57a798e6
...@@ -115,9 +115,7 @@ stack_clear(mrb_value *from, size_t count) ...@@ -115,9 +115,7 @@ stack_clear(mrb_value *from, size_t count)
static inline void static inline void
stack_copy(mrb_value *dst, const mrb_value *src, size_t size) stack_copy(mrb_value *dst, const mrb_value *src, size_t size)
{ {
while (size-- > 0) { memcpy(dst, src, sizeof(mrb_value)*size);
*dst++ = *src++;
}
} }
static void static void
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment