Removed have_callback_support

* introduced by 95f723e1e0
* mentioned as well in 47bcbd49b6
* introduced for compatibility with OTP R14
* CI/CD now tests from R19 and onwards.
This commit is contained in:
Ariel Otilibili 2024-02-04 12:29:03 +01:00
parent 20d049ea4f
commit eca2d2129c
3 changed files with 0 additions and 39 deletions

View file

@ -10,7 +10,6 @@
%% Compiler Options ============================================================ %% Compiler Options ============================================================
{erl_opts, {erl_opts,
[{platform_define, "^[0-9]+", namespaced_types}, [{platform_define, "^[0-9]+", namespaced_types},
{platform_define, "^[0-9]+", have_callback_support},
{platform_define, "^2", unicode_str}, {platform_define, "^2", unicode_str},
{platform_define, "^(R|1|20)", fun_stacktrace}, {platform_define, "^(R|1|20)", fun_stacktrace},
debug_info, debug_info,

View file

@ -42,8 +42,6 @@
-type key(T) :: T. -type key(T) :: T.
-type value(T) :: T. -type value(T) :: T.
-ifdef(have_callback_support).
-callback new() -> any(). -callback new() -> any().
-callback has_key(key(any()), any()) -> boolean(). -callback has_key(key(any()), any()) -> boolean().
-callback get(key(any()), any()) -> any(). -callback get(key(any()), any()) -> any().
@ -55,27 +53,6 @@
-callback from_list([{key(any()), value(any())}]) -> any(). -callback from_list([{key(any()), value(any())}]) -> any().
-callback keys(any()) -> [key(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 %%% API
%%%=================================================================== %%%===================================================================

View file

@ -27,24 +27,9 @@
%% however you should not rely on the internal representation here %% however you should not rely on the internal representation here
-type t() :: #t{}. -type t() :: #t{}.
-ifdef(have_callback_support).
-callback new() -> any(). -callback new() -> any().
-callback vsn(any()) -> {ok, string()} | {error, Reason::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 %%% API
%%%=================================================================== %%%===================================================================