diff options
author | ttate <ttate@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2004-11-25 08:39:31 +0000 |
---|---|---|
committer | ttate <ttate@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2004-11-25 08:39:31 +0000 |
commit | f7884c6beb479950cb8863a556df38ec29806b9f (patch) | |
tree | 16884e428d2573913c0576819ad40960d29d5300 /ext/dl/lib/dl/import.rb | |
parent | f7a5ee56d72e4badc825d60af0d8efc36d3d95d1 (diff) |
bugfix for [ruby-talk:121309].
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@7372 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ext/dl/lib/dl/import.rb')
-rw-r--r-- | ext/dl/lib/dl/import.rb | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/ext/dl/lib/dl/import.rb b/ext/dl/lib/dl/import.rb index f145c0fedf..99978c6a14 100644 --- a/ext/dl/lib/dl/import.rb +++ b/ext/dl/lib/dl/import.rb @@ -71,6 +71,9 @@ module DL init_sym() rty,renc,rdec,_,_,_ = @types.encode_type(ret) + if( !rty ) + raise(TypeError, "unsupported type: #{ret}") + end ty,enc,dec = encode_types(args) symty = rty + ty @@ -132,6 +135,9 @@ module DL init_sym() rty,_,rdec,_,_,_ = @types.encode_type(rettype) + if( !rty ) + raise(TypeError, "unsupported type: #{rettype}") + end ty,enc,dec = encode_types(argtypes) symty = rty + ty @@ -185,6 +191,9 @@ module DL dec = nil tys.each_with_index{|ty,idx| ty,c1,c2,_,_,_ = @types.encode_type(ty) + if( !ty ) + raise(TypeError, "unsupported type: #{ty}") + end encty.push(ty) if( enc ) if( c1 ) |