Skip to content

Instantly share code, notes, and snippets.

@PJK
Created March 27, 2015 20:36
Show Gist options
  • Save PJK/9c766543b7bf9351cead to your computer and use it in GitHub Desktop.
Save PJK/9c766543b7bf9351cead to your computer and use it in GitHub Desktop.
module Libcbor
extend FFI::Library
ffi_lib ['/usr/local/lib/libcbor.so']
attach_function :cbor_new_int8, [], :pointer
attach_function :cbor_set_uint16, [:pointer, :ushort], :void
attach_function :cbor_set_uint8, [:pointer, :uchar], :void
attach_function :cbor_serialize, [:pointer, :pointer, :size_t], :size_t
puts 'yo'
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment