Merge pull request #168 from ariel-anieli/pr-callback
Removed have_callback_support
This commit is contained in:
commit
7b7d5b559d
3 changed files with 0 additions and 39 deletions
|
@ -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,
|
||||
|
|
|
@ -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
|
||||
%%%===================================================================
|
||||
|
|
|
@ -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
|
||||
%%%===================================================================
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue