diff options
author | Zandra Norman <[email protected]> | 2017-04-24 11:07:36 +0200 |
---|---|---|
committer | Zandra Norman <[email protected]> | 2017-04-24 11:07:36 +0200 |
commit | 37158d81c8a49d77b8ba32dbc560b3064127e24d (patch) | |
tree | 43b00d680f459571b2d3d60b874fbdcfdad62eca /lib/wx/test/wx_obj_test.erl | |
parent | 3ab6bcf6f9a44c998610bdf8863c07fb4f221da9 (diff) | |
parent | 9e396c8676e5a7eacbe5e7b2d93ee080298eb8fb (diff) | |
download | otp-37158d81c8a49d77b8ba32dbc560b3064127e24d.tar.gz otp-37158d81c8a49d77b8ba32dbc560b3064127e24d.tar.bz2 otp-37158d81c8a49d77b8ba32dbc560b3064127e24d.zip |
Merge branch 'zandra/stdlib/optional-callbacks/OTP-13801'
* zandra/stdlib/optional-callbacks/OTP-13801:
wx: make wx_object callbacks optional
stdlib: Make gen_fsm callbacks optional
stdlib: Make gen_event callbacks optional
stdlib: Make gen_server callbacks optional
Diffstat (limited to 'lib/wx/test/wx_obj_test.erl')
-rw-r--r-- | lib/wx/test/wx_obj_test.erl | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/wx/test/wx_obj_test.erl b/lib/wx/test/wx_obj_test.erl index 23142e28b2..1b0a9e9091 100644 --- a/lib/wx/test/wx_obj_test.erl +++ b/lib/wx/test/wx_obj_test.erl @@ -79,6 +79,9 @@ handle_cast(What, State = #state{parent=Pid}) -> Pid ! {cast, What}, {noreply, State}. +handle_info({call_undef_fun, {Mod, Fun}}, State) -> + Mod:Fun(), + {noreply, State}; handle_info(What, State = #state{parent=Pid}) -> Pid ! {info, What}, {noreply, State}. @@ -87,6 +90,8 @@ terminate(What, #state{parent=Pid, opts=Opts, user_state=US}) -> case proplists:get_value(terminate, Opts) of undefined -> ok; + {Mod, Fun} -> + Mod:Fun(); Terminate -> Terminate(US) end, |