You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@couchdb.apache.org by wi...@apache.org on 2020/01/10 08:13:03 UTC
[couchdb-mochiweb] 06/32: Remove compile(tuple_calls) from
mochiweb_acceptor
This is an automated email from the ASF dual-hosted git repository.
willholley pushed a commit to branch upstream-2.20.0
in repository https://gitbox.apache.org/repos/asf/couchdb-mochiweb.git
commit 2ab10af9c207c13947eab861a55b40d2c33550cf
Author: Bob Ippolito <bo...@redivi.com>
AuthorDate: Sat Mar 9 20:38:37 2019 +0000
Remove compile(tuple_calls) from mochiweb_acceptor
---
src/mochiweb_acceptor.erl | 8 +++-----
1 file changed, 3 insertions(+), 5 deletions(-)
diff --git a/src/mochiweb_acceptor.erl b/src/mochiweb_acceptor.erl
index 3fd6925..1b53552 100644
--- a/src/mochiweb_acceptor.erl
+++ b/src/mochiweb_acceptor.erl
@@ -24,8 +24,6 @@
-module(mochiweb_acceptor).
-author('bob@mochimedia.com').
--compile(tuple_calls).
-
-include("internal.hrl").
-export([start_link/3, start_link/4, init/4]).
@@ -75,11 +73,11 @@ init(Server, Listen, Loop, Opts) ->
exit({error, accept_failed})
end.
-call_loop({M, F}, Socket, Opts) ->
+call_loop({M, F}, Socket, Opts) when is_atom(M) ->
M:F(Socket, Opts);
-call_loop({M, F, [A1]}, Socket, Opts) ->
+call_loop({M, F, [A1]}, Socket, Opts) when is_atom(M) ->
M:F(Socket, Opts, A1);
-call_loop({M, F, A}, Socket, Opts) ->
+call_loop({M, F, A}, Socket, Opts) when is_atom(M) ->
erlang:apply(M, F, [Socket, Opts | A]);
call_loop(Loop, Socket, Opts) ->
Loop(Socket, Opts).