diff options
author | Dan Gudmundsson <[email protected]> | 2014-01-21 15:57:57 +0100 |
---|---|---|
committer | Dan Gudmundsson <[email protected]> | 2014-01-21 15:57:57 +0100 |
commit | 31172443bfc849b879385d7ee0d2ea8019c32307 (patch) | |
tree | a66e29fe08d3bccc85a9b1a4cefdbb0f2edfceed /lib/wx/api_gen | |
parent | 744984833cc1a51f51781e3417db7f152eeab4ae (diff) | |
parent | 51e369a1b90490e69a358d8c8f0bb9bfbf9f511c (diff) | |
download | otp-31172443bfc849b879385d7ee0d2ea8019c32307.tar.gz otp-31172443bfc849b879385d7ee0d2ea8019c32307.tar.bz2 otp-31172443bfc849b879385d7ee0d2ea8019c32307.zip |
Merge branch 'dgud/wx/more-fixes/OTP-11444' into maint
* dgud/wx/more-fixes/OTP-11444:
wx: Fix hanging wx calls
Update wx build instsructions for Darwin
wx: Remove compiler option -fomit-frame-pointer on Darwin
wx: Fix crash when garbage collect event handlers (debugger caused seg fault)
wx: Fix LDFLAGS for Mac
Diffstat (limited to 'lib/wx/api_gen')
-rw-r--r-- | lib/wx/api_gen/wx_gen_cpp.erl | 34 |
1 files changed, 12 insertions, 22 deletions
diff --git a/lib/wx/api_gen/wx_gen_cpp.erl b/lib/wx/api_gen/wx_gen_cpp.erl index 7e35ebfa83..6eed0668f6 100644 --- a/lib/wx/api_gen/wx_gen_cpp.erl +++ b/lib/wx/api_gen/wx_gen_cpp.erl @@ -855,34 +855,24 @@ call_arg(#param{name=N,type={merged,_,_,_,_,_,_}}) -> N. to_string(Type) when is_atom(Type) -> atom_to_list(Type); to_string(Type) when is_list(Type) -> Type. -virtual_dest(#class{abstract=true, parent="root"}) -> false; -virtual_dest(#class{abstract=true, parent="object"}) -> true; virtual_dest(#class{abstract=true, parent=Parent}) -> - virtual_dest(get({class,Parent})); + virtual_dest(get_parent_class(Parent)); virtual_dest(#class{methods=Ms, parent=Parent}) -> case lists:keysearch(destructor,#method.method_type, lists:append(Ms)) of {value, #method{method_type=destructor, virtual=Virtual}} -> case Virtual of - undefined -> - case get({class,Parent}) of - undefined -> - case Parent of - "object" -> - true; - "root" -> - false; - _ -> - io:format("Error: ~p~n",[Parent]), - erlang:error(no_parent) - end; - PClass -> - virtual_dest(PClass) - end; - _ -> - Virtual + true -> true; + _ -> virtual_dest(get_parent_class(Parent)) end; - false -> - false + false -> virtual_dest(get_parent_class(Parent)) + end; +virtual_dest("root") -> false; +virtual_dest("object") -> true. + +get_parent_class(Parent) -> + case get({class, Parent}) of + undefined -> Parent; + Class -> Class end. debug(F,A) -> |