ruby-changes:11277
From: usa <ko1@a...>
Date: Wed, 11 Mar 2009 17:27:32 +0900 (JST)
Subject: [ruby-changes:11277] Ruby:r22889 (trunk): * ext/dl/win32/lib/Win32API.rb: call by :stdcall as default.
usa 2009-03-11 17:27:21 +0900 (Wed, 11 Mar 2009) New Revision: 22889 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=22889 Log: * ext/dl/win32/lib/Win32API.rb: call by :stdcall as default. [ruby-core:22826] Modified files: trunk/ChangeLog trunk/ext/dl/win32/lib/Win32API.rb Index: ChangeLog =================================================================== --- ChangeLog (revision 22888) +++ ChangeLog (revision 22889) @@ -1,3 +1,8 @@ +Wed Mar 11 17:26:38 2009 NAKAMURA Usaku <usa@r...> + + * ext/dl/win32/lib/Win32API.rb: call by :stdcall as default. + [ruby-core:22826] + Wed Mar 11 13:27:14 2009 Nobuyoshi Nakada <nobu@r...> * parse.y (stack_type): uses VALUE which is able to be stored Index: ext/dl/win32/lib/Win32API.rb =================================================================== --- ext/dl/win32/lib/Win32API.rb (revision 22888) +++ ext/dl/win32/lib/Win32API.rb (revision 22889) @@ -8,10 +8,10 @@ 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 -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/