aboutsummaryrefslogtreecommitdiffstats
path: root/lib/wx/api_gen/wx_gen.erl
diff options
context:
space:
mode:
authorDan Gudmundsson <[email protected]>2012-12-13 08:54:29 +0100
committerDan Gudmundsson <[email protected]>2013-01-09 11:41:41 +0100
commit204d0bdc0acaf8017372a3b93f54bb846b6be58e (patch)
treed7e83d8ee7a465a1fad978d9cfdecb15e56c223e /lib/wx/api_gen/wx_gen.erl
parentad6e421879217ee76d3c7267bcd8234ec33153a1 (diff)
downloadotp-204d0bdc0acaf8017372a3b93f54bb846b6be58e.tar.gz
otp-204d0bdc0acaf8017372a3b93f54bb846b6be58e.tar.bz2
otp-204d0bdc0acaf8017372a3b93f54bb846b6be58e.zip
wx: Fix int to enum
In 2.9 several functions takes enum's instead of int as arguments, remove dirty -fpermissive fix and fix it correctly instead.
Diffstat (limited to 'lib/wx/api_gen/wx_gen.erl')
-rw-r--r--lib/wx/api_gen/wx_gen.erl8
1 files changed, 7 insertions, 1 deletions
diff --git a/lib/wx/api_gen/wx_gen.erl b/lib/wx/api_gen/wx_gen.erl
index cc1453158d..53bf9a6ecb 100644
--- a/lib/wx/api_gen/wx_gen.erl
+++ b/lib/wx/api_gen/wx_gen.erl
@@ -103,7 +103,12 @@ mangle_info({class,CN,P,O,FL}) ->
Event = get_value(event,O, false),
Acc = get_value(acc, O, []),
{Fs,Fopts} = foldr(fun(FWO={F,FO},{Fl,Fopt}) when is_list(FO) ->
- {[F|Fl],[FWO|Fopt]};
+ Opt = case F of
+ {Name, ArgLen} when is_integer(ArgLen) ->
+ {Name, FO};
+ _ -> FWO
+ end,
+ {[F|Fl],[Opt|Fopt]};
(F,{Fl,Fopt}) ->
{[F|Fl], Fopt}
end, {[],[]}, FL),
@@ -568,6 +573,7 @@ handle_param_opt(both, P) -> P#param{in=both};
handle_param_opt({def,Def},P) -> P#param{def=Def};
handle_param_opt({type,Type}, P=#param{type=T}) -> P#param{type=T#type{name=Type}};
handle_param_opt({single,Opt}, P=#param{type=T}) -> P#param{type=T#type{single=Opt}};
+handle_param_opt({base,Enum={enum,Type}}, P=#param{type=T}) -> P#param{type=T#type{base=Enum, name=Type}};
handle_param_opt({base,Opt}, P=#param{type=T}) -> P#param{type=T#type{base=Opt}};
handle_param_opt({c_only,Opt},P) -> P#param{where=c, alt=Opt};
handle_param_opt({ref, pointer}, P=#param{type=T}) ->