Skip to content
Browse files

Rename type bool() to boolean().

  • Loading branch information...
1 parent 982e720 commit af2478df642d93b5ba60aa97a3783faa16920fc5 @davide davide committed Oct 10, 2009
Showing with 6 additions and 6 deletions.
  1. +4 −4 src/ewgi_api.erl
  2. +2 −2 src/utils/ewgi_util_cookie.erl
View
8 src/ewgi_api.erl
@@ -597,24 +597,24 @@ until(P, String, Parsed) ->
end.
%%--------------------------------------------------------------------
-%% @spec is_equal(string()) -> bool()
+%% @spec is_equal(string()) -> boolean()
%%
%% @doc Match = character at the head of string.
%% @end
%%--------------------------------------------------------------------
--spec is_equal(string()) -> bool().
+-spec is_equal(string()) -> boolean().
is_equal([$=|Rest]) ->
{true, Rest};
is_equal(_) ->
false.
%%--------------------------------------------------------------------
-%% @spec is_amp(string()) -> bool()
+%% @spec is_amp(string()) -> boolean()
%%
%% @doc Match & character or & entity at the beginning of string.
%% @end
%%--------------------------------------------------------------------
--spec is_amp(string()) -> bool().
+-spec is_amp(string()) -> boolean().
is_amp("&"++Rest) ->
{true, Rest};
is_amp([$&|Rest]) ->
View
4 src/utils/ewgi_util_cookie.erl
@@ -159,15 +159,15 @@ remove_cookie_headers(CookieName, [{"Set-Cookie", [CookieName|_]}|R], Acc) ->
remove_cookie_headers(CookieName, [H|R], Acc) ->
remove_cookie_headers(CookieName, R, [H|Acc]).
--spec simple_cookie(string(), string() | binary(), bool()) -> {string(), iolist()}.
+-spec simple_cookie(string(), string() | binary(), boolean()) -> {string(), iolist()}.
simple_cookie(Name, Val, Sec) when is_binary(Val) ->
simple_cookie(Name, binary_to_list(Val), Sec);
simple_cookie(Name, Val, Sec) when is_list(Name), is_list(Val) ->
S = if Sec -> "; Secure"; true -> [] end,
Exp = case Val of [] -> ?COOKIE_DELETE_TRAILER; _ -> [] end,
{"Set-Cookie", [Name, $=, Val, "; Path=/", S, Exp]}.
--spec simple_cookie(string(), binary() | string(), bool(), binary() | string()) -> {string(), iolist()}.
+-spec simple_cookie(string(), binary() | string(), boolean(), binary() | string()) -> {string(), iolist()}.
simple_cookie(Name, Val, Sec, Domain) when is_binary(Val) ->
simple_cookie(Name, binary_to_list(Val), Sec, Domain);
simple_cookie(Name, Val, Sec, Domain) when is_binary(Domain) ->

0 comments on commit af2478d

Please sign in to comment.
Something went wrong with that request. Please try again.