From 8b0e8e9f3e836821fb6b7d0bf2817a5fb7ce821d Mon Sep 17 00:00:00 2001 From: Eric B Merritt Date: Fri, 5 Apr 2013 12:35:10 -0700 Subject: remove debug print statement that some how made it in --- src/rcl_dscv_util.erl | 1 - 1 file changed, 1 deletion(-) (limited to 'src') diff --git a/src/rcl_dscv_util.erl b/src/rcl_dscv_util.erl index 4fb6126..ba66500 100644 --- a/src/rcl_dscv_util.erl +++ b/src/rcl_dscv_util.erl @@ -93,7 +93,6 @@ discover_dir(ProcessDir, File, directory) -> end; discover_dir(ProcessDir, File, file) -> Res = ProcessDir(File, file), - io:format("Result -> ~p~n", [Res]), case ProcessDir(File, file) of {ok, Result} -> [{ok, Result}]; -- cgit v1.2.3 From a55808420959bae0d9097ab97bc96e1fc4b4d19b Mon Sep 17 00:00:00 2001 From: Eric B Merritt Date: Fri, 5 Apr 2013 14:02:59 -0700 Subject: fix unexpected variable issue in build --- src/rcl_dscv_util.erl | 1 - 1 file changed, 1 deletion(-) (limited to 'src') diff --git a/src/rcl_dscv_util.erl b/src/rcl_dscv_util.erl index ba66500..68dcb68 100644 --- a/src/rcl_dscv_util.erl +++ b/src/rcl_dscv_util.erl @@ -92,7 +92,6 @@ discover_dir(ProcessDir, File, directory) -> [Err] end; discover_dir(ProcessDir, File, file) -> - Res = ProcessDir(File, file), case ProcessDir(File, file) of {ok, Result} -> [{ok, Result}]; -- cgit v1.2.3 From a96ae5dc597cbc01515c75fea9f41a6d79be91b3 Mon Sep 17 00:00:00 2001 From: Eric B Merritt Date: Fri, 5 Apr 2013 14:31:17 -0700 Subject: support both R14 'behaviours' and R15+ 'callback info' --- src/rcl_provider.erl | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) (limited to 'src') diff --git a/src/rcl_provider.erl b/src/rcl_provider.erl index 750b96e..4d8f044 100644 --- a/src/rcl_provider.erl +++ b/src/rcl_provider.erl @@ -41,10 +41,28 @@ -opaque t() :: {?MODULE, module()}. + +-ifdef(have_callback_support). + -callback init(rcl_state:t()) -> {ok, rcl_state:t()} | relcool:error(). -callback do(rcl_state:t()) -> {ok, rcl_state:t()} | relcool:error(). -callback format_error(Reason::term()) -> iolist(). +-else. + +%% In the case where R14 or lower is being used to compile the system +%% we need to export a behaviour info +-export([behaviour_info/1]). +-spec behaviour_info(atom()) -> [{atom(), arity()}] | undefined. +behaviour_info(callbacks) -> + [{init, 1}, + {do, 1}, + {format_error, 1}]; +behaviour_info(_) -> + undefined. + +-endif. + %%%=================================================================== %%% API %%%=================================================================== -- cgit v1.2.3