From 5310d6f92b947923caf973fcd5b1829ac142e8f3 Mon Sep 17 00:00:00 2001 From: Josh Nussbaum Date: Sun, 20 Sep 2015 21:16:16 -0400 Subject: [PATCH] Remove GenServer from FFI.Library --- examples/basic.exs | 4 +--- lib/ffi/library.ex | 7 ------- 2 files changed, 1 insertion(+), 10 deletions(-) diff --git a/examples/basic.exs b/examples/basic.exs index 58df07d..3e036fc 100644 --- a/examples/basic.exs +++ b/examples/basic.exs @@ -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") diff --git a/lib/ffi/library.ex b/lib/ffi/library.ex index 164aff1..b09cc61 100644 --- a/lib/ffi/library.ex +++ b/lib/ffi/library.ex @@ -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