Remove GenServer from FFI.Library
This commit is contained in:
@@ -6,6 +6,4 @@ defmodule MyLib do
|
||||
attach_function :puts, [:string], :int
|
||||
end
|
||||
|
||||
{:ok, pid} = MyLib.start_link
|
||||
|
||||
MyLib.puts(pid, "Hello world")
|
||||
IO.inspect MyLib.puts("Hello world")
|
||||
|
||||
@@ -2,13 +2,6 @@ defmodule FFI.Library do
|
||||
defmacro __using__(_x) do
|
||||
quote do
|
||||
import FFI.Library
|
||||
|
||||
def start_link(args \\ []) do
|
||||
GenServer.start_link(__MODULE__, :init, [])
|
||||
end
|
||||
|
||||
def init(state),
|
||||
do: {:ok, state}
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
Reference in New Issue
Block a user