From cea3919ae61ae16e04a5ee5c5394970c3960a0af Mon Sep 17 00:00:00 2001 From: nobu Date: Tue, 12 Oct 2010 15:03:51 +0000 Subject: * configure.in (RUBY_CHECK_PRINTF_PREFIX): check for printf format specifier if possible. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29468 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- ext/dl/cfunc.c | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) (limited to 'ext') diff --git a/ext/dl/cfunc.c b/ext/dl/cfunc.c index f5ad3ddd63..33ac78490f 100644 --- a/ext/dl/cfunc.c +++ b/ext/dl/cfunc.c @@ -566,13 +566,15 @@ rb_dlcfunc_call(VALUE self, VALUE ary) } #endif else{ - rb_raise(rb_eDLError, -#ifndef LONG_LONG_VALUE - "unsupported call type: %lx", -#else - "unsupported call type: %llx", -#endif - cfunc->calltype); + const char *name = rb_id2name(cfunc->calltype); + if( name ){ + rb_raise(rb_eDLError, "unsupported call type: %s", + name); + } + else{ + rb_raise(rb_eDLError, "unsupported call type: %"PRIxVALUE, + cfunc->calltype); + } } rb_dl_set_last_error(self, INT2NUM(errno)); -- cgit v1.2.3