mirror of
https://github.com/mruby/mruby
synced 2026-06-08 16:11:16 +00:00
Merge pull request #1059 from mattn/remove_needless_sprintf
Remove unused mrb_sprintf
This commit is contained in:
-16
@@ -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, ...)
|
||||
{
|
||||
|
||||
@@ -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);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user