From 18fa029e29453da9f820db16b6408a9901d0557b Mon Sep 17 00:00:00 2001 From: Josh Nussbaum Date: Sun, 20 Sep 2015 20:16:22 -0400 Subject: [PATCH] Refactor params for public API and handle_call/1 --- lib/ffi/library.ex | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/ffi/library.ex b/lib/ffi/library.ex index 77902fd..164aff1 100644 --- a/lib/ffi/library.ex +++ b/lib/ffi/library.ex @@ -21,15 +21,15 @@ defmodule FFI.Library do defmacro attach_function(name, arguments, return_type) do quote do - def unquote(name)(pid, x) do - args = {unquote(name), x} + def unquote(name)(pid, params) do + args = {unquote(name), params} GenServer.call(pid, args) end - def handle_call({unquote(name), x}, _from, state) do + def handle_call({unquote(name), params}, _from, state) do IO.puts ffi_lib - a = IO.puts(x) + a = IO.puts(params) {:reply, a, state} end end