25
1
mirror of https://github.com/processone/ejabberd.git synced 2024-12-22 17:28:25 +01:00

Require opt_type/1 callback

This commit is contained in:
Evgeny Khramtsov 2019-06-17 20:51:04 +03:00
parent ef3753aa86
commit 5a5f188767

View File

@ -62,7 +62,7 @@
-callback options() -> [atom() | {atom(), term()}].
-callback globals() -> [atom()].
-optional_callbacks([globals/0, opt_type/1]).
-optional_callbacks([globals/0]).
%%%===================================================================
%%% API
@ -418,7 +418,8 @@ callback_modules(external) ->
fun(M) ->
case code:ensure_loaded(M) of
{module, _} ->
erlang:function_exported(M, options, 0);
erlang:function_exported(M, options, 0)
andalso erlang:function_exported(M, opt_type, 1);
{error, _} ->
false
end