lib/ffi/hydrogen.rb in ffi-hydrogen-0.1.0 vs lib/ffi/hydrogen.rb in ffi-hydrogen-0.1.1

- old
+ new

@@ -7,10 +7,11 @@ # define hydro_secretbox_KEYBYTES 32 # define hydro_secretbox_HEADERBYTES (20 + 16) KEYBYTES = 32 HEADERBYTES = 36 - ffi_lib "vendor/main.#{::FFI::Platform::LIBSUFFIX}" + gem_base = ::File.join(::File.dirname(__FILE__), "..", "..") + ffi_lib "#{gem_base}/vendor/main.#{::FFI::Platform::LIBSUFFIX}" # void hydro_secretbox_keygen(uint8_t key[hydro_secretbox_KEYBYTES]) attach_function :_hydro_secretbox_keygen, :hydro_secretbox_keygen, [:pointer], :void # int hydro_secretbox_encrypt(uint8_t *c, const void *m_, size_t mlen, uint64_t msg_id,