aboutsummaryrefslogtreecommitdiffstats
path: root/lib/stdlib/src/gen_statem.erl
diff options
context:
space:
mode:
authorRaimo Niskanen <[email protected]>2016-02-18 16:38:57 +0100
committerRaimo Niskanen <[email protected]>2016-02-18 16:38:57 +0100
commit26a7af61fbffae90c0968d945ae8b146582ba068 (patch)
treef12f35150ed1ae57054d6a66810db72363a54e2d /lib/stdlib/src/gen_statem.erl
parent82f34a7a9de85b4afc0dac4c9c426939264c5039 (diff)
downloadotp-26a7af61fbffae90c0968d945ae8b146582ba068.tar.gz
otp-26a7af61fbffae90c0968d945ae8b146582ba068.tar.bz2
otp-26a7af61fbffae90c0968d945ae8b146582ba068.zip
Change initial PrevState to 'undefined'
Diffstat (limited to 'lib/stdlib/src/gen_statem.erl')
-rw-r--r--lib/stdlib/src/gen_statem.erl7
1 files changed, 4 insertions, 3 deletions
diff --git a/lib/stdlib/src/gen_statem.erl b/lib/stdlib/src/gen_statem.erl
index 486f61b1ed..e03e22b087 100644
--- a/lib/stdlib/src/gen_statem.erl
+++ b/lib/stdlib/src/gen_statem.erl
@@ -459,13 +459,13 @@ do_send(Proc, Msg) ->
enter(Module, Options, State, StateData, Server, InitOps, Parent) ->
Name = gen:get_proc_name(Server),
Debug = gen:debug_options(Name, Options),
- PrevState = make_ref(),
+ PrevState = undefined,
S = #{
callback_mode => state_functions,
module => Module,
name => Name,
prev_state => PrevState,
- state => PrevState,
+ state => PrevState, % Will be discarded by loop_event_state_ops
state_data => StateData,
timer => undefined,
postponed => [],
@@ -475,7 +475,8 @@ enter(Module, Options, State, StateData, Server, InitOps, Parent) ->
loop_event_state_ops(
Parent, Debug,
S#{callback_mode := CallbackMode},
- [], {event,undefined},
+ [],
+ {event,undefined}, % Will be discarded by {postpone,false}
State, StateData,
StateOps++[{postpone,false}]);
[Reason] ->