Remove long-deprecated $function variable

The $function variable in %exception/feature:except typemaps is
no longer recognised.  It was marked as deprecated in 2008.
Use $action (added in 2001) instead which has exactly the same
value.

SWIG/D has an unrelated $function variable which is substituted in
%pragma(d) wrapperloaderbindcommand - this is still supported.
This commit is contained in:
Olly Betts 2025-06-09 13:58:42 +12:00
parent f0fb79152e
commit 3be7697a33
2 changed files with 9 additions and 1 deletions

View File

@ -7,6 +7,15 @@ the issue number to the end of the URL: https://github.com/swig/swig/issues/
Version 4.4.0 (in progress)
===========================
2025-06-09: olly
The $function variable in %exception/feature:except typemaps is
no longer recognised. It was marked as deprecated in 2008.
Use $action (added in 2001) instead which has exactly the same
value.
SWIG/D has an unrelated $function variable which is substituted in
%pragma(d) wrapperloaderbindcommand - this is still supported.
2025-06-09: olly
[Python] #3162 Fix wrapping of a bool const& parameter with a
default value. Regression introduced in SWIG 4.3.0.

View File

@ -398,7 +398,6 @@ int emit_action_code(Node *n, String *wrappercode, String *eaction) {
if ((tm) && Len(tm) && (Strcmp(tm, "1") != 0)) {
if (Strchr(tm, '$')) {
Swig_replace_special_variables(n, parentNode(n), tm);
Replaceall(tm, "$function", eaction); // deprecated
Replaceall(tm, "$action", eaction);
}
Printv(wrappercode, tm, "\n", NIL);