Revert change to handling "#@" in SWIG preprocessor

The extra flexibility in expanding "#@" was considered inappropriate,
see the discussion in #2096, so revert the preprocessor part of the
changes of 5bf1497d7 (Allow customizing type mangling in SWIG
preprocessor, 2021-11-10).

This unfortunately means that the macros used in <attribute.i> don't
work for C backend any longer, so a previously passed unit test had to
be disabled.
This commit is contained in:
Vadim Zeitlin 2022-01-15 16:35:21 +01:00
commit c1fcf99ea7
2 changed files with 3 additions and 2 deletions

View file

@ -929,14 +929,14 @@ static String *expand_macro(String *name, List *args, String *line_file) {
/* Non-standard mangle expansions.
The #@Name is replaced by mangle_arg(Name). */
if (strstr(Char(ns), "\004")) {
String *marg = Swig_name_type(arg);
String *marg = Swig_string_mangle(arg);
Clear(temp);
Printf(temp, "\004%s", aname);
Replace(ns, temp, marg, DOH_REPLACE_ID_END);
Delete(marg);
}
if (strstr(Char(ns), "\005")) {
String *marg = Swig_name_type(arg);
String *marg = Swig_string_mangle(arg);
Clear(temp);
Clear(tempa);
Printf(temp, "\005%s", aname);