summaryrefslogtreecommitdiff
path: root/ext/dl/win32
diff options
context:
space:
mode:
authorusa <usa@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2009-03-11 08:27:21 +0000
committerusa <usa@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2009-03-11 08:27:21 +0000
commitdf63af6be28cbed1b3652b7f00f68b18ce16345e (patch)
tree4729aaf3eb897b6053f5d55a45b3b70e53b805dc /ext/dl/win32
parent8a41bd7f51506b455d9559c2c9229bd54a59c1f3 (diff)
* ext/dl/win32/lib/Win32API.rb: call by :stdcall as default.
[ruby-core:22826] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22889 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ext/dl/win32')
-rw-r--r--ext/dl/win32/lib/Win32API.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/ext/dl/win32/lib/Win32API.rb b/ext/dl/win32/lib/Win32API.rb
index 17b4c86d635..f18cec57496 100644
--- a/ext/dl/win32/lib/Win32API.rb
+++ b/ext/dl/win32/lib/Win32API.rb
@@ -8,10 +8,10 @@ class Win32API
DLL = {}
TYPEMAP = {"0" => DL::TYPE_VOID, "S" => DL::TYPE_VOIDP, "I" => DL::TYPE_LONG}
- def initialize(dllname, func, import, export = "0", *rest)
+ def initialize(dllname, func, import, export = "0", calltype = :stdcall)
@proto = [import].join.tr("VPpNnLlIi", "0SSI").sub(/^(.)0*$/, '\1')
handle = DLL[dllname] ||= DL.dlopen(dllname)
- @func = DL::CFunc.new(handle[func], TYPEMAP[export.tr("VPpNnLlIi", "0SSI")], func, *rest)
+ @func = DL::CFunc.new(handle[func], TYPEMAP[export.tr("VPpNnLlIi", "0SSI")], func, calltype)
rescue DL::DLError => e
raise LoadError, e.message, e.backtrace
end