Fix line numbers in error and warning messages for preprocessor messages within %inline. Also fixes __LINE__ within %inline
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@12200 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
parent
a44f83cf05
commit
45601f24b4
4 changed files with 50 additions and 4 deletions
|
|
@ -50,3 +50,29 @@ SILLY_CLASS
|
|||
%}
|
||||
|
||||
|
||||
%inline %{
|
||||
#ifdef SWIG
|
||||
%define BODY
|
||||
int num;
|
||||
static const int LINE_NUM = __LINE__;
|
||||
%enddef
|
||||
%define KLASS(NAME)
|
||||
struct NAME {
|
||||
BODY
|
||||
};
|
||||
%enddef
|
||||
#else
|
||||
#define KLASS(NAME) \
|
||||
struct NAME { \
|
||||
int num; \
|
||||
};
|
||||
#endif
|
||||
KLASS(SillyMultipleMacroStruct)
|
||||
%}
|
||||
|
||||
%inline %{
|
||||
|
||||
#define INLINE_FILE __FILE__
|
||||
#define INLINE_LINE __LINE__
|
||||
%}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue