diff options
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 ) |