diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2014-01-12 08:11:36 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2014-01-12 08:11:36 +0000 |
commit | 9bd672f6682aef683c49f0b8da2b439e4d4103ac (patch) | |
tree | 17a6f91b7e705c4ba7bf32e6ceadd136e7b595f5 /ext/tk/tcltklib.c | |
parent | 42406852371bdf3fe3d2e4e51192c87720a8e568 (diff) | |
download | ruby-9bd672f6682aef683c49f0b8da2b439e4d4103ac.tar.gz |
ext: use rb_sprintf() and rb_vsprintf() with PRIsVALUE
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44572 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ext/tk/tcltklib.c')
-rw-r--r-- | ext/tk/tcltklib.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/ext/tk/tcltklib.c b/ext/tk/tcltklib.c index 6f9aa9046b..5d20b25e2f 100644 --- a/ext/tk/tcltklib.c +++ b/ext/tk/tcltklib.c @@ -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); |