mruby/mruby — pull request #1289 by monaka (2013-06-19 02:49:06+00:00)
Title: Return NULL when calling mrb_realloc with len == 0.

This PR is not serious. But an underlying bug.

When he calls mrb_realloc with (p != NULL) and (len == 0), the core calls free() inside.
It may be crash the core it self.

Referring to C99, return value of calling malloc() with size == 0 is implementation defined.
So it may possible to define the return value of mrb_realloc(mrb, p, 0) originally.
But almost all programmers expect to get NULL when size == 0, I think.