diff --git a/include/mruby.h b/include/mruby.h index 3ed86f8c7..4048edf69 100644 --- a/include/mruby.h +++ b/include/mruby.h @@ -162,11 +162,11 @@ struct mrb_state; * * The function pointing it must behave similarly as realloc except: * - If ptr is NULL it must allocate new space. - * - If s is NULL, ptr must be freed. + * - If size is zero, ptr must be freed. * * See @see mrb_default_allocf for the default implementation. */ -typedef void* (*mrb_allocf) (struct mrb_state *mrb, void*, size_t, void *ud); +typedef void* (*mrb_allocf) (struct mrb_state *mrb, void *ptr, size_t size, void *ud); #ifndef MRB_FIXED_STATE_ATEXIT_STACK_SIZE #define MRB_FIXED_STATE_ATEXIT_STACK_SIZE 5