summaryrefslogtreecommitdiff
path: root/ext/dl/lib/dl/func.rb
diff options
context:
space:
mode:
authortenderlove <tenderlove@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2010-02-16 02:05:46 +0000
committertenderlove <tenderlove@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2010-02-16 02:05:46 +0000
commit8f8947a260891f265d4f3881f6ebac7fbbc96d7a (patch)
treeaefc68d6bc2c9e8e3693e420952544cf1515c694 /ext/dl/lib/dl/func.rb
parent1e7d74f39ed82dc0f1044d30f51237592f1a6131 (diff)
* ext/dl/method.c: Adding DL::Method as a superclass for DL::Function
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26677 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ext/dl/lib/dl/func.rb')
-rw-r--r--ext/dl/lib/dl/func.rb6
1 files changed, 3 insertions, 3 deletions
diff --git a/ext/dl/lib/dl/func.rb b/ext/dl/lib/dl/func.rb
index 0ee2df1f234..c5a2dda355f 100644
--- a/ext/dl/lib/dl/func.rb
+++ b/ext/dl/lib/dl/func.rb
@@ -6,7 +6,7 @@ require 'dl/value'
require 'thread'
module DL
- class Function
+ class Function < DL::Method
include DL
include ValueUtil
@@ -20,7 +20,7 @@ module DL
end
@args = argtypes
- native_init(@args.reject { |x| x == TYPE_VOID }, cfunc.ctype, abi)
+ super(@cfunc, @args.reject { |x| x == TYPE_VOID }, cfunc.ctype, abi)
end
def to_i()
@@ -35,7 +35,7 @@ module DL
if block_given?
args.find { |a| DL::Function === a }.bind_at_call(&block)
end
- native_call(*args)
+ super
end
def wrap_result(r)