Update examples and readme to use name option
This commit is contained in:
@@ -11,9 +11,7 @@ Inspired by [Ruby's FFI](https://github.com/ffi/ffi)
|
|||||||
|
|
||||||
```elixir
|
```elixir
|
||||||
defmodule MyLib do
|
defmodule MyLib do
|
||||||
use FFI.Library
|
use FFI.Library, name: "libstdc++.so.6"
|
||||||
|
|
||||||
ffi_lib "libstdc++.so.6"
|
|
||||||
|
|
||||||
attach_function :puts, [:string], :int
|
attach_function :puts, [:string], :int
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -1,7 +1,5 @@
|
|||||||
defmodule MyLib do
|
defmodule MyLib do
|
||||||
use FFI.Library
|
use FFI.Library, name: "libstdc++.so.6"
|
||||||
|
|
||||||
ffi_lib "libstdc++.so.6"
|
|
||||||
|
|
||||||
attach_function :puts, [:string], :int
|
attach_function :puts, [:string], :int
|
||||||
end
|
end
|
||||||
|
|||||||
Reference in New Issue
Block a user