fix macro clash with %mangle in swigmacros.swig so that test can run in c++ mode
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@10470 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
parent
b094149eb8
commit
7d4916b938
1 changed files with 4 additions and 6 deletions
|
|
@ -228,15 +228,14 @@ This testcase tests operators for defines
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#ifndef SWIGOCTAVE
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
|
|
||||||
#define %mangle(...) #@__VA_ARGS__
|
#define %mangle_macro(...) #@__VA_ARGS__
|
||||||
#define %mangle_str(...) ##@__VA_ARGS__
|
#define %mangle_macro_str(...) ##@__VA_ARGS__
|
||||||
|
|
||||||
%define my_func(...)
|
%define my_func(...)
|
||||||
inline const char* mangle ## #@__VA_ARGS__ () {
|
inline const char* mangle_macro ## #@__VA_ARGS__ () {
|
||||||
return %mangle_str(__VA_ARGS__);
|
return %mangle_macro_str(__VA_ARGS__);
|
||||||
}
|
}
|
||||||
%enddef
|
%enddef
|
||||||
|
|
||||||
|
|
@ -246,7 +245,6 @@ inline const char* mangle ## #@__VA_ARGS__ () {
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
#endif
|
|
||||||
|
|
||||||
|
|
||||||
#if defined (__cplusplus) \
|
#if defined (__cplusplus) \
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue