From e00bbdc59177a8a14745eaeb9a2c376c0dc97518 Mon Sep 17 00:00:00 2001 From: William S Fulton Date: Fri, 4 Nov 2011 19:51:17 +0000 Subject: [PATCH] Add docs on special variable expansion in typemap warnings git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@12834 626c5289-ae23-0410-ae9c-e8d60b6d4f22 --- Doc/Manual/Typemaps.html | 8 ++++++++ Doc/Manual/Warnings.html | 11 +++++++++-- 2 files changed, 17 insertions(+), 2 deletions(-) diff --git a/Doc/Manual/Typemaps.html b/Doc/Manual/Typemaps.html index 6331aa1ac..184062c42 100644 --- a/Doc/Manual/Typemaps.html +++ b/Doc/Manual/Typemaps.html @@ -3597,6 +3597,14 @@ with non-consecutive C/C++ arguments; a workaround such as a helper function re- the arguments to make them consecutive will need to be written.

+

10.10 Typemap warnings

+ +

+Warnings can be added to typemaps so that SWIG generates a warning message whenever the typemap is used. +See the information in the issuing warnings section. +

+ +

10.10 Typemap fragments

diff --git a/Doc/Manual/Warnings.html b/Doc/Manual/Warnings.html index 8d155ec99..2a3ce560d 100644 --- a/Doc/Manual/Warnings.html +++ b/Doc/Manual/Warnings.html @@ -257,16 +257,23 @@ Warning messages can be associated with typemaps using the
-%typemap(in, warning="901:You are really going to regret this") blah * {
+%typemap(in, warning="901:You are really going to regret this usage of $1_type $1_name") blah * {
    ...
 }
 

-In this case, the warning message will be printed whenever the typemap is actually used. +In this case, the warning message will be printed whenever the typemap is actually used and the special variables will be expanded as appropriate, for example:

+
+
+example.i:23: Warning 901: You are really going to regret this usage of blah * self
+example.i:24: Warning 901: You are really going to regret this usage of blah * stuff
+
+
+

14.5 Symbolic symbols