mirror of
https://github.com/ruby/ruby.git
synced 2025-09-16 17:14:01 +02:00
merge revision(s) 44572,44578,44591,44592: [Backport #9490]
ext: use rb_sprintf() and rb_vsprintf() with PRIsVALUE git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_1@44903 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
73fc780998
commit
565d568a45
9 changed files with 58 additions and 69 deletions
|
@ -848,15 +848,14 @@ create_ip_exc(interp, exc, fmt, va_alist)
|
|||
#endif
|
||||
{
|
||||
va_list args;
|
||||
char buf[BUFSIZ];
|
||||
VALUE msg;
|
||||
VALUE einfo;
|
||||
struct tcltkip *ptr = get_ip(interp);
|
||||
|
||||
va_init_list(args,fmt);
|
||||
vsnprintf(buf, BUFSIZ, fmt, args);
|
||||
buf[BUFSIZ - 1] = '\0';
|
||||
msg = rb_vsprintf(fmt, args);
|
||||
va_end(args);
|
||||
einfo = rb_exc_new2(exc, buf);
|
||||
einfo = rb_exc_new_str(exc, msg);
|
||||
rb_ivar_set(einfo, ID_at_interp, interp);
|
||||
if (ptr) {
|
||||
Tcl_ResetResult(ptr->ip);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue