Sha256: 8de2ff0f8a9115e0aa9e05b91eb5938fba24ad8b22aa9bff5928656f38674b1e

Contents?: true

Size: 619 Bytes

Versions: 2

Compression:

Stored size: 619 Bytes

Contents

require 'ffi'

module LibC
  extend FFI::Library
  ffi_lib FFI::Library::LIBC

  attach_function :calloc,
                  [:size_t, :size_t],
                  :pointer
  attach_function :realloc,
                  [:pointer, :size_t],
                  :pointer
  attach_function :free,
                  [:pointer],
                  :void

  attach_function :memset,
                  [:pointer, :int, :size_t],
                  :pointer

  attach_function :fdopen,
                  [:int, :string],
                  :pointer
  attach_function :fclose,
                  [:pointer],
                  :int
end

Version data entries

2 entries across 2 versions & 2 rubygems

Version Path
rnp-0.2.0 lib/rnp/lowlevel/libc.rb
netpgp-0.0.1 lib/netpgp/lowlevel/libc.rb