summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthias Radestock <matthias@rabbitmq.com>2010-11-06 10:47:26 +0000
committerMatthias Radestock <matthias@rabbitmq.com>2010-11-06 10:47:26 +0000
commitef7ea33e62929a597fd5d7e7dd277018381b6656 (patch)
treec2c056b5b643b7f63072b311e4e6aba6afe1ccdb
parent21c9ea0f509c0039ba62c6732cacb5d7bdc34261 (diff)
downloadrabbitmq-server-git-ef7ea33e62929a597fd5d7e7dd277018381b6656.tar.gz
fix a spec error in gen_server2:system_terminate/4
...and some cosmetic spec changes.
-rw-r--r--src/gen_server2.erl13
1 files changed, 6 insertions, 7 deletions
diff --git a/src/gen_server2.erl b/src/gen_server2.erl
index 85a9852560..6e02b23ecb 100644
--- a/src/gen_server2.erl
+++ b/src/gen_server2.erl
@@ -192,10 +192,13 @@
-ifdef(use_specs).
--spec(handle_common_termination/3 ::
- (any(), atom(), #gs2_state{}) -> no_return()).
+-type(gs2_state() :: #gs2_state{}).
--spec(hibernate/1 :: (#gs2_state{}) -> no_return()).
+-spec(handle_common_termination/3 ::
+ (any(), atom(), gs2_state()) -> no_return()).
+-spec(hibernate/1 :: (gs2_state()) -> no_return()).
+-spec(pre_hibernate/1 :: (gs2_state()) -> no_return()).
+-spec(system_terminate/4 :: (_, _, _, gs2_state()) -> no_return()).
-endif.
@@ -903,10 +906,6 @@ reply(Name, {To, Tag}, Reply, State, Debug) ->
system_continue(Parent, Debug, GS2State) ->
loop(GS2State #gs2_state { parent = Parent, debug = Debug }).
--ifdef(use_specs).
--spec system_terminate(_, _, _, [_]) -> no_return().
--endif.
-
system_terminate(Reason, _Parent, Debug, GS2State) ->
terminate(Reason, [], GS2State #gs2_state { debug = Debug }).