]> granicus.if.org Git - ejabberd/commitdiff
Comment -spec lines to compile with ancient Erlang/OTP versions.
authorBadlop <badlop@process-one.net>
Fri, 21 Aug 2009 10:24:21 +0000 (10:24 +0000)
committerBadlop <badlop@process-one.net>
Fri, 21 Aug 2009 10:24:21 +0000 (10:24 +0000)
SVN Revision: 2517

src/mod_pubsub/pubsub_db_odbc.erl

index e31ad2acad7617627608c6cfdc83e746f5d12551..3df26c17154d2a2b4b39703f3d3e364d23d53537 100644 (file)
@@ -30,7 +30,9 @@
         update_subscription/1]).
 
 
--spec read_subscription(SubID :: string()) -> {ok, #pubsub_subscription{}} |  notfound.
+%% TODO: Those -spec lines produce errors in old Erlang versions.
+%% They can be enabled again in ejabberd 3.0 because it uses R12B or higher.
+%% -spec read_subscription(SubID :: string()) -> {ok, #pubsub_subscription{}} |  notfound.
 read_subscription(SubID) ->
        case ejabberd_odbc:sql_query_t(
                ["select opt_name, opt_value "
@@ -47,19 +49,19 @@ read_subscription(SubID) ->
 
 
 
--spec delete_subscription(SubID :: string()) -> ok.
+%% -spec delete_subscription(SubID :: string()) -> ok.
 delete_subscription(SubID) ->
        ejabberd_odbc:sql_query_t(["delete from pubsub_subscription_opt "
        "where subid = '", ejabberd_odbc:escape(SubID), "'"]),
        ok.
 
 
--spec update_subscription(#pubsub_subscription{}) -> ok .
+%% -spec update_subscription(#pubsub_subscription{}) -> ok .
 update_subscription(#pubsub_subscription{subid = SubId} = Sub) -> 
        delete_subscription(SubId),
        add_subscription(Sub).
 
--spec add_subscription(#pubsub_subscription{}) -> ok.
+%% -spec add_subscription(#pubsub_subscription{}) -> ok.
 add_subscription(#pubsub_subscription{subid = SubId, options = Opts}) ->
        EscapedSubId = ejabberd_odbc:escape(SubId),
        lists:foreach(fun(Opt) ->