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
This commit is contained in:
parent
bb3528c480
commit
e00bbdc591
2 changed files with 17 additions and 2 deletions
|
|
@ -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.
|
the arguments to make them consecutive will need to be written.
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
|
<H2><a name="Typemaps_warnings"></a>10.10 Typemap warnings</H2>
|
||||||
|
|
||||||
|
<p>
|
||||||
|
Warnings can be added to typemaps so that SWIG generates a warning message whenever the typemap is used.
|
||||||
|
See the information in the <a href="Warnings.html#Warnings_nn5">issuing warnings</a> section.
|
||||||
|
</p>
|
||||||
|
|
||||||
|
|
||||||
<H2><a name="Typemaps_fragments"></a>10.10 Typemap fragments</H2>
|
<H2><a name="Typemaps_fragments"></a>10.10 Typemap fragments</H2>
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -257,16 +257,23 @@ Warning messages can be associated with typemaps using the
|
||||||
|
|
||||||
<div class="code">
|
<div class="code">
|
||||||
<pre>
|
<pre>
|
||||||
%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 * {
|
||||||
...
|
...
|
||||||
}
|
}
|
||||||
</pre>
|
</pre>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<p>
|
<p>
|
||||||
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 <a href="Typemaps.html#Typemaps_special_variables">special variables</a> will be expanded as appropriate, for example:
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
|
<div class="shell">
|
||||||
|
<pre>
|
||||||
|
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
|
||||||
|
</pre>
|
||||||
|
</div>
|
||||||
|
|
||||||
<H2><a name="Warnings_symbolic_symbols"></a>14.5 Symbolic symbols</H2>
|
<H2><a name="Warnings_symbolic_symbols"></a>14.5 Symbolic symbols</H2>
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue