mirror of
				https://github.com/ruby/ruby.git
				synced 2022-11-09 12:17:21 -05:00 
			
		
		
		
	Use Fiddle::Importer directly
This commit is contained in:
		
							parent
							
								
									5081bd9675
								
							
						
					
					
						commit
						dd07354f27
					
				
				
				Notes:
				
					git
				
				2020-11-11 09:28:03 +09:00 
				
			
			
			
		
		
					 3 changed files with 5 additions and 14 deletions
				
			
		| 
						 | 
				
			
			@ -1,9 +0,0 @@
 | 
			
		|||
# frozen_string_literal: false
 | 
			
		||||
require 'fiddle/import'
 | 
			
		||||
 | 
			
		||||
module Win32
 | 
			
		||||
end
 | 
			
		||||
 | 
			
		||||
Win32.module_eval do
 | 
			
		||||
  Importer = Fiddle::Importer
 | 
			
		||||
end
 | 
			
		||||
| 
						 | 
				
			
			@ -1,5 +1,5 @@
 | 
			
		|||
# 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
 | 
			
		|||
    #
 | 
			
		||||
    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
 | 
			
		|||
    #
 | 
			
		||||
    module API
 | 
			
		||||
      include Constants
 | 
			
		||||
      extend Importer
 | 
			
		||||
      extend Fiddle::Importer
 | 
			
		||||
      dlload "advapi32.dll"
 | 
			
		||||
      [
 | 
			
		||||
        "long RegOpenKeyExW(void *, void *, long, long, void *)",
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -11,7 +11,7 @@
 | 
			
		|||
# 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
 | 
			
		|||
 | 
			
		||||
    # 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()
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue