Clarify typedef matching is typedef reduction only
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@11757 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
parent
2a59a2e6a9
commit
a07092b60c
1 changed files with 20 additions and 0 deletions
|
|
@ -1245,6 +1245,26 @@ is rather esoteric--there's little practical reason to write a typemap quite lik
|
||||||
to confuse your coworkers even more.
|
to confuse your coworkers even more.
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
|
<p>
|
||||||
|
As a point of clarification, it is worth emphasizing that typedef matching is a typedef <b>reduction</b> process only, that is, SWIG does not search for every single possible typedef.
|
||||||
|
Given a type in a declaration, it will only reduce the type, it won't build it up looking for typedefs.
|
||||||
|
For example, given the type <tt>Struct</tt>, the typemap below will not be used for the <tt>aStruct</tt> parameter,
|
||||||
|
because <tt>Struct</tt> is fully reduced:
|
||||||
|
</p>
|
||||||
|
|
||||||
|
<div class="code">
|
||||||
|
<pre>
|
||||||
|
struct Struct {...};
|
||||||
|
typedef Struct StructTypedef;
|
||||||
|
|
||||||
|
%typemap(in) StructTypedef {
|
||||||
|
...
|
||||||
|
}
|
||||||
|
|
||||||
|
void go(Struct aStruct);
|
||||||
|
</pre>
|
||||||
|
</div>
|
||||||
|
|
||||||
<H3><a name="Typemaps_nn19"></a>10.3.3 Default typemaps</H3>
|
<H3><a name="Typemaps_nn19"></a>10.3.3 Default typemaps</H3>
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue