summaryrefslogtreecommitdiff
path: root/lib/wx/api_gen
diff options
context:
space:
mode:
authorDan Gudmundsson <dgud@erlang.org>2020-02-17 14:29:52 +0100
committerDan Gudmundsson <dgud@erlang.org>2020-02-17 14:29:52 +0100
commit02f5d65c19ab988dbd3fc3d5b73015c0321fec35 (patch)
tree388bbcfc63e38ee36a93d83d39173e3e498b58bb /lib/wx/api_gen
parent55e72c8d188cea8c3b415ba84797d0603be478c6 (diff)
downloaderlang-02f5d65c19ab988dbd3fc3d5b73015c0321fec35.tar.gz
Update code-gen to gen correct deprecated functions
The generated code and not the generator was updated in a previous commit.
Diffstat (limited to 'lib/wx/api_gen')
-rw-r--r--lib/wx/api_gen/wx_gen_erl.erl8
1 files changed, 7 insertions, 1 deletions
diff --git a/lib/wx/api_gen/wx_gen_erl.erl b/lib/wx/api_gen/wx_gen_erl.erl
index 797533309b..d029ae77cb 100644
--- a/lib/wx/api_gen/wx_gen_erl.erl
+++ b/lib/wx/api_gen/wx_gen_erl.erl
@@ -159,7 +159,13 @@ gen_class1(C=#class{name=Name,parent=Parent,methods=Ms,options=Opts}) ->
w("-export_type([~s/0]).~n", [Name]),
case lists:filter(fun({_F,Depr}) -> Depr end, ExportList) of
[] -> ok;
- Depr -> w("-deprecated([~s]).~n~n", [args(fun({EF,_}) -> EF end, ",", Depr, 60)])
+ Depr ->
+ DepStr = "not available in wxWidgets-2.9 and later",
+ w("-deprecated([~s]).~n~n",
+ [args(fun({EF,_}) ->
+ [DFun,DArgs] = string:split(EF, "/"),
+ io_lib:format("{~s,~s,\"~s\"}", [DFun,DArgs,DepStr])
+ end, ",\n ", Depr, 60)])
end,
case lists:filter(fun({_,_,Depr}) -> Depr end, InExported) of
[] -> ok;