Commit dc479392 authored by cremno's avatar cremno

fix type of mrb_exc_new()'s len parameter

mrb_str_new() takes size_t, so should mrb_exc_new().
parent 4ba9c3b7
......@@ -365,7 +365,7 @@ MRB_API mrb_value mrb_obj_clone(mrb_state *mrb, mrb_value self);
#define TOLOWER(c) (ISASCII(c) ? tolower((int)(unsigned char)(c)) : (c))
#endif
MRB_API mrb_value mrb_exc_new(mrb_state *mrb, struct RClass *c, const char *ptr, long len);
MRB_API mrb_value mrb_exc_new(mrb_state *mrb, struct RClass *c, const char *ptr, size_t len);
MRB_API mrb_noreturn void mrb_exc_raise(mrb_state *mrb, mrb_value exc);
MRB_API mrb_noreturn void mrb_raise(mrb_state *mrb, struct RClass *c, const char *msg);
......
......@@ -19,7 +19,7 @@
#include "mrb_throw.h"
MRB_API mrb_value
mrb_exc_new(mrb_state *mrb, struct RClass *c, const char *ptr, long len)
mrb_exc_new(mrb_state *mrb, struct RClass *c, const char *ptr, size_t len)
{
mrb_value arg = mrb_str_new(mrb, ptr, len);
return mrb_obj_new(mrb, c, 1, &arg);
......
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