aboutsummaryrefslogtreecommitdiffstats
path: root/lib/wx/api_gen/wx_gen_cpp.erl
diff options
context:
space:
mode:
Diffstat (limited to 'lib/wx/api_gen/wx_gen_cpp.erl')
-rw-r--r--lib/wx/api_gen/wx_gen_cpp.erl12
1 files changed, 6 insertions, 6 deletions
diff --git a/lib/wx/api_gen/wx_gen_cpp.erl b/lib/wx/api_gen/wx_gen_cpp.erl
index 4bcdbe6a68..4b33068d8f 100644
--- a/lib/wx/api_gen/wx_gen_cpp.erl
+++ b/lib/wx/api_gen/wx_gen_cpp.erl
@@ -269,14 +269,14 @@ gen_method(CName, M=#method{name=N,params=Ps0,type=T,method_type=MT,id=MethodId
Opts = [Opt || Opt = #param{def=Def,in=In,where=Where} <- Ps2,
Def =/= none, In =/= false, Where =/= c],
decode_options(Opts, Align),
- case M#method.pre_hook of
- {c,Pre} -> w(" ~s;~n", [Pre]);
- _ -> skip
+ case gen_util:get_hook(c, M#method.pre_hook) of
+ ignore -> skip;
+ Pre -> w(" ~s;~n", [Pre])
end,
Ps3 = call_wx(N,{MT,CName},T,Ps2),
- case M#method.post_hook of
- {c, Post} -> w(" ~s;~n", [Post]);
- _ -> skip
+ case gen_util:get_hook(c, M#method.post_hook) of
+ ignore -> skip;
+ Post -> w(" ~s;~n", [Post])
end,
free_args(),
build_return_vals(T,Ps3),