diff --git a/ChangeLog b/ChangeLog index de7e28045b..361ece1ff3 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +Wed Mar 11 17:26:38 2009 NAKAMURA Usaku + + * ext/dl/win32/lib/Win32API.rb: call by :stdcall as default. + [ruby-core:22826] + Wed Mar 11 13:27:14 2009 Nobuyoshi Nakada * parse.y (stack_type): uses VALUE which is able to be stored diff --git a/ext/dl/win32/lib/Win32API.rb b/ext/dl/win32/lib/Win32API.rb index 17b4c86d63..f18cec5749 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