Sha256: aaa291b8b80e9aeeafc0195a0f7681504a29806c17f54672992e2cb34c31d2a9

Contents?: true

Size: 361 Bytes

Versions: 13

Compression:

Stored size: 361 Bytes

Contents

module Ethon

  # FFI Wrapper module for Libc.
  #
  # @api private
  module Libc
    extend FFI::Library
    ffi_lib 'c'

    # :nodoc:
    def self.windows?
      !(RbConfig::CONFIG['host_os'] !~ /mingw|mswin|bccwin/)
    end

    unless windows?
      attach_function :getdtablesize, [], :int
      attach_function :free, [:pointer], :void
    end
  end
end

Version data entries

13 entries across 13 versions & 1 rubygems

Version Path
ethon-0.7.0 lib/ethon/libc.rb
ethon-0.6.3 lib/ethon/libc.rb
ethon-0.6.2 lib/ethon/libc.rb
ethon-0.6.1 lib/ethon/libc.rb
ethon-0.6.0 lib/ethon/libc.rb
ethon-0.5.12 lib/ethon/libc.rb
ethon-0.5.11 lib/ethon/libc.rb
ethon-0.5.10 lib/ethon/libc.rb
ethon-0.5.9 lib/ethon/libc.rb
ethon-0.5.8 lib/ethon/libc.rb
ethon-0.5.7 lib/ethon/libc.rb
ethon-0.5.6 lib/ethon/libc.rb
ethon-0.5.4 lib/ethon/libc.rb