diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2010-10-12 15:03:51 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2010-10-12 15:03:51 +0000 |
commit | cea3919ae61ae16e04a5ee5c5394970c3960a0af (patch) | |
tree | 41c74b4c9bc624cc96691bf759a7d177f3345171 /ext | |
parent | 150b4efa5510d77fdde7b9692b3c391fbde6ac19 (diff) | |
download | ruby-cea3919ae61ae16e04a5ee5c5394970c3960a0af.tar.gz |
* 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
Diffstat (limited to 'ext')
-rw-r--r-- | ext/dl/cfunc.c | 16 |
1 files changed, 9 insertions, 7 deletions
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)); |