Skip to content

Commit

Permalink
Merge branch 'feature/otp-17-nowarn' of https://github.com/nifoc/eredis
Browse files Browse the repository at this point in the history
… into nifoc-feature/otp-17-nowarn

Conflicts:
	.travis.yml
  • Loading branch information
knutin committed Mar 4, 2015
2 parents 2f78d57 + a390585 commit 611f6c9
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 4 deletions.
7 changes: 7 additions & 0 deletions include/eredis.hrl
Expand Up @@ -17,6 +17,13 @@
-type continuation_data() :: any().
-type parser_state() :: status_continue | bulk_continue | multibulk_continue.

%% Internal types
-ifdef(namespaced_types).
-type eredis_queue() :: queue:queue().
-else.
-type eredis_queue() :: queue().
-endif.

%% Internal parser state. Is returned from parse/2 and must be
%% included on the next calls to parse/2.
-record(pstate, {
Expand Down
2 changes: 1 addition & 1 deletion include/eredis_sub.hrl
Expand Up @@ -16,7 +16,7 @@

% This is the queue of messages to send to the controlling
% process.
msg_queue :: queue(),
msg_queue :: eredis_queue(),

%% When the queue reaches this size, either drop all
%% messages or exit.
Expand Down
4 changes: 3 additions & 1 deletion rebar.config
@@ -1,4 +1,6 @@
{erl_opts, []}.
{erl_opts, [
{platform_define, "^[0-9]+", namespaced_types}
]}.
{cover_enabled, true}.
%% basho_bench_driver_erldis calls undefined functions, so disable xref_checks.
%% This allows this project to be used as a dependency by other rebar projects
Expand Down
4 changes: 2 additions & 2 deletions src/eredis_client.erl
Expand Up @@ -43,7 +43,7 @@

socket :: port() | undefined,
parser_state :: #pstate{} | undefined,
queue :: queue() | undefined
queue :: eredis_queue() | undefined
}).

%%
Expand Down Expand Up @@ -262,7 +262,7 @@ reply(Value, Queue) ->

%% @doc Send `Value' to each client in queue. Only useful for sending
%% an error message. Any in-progress reply data is ignored.
-spec reply_all(any(), queue()) -> ok.
-spec reply_all(any(), eredis_queue()) -> ok.
reply_all(Value, Queue) ->
case queue:peek(Queue) of
empty ->
Expand Down

0 comments on commit 611f6c9

Please sign in to comment.