ruby-changes:63577
From: Hiroshi <ko1@a...>
Date: Wed, 11 Nov 2020 09:27:56 +0900 (JST)
Subject: [ruby-changes:63577] dd07354f27 (master): Use Fiddle::Importer directly
https://git.ruby-lang.org/ruby.git/commit/?id=dd07354f27 From dd07354f2797473261f06159801e50dc6445ef76 Mon Sep 17 00:00:00 2001 From: Hiroshi SHIBATA <hsbt@r...> Date: Tue, 10 Nov 2020 16:59:59 +0900 Subject: Use Fiddle::Importer directly diff --git a/ext/win32/lib/win32/importer.rb b/ext/win32/lib/win32/importer.rb deleted file mode 100644 index 2bef016..0000000 --- a/ext/win32/lib/win32/importer.rb +++ /dev/null @@ -1,9 +0,0 @@ https://github.com/ruby/ruby/blob/trunk/#L0 -# frozen_string_literal: false -require 'fiddle/import' - -module Win32 -end - -Win32.module_eval do - Importer = Fiddle::Importer -end diff --git a/ext/win32/lib/win32/registry.rb b/ext/win32/lib/win32/registry.rb index 451499b..ffc2979 100644 --- a/ext/win32/lib/win32/registry.rb +++ b/ext/win32/lib/win32/registry.rb @@ -1,5 +1,5 @@ https://github.com/ruby/ruby/blob/trunk/ext/win32/lib/win32/registry.rb#L1 # frozen_string_literal: false -require 'win32/importer' +require 'fiddle/import' module Win32 @@ -169,7 +169,7 @@ For detail, see the MSDN[http://msdn.microsoft.com/library/en-us/sysinfo/base/pr https://github.com/ruby/ruby/blob/trunk/ext/win32/lib/win32/registry.rb#L169 # class Error < ::StandardError module Kernel32 - extend Importer + extend Fiddle::Importer dlload "kernel32.dll" end FormatMessageW = Kernel32.extern "int FormatMessageW(int, void *, int, int, void *, int, void *)", :stdcall @@ -225,7 +225,7 @@ For detail, see the MSDN[http://msdn.microsoft.com/library/en-us/sysinfo/base/pr https://github.com/ruby/ruby/blob/trunk/ext/win32/lib/win32/registry.rb#L225 # module API include Constants - extend Importer + extend Fiddle::Importer dlload "advapi32.dll" [ "long RegOpenKeyExW(void *, void *, long, long, void *)", diff --git a/ext/win32/lib/win32/sspi.rb b/ext/win32/lib/win32/sspi.rb index 56cfc93..a73819f2 100644 --- a/ext/win32/lib/win32/sspi.rb +++ b/ext/win32/lib/win32/sspi.rb @@ -11,7 +11,7 @@ https://github.com/ruby/ruby/blob/trunk/ext/win32/lib/win32/sspi.rb#L11 # Ruby Distribution License or GNU General Public License. # -require 'win32/importer' +require 'fiddle/import' # Implements bindings to Win32 SSPI functions, focused on authentication to a proxy server over HTTP. module Win32 @@ -36,7 +36,7 @@ module Win32 https://github.com/ruby/ruby/blob/trunk/ext/win32/lib/win32/sspi.rb#L36 # Win32 API Functions. Uses Win32API to bind methods to constants contained in class. module API - extend Importer + extend Fiddle::Importer dlload "secur32.dll" [ # Can be called with AcquireCredentialsHandleA.call() -- cgit v0.10.2 -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/