aboutsummaryrefslogtreecommitdiffstats
path: root/lib/wx/api_gen/wx_gen.erl
diff options
context:
space:
mode:
authorDan Gudmundsson <[email protected]>2012-10-24 15:16:04 +0200
committerDan Gudmundsson <[email protected]>2013-01-09 11:41:40 +0100
commit0d2d008ecfc8e2f5c5d14ff38bf8da0d28a3fdb4 (patch)
tree6d5ac93431331879f8d8d7e94c62b7536976870b /lib/wx/api_gen/wx_gen.erl
parent5f99f7197518fc93f0337834c26810f8ee949c39 (diff)
downloadotp-0d2d008ecfc8e2f5c5d14ff38bf8da0d28a3fdb4.tar.gz
otp-0d2d008ecfc8e2f5c5d14ff38bf8da0d28a3fdb4.tar.bz2
otp-0d2d008ecfc8e2f5c5d14ff38bf8da0d28a3fdb4.zip
wx: Ifdef changed/removed functionality in wxWidgets-2.9.x
Diffstat (limited to 'lib/wx/api_gen/wx_gen.erl')
-rw-r--r--lib/wx/api_gen/wx_gen.erl22
1 files changed, 15 insertions, 7 deletions
diff --git a/lib/wx/api_gen/wx_gen.erl b/lib/wx/api_gen/wx_gen.erl
index 8c3b97f38e..cc1453158d 100644
--- a/lib/wx/api_gen/wx_gen.erl
+++ b/lib/wx/api_gen/wx_gen.erl
@@ -421,22 +421,30 @@ select_member(Several, #class{name=Class,file=Orig}, Defs0, Opts) ->
parse_member(Data,MType,Virtual,Opts = #hs{fopt=Fopts}) ->
Parse = fun(Con,A) -> parse_member2(Con,Opts,A) end,
- Method = #method{name=MName,params=PS0} =
+ Method = #method{name=MName,params=PS0} =
foldl(Parse, #method{method_type=MType, virtual=Virtual}, Data),
%% Skip motif name's if it's last and optional
PS2 = case PS0 of %% Backward order..
- [#param{name="name",def=Def,type=#type{name="wxString"}}|PS1]
- when Def =/= none ->
+ [#param{name="name",def=Def,type=#type{name="wxString"}}|PS1]
+ when Def =/= none ->
PS1;
_ ->
PS0
end,
Sz = length(PS2),
- PS = map(fun(P=#param{name=PName}) ->
+ PS = map(fun(P=#param{name=PName}) ->
patch_param(MName,{Sz,PName},P,Fopts)
end, PS2),
- Alias = find_erl_alias_name(MName,PS,Fopts),
- Method#method{params=PS, alias=Alias}.
+ Alias = find_erl_alias_name(MName,PS,Fopts),
+ FOpts = case gb_trees:lookup(MName, Fopts) of
+ {value, FuncO} when is_list(FuncO) ->
+ case lists:keyfind({func,Sz}, 1, FuncO) of
+ false -> FuncO;
+ {_, FuncNO} -> FuncNO
+ end;
+ _ -> []
+ end,
+ Method#method{params=PS, alias=Alias, opts=FOpts}.
find_erl_alias_name(MName,Ps,Fopts) ->
case gb_trees:lookup(MName, Fopts) of
@@ -527,7 +535,7 @@ add_param2(P=#param{name=Name},#hs{fopt=FOpt},M0=#method{name=MName,params=Ps})
M0#method{params=[Patched|Ps]}
end.
-patch_param(Method, Name, P, Opt) ->
+patch_param(Method, Name, P, Opt) ->
case gb_trees:lookup(Method,Opt) of
none -> P;
{value,NoArg} when is_integer(NoArg) -> P;