From eca2d2129c52d6cc777390d8944e5ed0dab28807 Mon Sep 17 00:00:00 2001 From: Ariel Otilibili Date: Sun, 4 Feb 2024 12:29:03 +0100 Subject: [PATCH] Removed have_callback_support * introduced by 95f723e1e043eaa948807c9e5572d9f948ad3585 * mentioned as well in 47bcbd49b6fdef020cf190c20a13856dd86c0577 * introduced for compatibility with OTP R14 * CI/CD now tests from R19 and onwards. --- rebar.config | 1 - src/ec_dictionary.erl | 23 ----------------------- src/ec_vsn.erl | 15 --------------- 3 files changed, 39 deletions(-) diff --git a/rebar.config b/rebar.config index 97e689c..dcdc11e 100644 --- a/rebar.config +++ b/rebar.config @@ -10,7 +10,6 @@ %% Compiler Options ============================================================ {erl_opts, [{platform_define, "^[0-9]+", namespaced_types}, - {platform_define, "^[0-9]+", have_callback_support}, {platform_define, "^2", unicode_str}, {platform_define, "^(R|1|20)", fun_stacktrace}, debug_info, diff --git a/src/ec_dictionary.erl b/src/ec_dictionary.erl index 423914a..ea7fdc9 100644 --- a/src/ec_dictionary.erl +++ b/src/ec_dictionary.erl @@ -42,8 +42,6 @@ -type key(T) :: T. -type value(T) :: T. --ifdef(have_callback_support). - -callback new() -> any(). -callback has_key(key(any()), any()) -> boolean(). -callback get(key(any()), any()) -> any(). @@ -55,27 +53,6 @@ -callback from_list([{key(any()), value(any())}]) -> any(). -callback keys(any()) -> [key(any())]. --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) -> - [{new, 0}, - {has_key, 2}, - {get, 2}, - {add, 3}, - {remove, 2}, - {has_value, 2}, - {size, 1}, - {to_list, 1}, - {from_list, 1}, - {keys, 1}]; -behaviour_info(_Other) -> - undefined. --endif. - %%%=================================================================== %%% API %%%=================================================================== diff --git a/src/ec_vsn.erl b/src/ec_vsn.erl index 2f38090..e407b9f 100644 --- a/src/ec_vsn.erl +++ b/src/ec_vsn.erl @@ -27,24 +27,9 @@ %% however you should not rely on the internal representation here -type t() :: #t{}. --ifdef(have_callback_support). - -callback new() -> any(). -callback vsn(any()) -> {ok, string()} | {error, Reason::any()}. --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) -> - [{new, 0}, - {vsn, 1}]; -behaviour_info(_Other) -> - undefined. --endif. - %%%=================================================================== %%% API %%%===================================================================