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:
parent
7eb67cecca
commit
c1fcf99ea7
2 changed files with 3 additions and 2 deletions
|
|
@ -56,6 +56,7 @@ FAILING_CPP_TESTS := \
|
||||||
grouping \
|
grouping \
|
||||||
import_nomodule \
|
import_nomodule \
|
||||||
li_attribute \
|
li_attribute \
|
||||||
|
li_attribute_template \
|
||||||
li_boost_shared_ptr_attribute \
|
li_boost_shared_ptr_attribute \
|
||||||
li_std_deque \
|
li_std_deque \
|
||||||
li_std_wstring \
|
li_std_wstring \
|
||||||
|
|
|
||||||
|
|
@ -929,14 +929,14 @@ static String *expand_macro(String *name, List *args, String *line_file) {
|
||||||
/* Non-standard mangle expansions.
|
/* Non-standard mangle expansions.
|
||||||
The #@Name is replaced by mangle_arg(Name). */
|
The #@Name is replaced by mangle_arg(Name). */
|
||||||
if (strstr(Char(ns), "\004")) {
|
if (strstr(Char(ns), "\004")) {
|
||||||
String *marg = Swig_name_type(arg);
|
String *marg = Swig_string_mangle(arg);
|
||||||
Clear(temp);
|
Clear(temp);
|
||||||
Printf(temp, "\004%s", aname);
|
Printf(temp, "\004%s", aname);
|
||||||
Replace(ns, temp, marg, DOH_REPLACE_ID_END);
|
Replace(ns, temp, marg, DOH_REPLACE_ID_END);
|
||||||
Delete(marg);
|
Delete(marg);
|
||||||
}
|
}
|
||||||
if (strstr(Char(ns), "\005")) {
|
if (strstr(Char(ns), "\005")) {
|
||||||
String *marg = Swig_name_type(arg);
|
String *marg = Swig_string_mangle(arg);
|
||||||
Clear(temp);
|
Clear(temp);
|
||||||
Clear(tempa);
|
Clear(tempa);
|
||||||
Printf(temp, "\005%s", aname);
|
Printf(temp, "\005%s", aname);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue