Expand special variables in typemap warnings

git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@12832 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
William S Fulton 2011-11-03 19:41:09 +00:00
commit 3c1ca906ac
5 changed files with 53 additions and 12 deletions

View file

@ -205,6 +205,13 @@ $source by $input and $target by $1. For typemaps related to return values (ou
argout,ret,except), replace $source by $1 and $target by $result. See the file
Doc/Manual/Typemaps.html for complete details.
:::::::::::::::::::::::::::::::: swig_typemap_warn.i :::::::::::::::::::::::::::::::::::
swig_typemap_warn.i:7: Warning 1001: Test warning for 'out' typemap for double mmm (result) - name: mmm symname: mmm &1_ltype: double * descriptor: SWIGTYPE_double
swig_typemap_warn.i:7: Warning 1000: Test warning for 'in' typemap for int abc (arg1) - argnum: 1 &1_ltype: int * descriptor: SWIGTYPE_int
swig_typemap_warn.i:7: Warning 1000: Test warning for 'in' typemap for int arg2 (arg2) - argnum: 2 &1_ltype: int * descriptor: SWIGTYPE_int
swig_typemap_warn.i:7: Warning 1000: Test warning for 'in' typemap for int abc (arg1) - argnum: 1 &1_ltype: int * descriptor: SWIGTYPE_int
swig_typemap_warn.i:7: Warning 1000: Test warning for 'in' typemap for int arg2 (arg2) - argnum: 2 &1_ltype: int * descriptor: SWIGTYPE_int
:::::::::::::::::::::::::::::::: cpp_bad_extern.i :::::::::::::::::::::::::::::::::::
cpp_bad_extern.i:5: Warning 313: Unrecognized extern type "INTERCAL".
cpp_bad_extern.i:7: Warning 313: Unrecognized extern type "INTERCAL".

View file

@ -58,6 +58,7 @@ swig_identifier
swig_insert_bad
swig_typemap_copy
swig_typemap_old
swig_typemap_warn
'
# Files run in C++ mode

View file

@ -0,0 +1,7 @@
%module xxx
%typemap(in, warning="1000:Test warning for 'in' typemap for $1_type $1_name ($1) - argnum: $argnum &1_ltype: $&1_ltype descriptor: $1_descriptor") int ""
%typemap(out, warning="1001:Test warning for 'out' typemap for $1_type $1_name ($1) - name: $name symname: $symname &1_ltype: $&1_ltype descriptor: $1_descriptor") double ""
double mmm(int abc, int);