diff options
Diffstat (limited to 'lib/wx/api_gen/wx_gen_cpp.erl')
-rw-r--r-- | lib/wx/api_gen/wx_gen_cpp.erl | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/wx/api_gen/wx_gen_cpp.erl b/lib/wx/api_gen/wx_gen_cpp.erl index 31ed1374c2..54047f55d9 100644 --- a/lib/wx/api_gen/wx_gen_cpp.erl +++ b/lib/wx/api_gen/wx_gen_cpp.erl @@ -71,7 +71,8 @@ gen_derived_dest_2(C=#class{name=Class, options=Opts}) -> if Derived andalso (TaylorMade =:= false) -> case lists:keysearch(ifdef,1,Opts) of - {value, {ifdef, What}} -> w("#if ~p~n",[What]); + {value, {ifdef, What}} when is_list(What)-> w("#if ~s~n",[What]); + {value, {ifdef, What}} when is_atom(What) -> w("#if ~p~n",[What]); _ -> ok end, w("class E~s : public ~s {~n",[Class,Class]), @@ -270,7 +271,8 @@ gen_class(C=#class{name=Name,methods=Ms,options=Opts}) -> false -> case lists:keysearch(ifdef,1,Opts) of {value, {ifdef, What}} -> - w("#if ~p~n",[What]), + is_atom(What) andalso w("#if ~p~n",[What]), + is_list(What) andalso w("#if ~s~n",[What]), Methods = lists:flatten(Ms), MsR = [gen_method(Name,M) || M <- lists:keysort(#method.id, Methods)], |