Merge pull request #1059 from mattn/remove_needless_sprintf

Remove unused mrb_sprintf
This commit is contained in:
Yukihiro "Matz" Matsumoto
2013-03-23 10:00:48 -07:00
2 changed files with 0 additions and 17 deletions
-16
View File
@@ -264,22 +264,6 @@ mrb_name_error(mrb_state *mrb, mrb_sym id, const char *fmt, ...)
mrb_exc_raise(mrb, exc);
}
mrb_value
mrb_sprintf(mrb_state *mrb, const char *fmt, ...)
{
va_list args;
char buf[256];
int n;
va_start(args, fmt);
n = vsnprintf(buf, sizeof(buf), fmt, args);
va_end(args);
if (n < 0) {
n = 0;
}
return mrb_str_new(mrb, buf, n);
}
void
mrb_warn(const char *fmt, ...)
{
-1
View File
@@ -13,7 +13,6 @@ int sysexit_status(mrb_state *mrb, mrb_value err);
mrb_value mrb_exc_new3(mrb_state *mrb, struct RClass* c, mrb_value str);
mrb_value make_exception(mrb_state *mrb, int argc, mrb_value *argv, int isstr);
mrb_value mrb_make_exception(mrb_state *mrb, int argc, mrb_value *argv);
mrb_value mrb_sprintf(mrb_state *mrb, const char *fmt, ...);
void mrb_name_error(mrb_state *mrb, mrb_sym id, const char *fmt, ...);
void mrb_exc_print(mrb_state *mrb, struct RObject *exc);