From: <wsf...@us...> - 2009-11-24 07:16:33
|
Revision: 11757 http://swig.svn.sourceforge.net/swig/?rev=11757&view=rev Author: wsfulton Date: 2009-11-24 07:16:26 +0000 (Tue, 24 Nov 2009) Log Message: ----------- Clarify typedef matching is typedef reduction only Modified Paths: -------------- trunk/Doc/Manual/Typemaps.html Modified: trunk/Doc/Manual/Typemaps.html =================================================================== --- trunk/Doc/Manual/Typemaps.html 2009-11-23 23:02:01 UTC (rev 11756) +++ trunk/Doc/Manual/Typemaps.html 2009-11-24 07:16:26 UTC (rev 11757) @@ -1245,6 +1245,26 @@ to confuse your coworkers even more. </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> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |