summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2009-03-01 10:52:48 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2009-03-01 10:52:48 +0000
commit895b3f6e06be7d9fdbb6711170889559260105a3 (patch)
treea842649ae92048fabc01b8af48c6ef01e858f4c0
parent2f3c15cb227e425205f2614e04ae388c7edc0f94 (diff)
* ext/dl/win32/lib/Win32API.rb (initialize): passes rest
arguments to DL. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22695 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r--ChangeLog5
-rw-r--r--ext/dl/win32/lib/Win32API.rb4
2 files changed, 7 insertions, 2 deletions
diff --git a/ChangeLog b/ChangeLog
index 5e745eb..61c57e5 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+Sun Mar 1 19:52:46 2009 Nobuyoshi Nakada <nobu@ruby-lang.org>
+
+ * ext/dl/win32/lib/Win32API.rb (initialize): passes res
+ arguments to DL.
+
Sun Mar 1 19:38:59 2009 Nobuyoshi Nakada <nobu@ruby-lang.org>
* ext/zlib/zlib.c (zstream_run): suppress a warning. a patch from
diff --git a/ext/dl/win32/lib/Win32API.rb b/ext/dl/win32/lib/Win32API.rb
index 97f6c51..17b4c86 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")
+ def initialize(dllname, func, import, export = "0", *rest)
@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)
+ @func = DL::CFunc.new(handle[func], TYPEMAP[export.tr("VPpNnLlIi", "0SSI")], func, *rest)
rescue DL::DLError => e
raise LoadError, e.message, e.backtrace
end