From f7a5ee56d72e4badc825d60af0d8efc36d3d95d1 Mon Sep 17 00:00:00 2001 From: ttate Date: Thu, 25 Nov 2004 08:15:29 +0000 Subject: [PATCH] Use 'P' instead of 'p' in types.rb. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@7371 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- ext/dl/dl.c | 2 +- ext/dl/lib/dl/types.rb | 6 +++--- ext/dl/ptr.c | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/ext/dl/dl.c b/ext/dl/dl.c index 676a072812..1469ff82a7 100644 --- a/ext/dl/dl.c +++ b/ext/dl/dl.c @@ -92,7 +92,7 @@ rb_dl_scan_callback_args(long stack[], const char *proto, } break; default: - rb_raise(rb_eDLTypeError, "unsupported type `%c'", proto[i]); + rb_raise(rb_eDLTypeError, "scan_callback_args: unsupported type `%c'", proto[i]); break; } argv[i-1] = val; diff --git a/ext/dl/lib/dl/types.rb b/ext/dl/lib/dl/types.rb index 24595b748a..a929df6ccd 100644 --- a/ext/dl/lib/dl/types.rb +++ b/ext/dl/lib/dl/types.rb @@ -153,7 +153,7 @@ module DL "S",nil, nil], [/^const char\s*\*$/,"S",nil, nil, "S",nil, nil], - [/^.+\*$/, "p", nil, nil, + [/^.+\*$/, "P", nil, nil, "P", nil, nil], [/^.+\[\]$/, "a", nil, nil, "a", nil, nil], @@ -186,8 +186,8 @@ module DL # t1 = Regexp.new("^" + t1 + "$") # end if( (t1.is_a?(Regexp) && (t1 =~ ty)) || (t1 == ty) ) - ty1 = ty.gsub(t1,t2) - ty2 = ty.gsub(t1,t3) + ty1 = ty.gsub(t1,t2) if t2 + ty2 = ty.gsub(t1,t3) if t3 ty1.strip! if ty1 ty2.strip! if ty2 if( enc ) diff --git a/ext/dl/ptr.c b/ext/dl/ptr.c index 2e01d967a1..fba370b572 100644 --- a/ext/dl/ptr.c +++ b/ext/dl/ptr.c @@ -697,7 +697,7 @@ cary2ary(void *ptr, char t, int len) ptr = (char *)ptr + sizeof(short); break; default: - rb_raise(rb_eDLTypeError, "unsupported type '%c'", t); + rb_raise(rb_eDLTypeError, "cary2ary: unsupported type '%c'", t); } return elem; } @@ -735,7 +735,7 @@ cary2ary(void *ptr, char t, int len) ptr = (char *)ptr + sizeof(short); break; default: - rb_raise(rb_eDLTypeError, "unsupported type '%c'", t); + rb_raise(rb_eDLTypeError, "cary2ary: unsupported type '%c'", t); } rb_ary_push(ary, elem); }