Skip to content

Commit

Permalink
Flip the order of attach_function's first two params and eliminate re…
Browse files Browse the repository at this point in the history
…petition where the bound name is the same as the C name.

git-svn-id: http://svn.codehaus.org/jruby/trunk/jruby@7542 961051c9-f516-0410-bf72-c9f7e237a7b7
  • Loading branch information
headius committed Aug 26, 2008
1 parent efaf1df commit 9bbc5f5
Showing 1 changed file with 15 additions and 15 deletions.
30 changes: 15 additions & 15 deletions lib/ruby/site_ruby/1.8/ffi/platform/zlib.rb.ffi
Expand Up @@ -508,7 +508,7 @@ module Zlib
set_ffi_lib 'libz' set_ffi_lib 'libz'


# deflateInit2 is a macro pointing to deflateInit2_ # deflateInit2 is a macro pointing to deflateInit2_
attach_function 'deflateInit2_', :deflateInit2_, [ attach_function :deflateInit2_, [
:pointer, # z_streamp strm :pointer, # z_streamp strm
:int, # int level :int, # int level
:int, # int method :int, # int method
Expand All @@ -524,35 +524,35 @@ module Zlib
ZLIB_VERSION, ZStream.size ZLIB_VERSION, ZStream.size
end end


attach_function 'deflate', :deflate, [:pointer, :int], :int attach_function :deflate, [:pointer, :int], :int
attach_function 'deflateEnd', :deflateEnd, [:pointer], :int attach_function :deflateEnd, [:pointer], :int
attach_function 'deflateParams', :deflateParams, [:pointer, :int, :int], attach_function :deflateParams, [:pointer, :int, :int],
:int :int
attach_function 'deflateReset', :deflateReset, [:pointer], :int attach_function :deflateReset, [:pointer], :int
attach_function 'deflateSetDictionary', :deflateSetDictionary, attach_function :deflateSetDictionary,
[:pointer, :string, :uint], :int [:pointer, :string, :uint], :int


# inflateInit2 is a macro pointing to inflateInit2_ # inflateInit2 is a macro pointing to inflateInit2_
attach_function 'inflateInit2_', :inflateInit2_, attach_function :inflateInit2_,
[:pointer, :int, :string, :int], :int [:pointer, :int, :string, :int], :int


def self.inflateInit2(stream, window_bits) def self.inflateInit2(stream, window_bits)
inflateInit2_ stream, window_bits, ZLIB_VERSION, ZStream.size inflateInit2_ stream, window_bits, ZLIB_VERSION, ZStream.size
end end


attach_function 'inflate', :inflate, [:pointer, :int], :int attach_function :inflate, [:pointer, :int], :int
attach_function 'inflateEnd', :inflateEnd, [:pointer], :int attach_function :inflateEnd, [:pointer], :int
attach_function 'inflateReset', :inflateReset, [:pointer], :int attach_function :inflateReset, [:pointer], :int
attach_function 'inflateSetDictionary', :inflateSetDictionary, attach_function :inflateSetDictionary,
[:pointer, :string, :uint], :int [:pointer, :string, :uint], :int


attach_function 'adler32', :adler32_c, [:ulong, :string, :uint], attach_function :adler32_c, :adler32, [:ulong, :string, :uint],
:ulong :ulong
attach_function 'crc32', :crc32_c, [:ulong, :string, :uint], attach_function :crc32_c, :crc32, [:ulong, :string, :uint],
:ulong :ulong
attach_function 'get_crc_table', :get_crc_table_c, [], :pointer attach_function :get_crc_table_c, :get_crc_table, [], :pointer


attach_function 'zError', :zError, [:int], :string attach_function :zError, [:int], :string


# Chunk size for inflation and deflation # Chunk size for inflation and deflation


Expand Down

0 comments on commit 9bbc5f5

Please sign in to comment.