summaryrefslogtreecommitdiff
path: root/ext/dl/lib/dl/import.rb
diff options
context:
space:
mode:
authorttate <ttate@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2004-12-14 12:42:42 +0000
committerttate <ttate@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2004-12-14 12:42:42 +0000
commitba2fce15075685e92d5d8be13df4df69dc56f63b (patch)
treec1a8e0db8d761773c7534781a35558feb819a603 /ext/dl/lib/dl/import.rb
parent2f35e1e146592806dce5701ed853c516283399f1 (diff)
devided DL::Types#encode_type into three methods.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@7553 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ext/dl/lib/dl/import.rb')
-rw-r--r--ext/dl/lib/dl/import.rb12
1 files changed, 6 insertions, 6 deletions
diff --git a/ext/dl/lib/dl/import.rb b/ext/dl/lib/dl/import.rb
index 99978c6a14..2a98ace8ab 100644
--- a/ext/dl/lib/dl/import.rb
+++ b/ext/dl/lib/dl/import.rb
@@ -70,11 +70,11 @@ module DL
init_types()
init_sym()
- rty,renc,rdec,_,_,_ = @types.encode_type(ret)
+ rty,renc,rdec = @types.encode_return_type(ret)
if( !rty )
raise(TypeError, "unsupported type: #{ret}")
end
- ty,enc,dec = encode_types(args)
+ ty,enc,dec = encode_argument_types(args)
symty = rty + ty
module_eval("module_function :#{func}")
@@ -134,11 +134,11 @@ module DL
init_types()
init_sym()
- rty,_,rdec,_,_,_ = @types.encode_type(rettype)
+ rty,_,rdec = @types.encode_return_type(rettype)
if( !rty )
raise(TypeError, "unsupported type: #{rettype}")
end
- ty,enc,dec = encode_types(argtypes)
+ ty,enc,dec = encode_argument_types(argtypes)
symty = rty + ty
sym = symbol(name, symty)
@@ -184,13 +184,13 @@ module DL
return @retval
end
- def encode_types(tys)
+ def encode_argument_types(tys)
init_types()
encty = []
enc = nil
dec = nil
tys.each_with_index{|ty,idx|
- ty,c1,c2,_,_,_ = @types.encode_type(ty)
+ ty,c1,c2 = @types.encode_argument_type(ty)
if( !ty )
raise(TypeError, "unsupported type: #{ty}")
end