summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTim Watson <watson.timothy@gmail.com>2012-10-24 17:32:09 +0100
committerTim Watson <watson.timothy@gmail.com>2012-10-24 17:32:09 +0100
commit9b46e7564d8d61ccfa46b3b9279a130925f36290 (patch)
tree38c093b3a4c35bcb444d4a67958d64b0707ed534
parent66217363cd194531b3fa345fcc037c62978e95ac (diff)
downloadrabbitmq-server-git-9b46e7564d8d61ccfa46b3b9279a130925f36290.tar.gz
re-order record definitions so they match the OTP supervisor
-rw-r--r--src/supervisor2.erl22
1 files changed, 14 insertions, 8 deletions
diff --git a/src/supervisor2.erl b/src/supervisor2.erl
index 5af38573fc..a4e21e47e2 100644
--- a/src/supervisor2.erl
+++ b/src/supervisor2.erl
@@ -85,6 +85,20 @@
-export([init/1, handle_call/3, handle_info/2, terminate/2, code_change/3]).
-export([handle_cast/2]).
+%%--------------------------------------------------------------------------
+%% Records - here we differ from supervisor.erl in that we do not
+%% embed type specifications directly in our records, so that -D use_specs
+%% can be used to turn this off for older versions of Erlang
+%%--------------------------------------------------------------------------
+
+-record(child, {pid = undefined, % pid is undefined when child is not running
+ name,
+ mfa,
+ restart_type,
+ shutdown,
+ child_type,
+ modules = []}).
+
-define(DICT, dict).
-record(state, {name,
@@ -97,14 +111,6 @@
module,
args}).
--record(child, {pid = undefined, % pid is undefined when child is not running
- name,
- mfa,
- restart_type,
- shutdown,
- child_type,
- modules = []}).
-
-define(is_simple(State), State#state.strategy =:= simple_one_for_one orelse
State#state.strategy =:= simple_one_for_one_terminate).
-define(is_terminate_simple(State),