From a07092b60c93de02beacf5c689693772bf499a6f Mon Sep 17 00:00:00 2001 From: William S Fulton Date: Tue, 24 Nov 2009 07:16:26 +0000 Subject: [PATCH] Clarify typedef matching is typedef reduction only git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@11757 626c5289-ae23-0410-ae9c-e8d60b6d4f22 --- Doc/Manual/Typemaps.html | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/Doc/Manual/Typemaps.html b/Doc/Manual/Typemaps.html index da4fdadc9..7a89a679a 100644 --- a/Doc/Manual/Typemaps.html +++ b/Doc/Manual/Typemaps.html @@ -1245,6 +1245,26 @@ is rather esoteric--there's little practical reason to write a typemap quite lik to confuse your coworkers even more.

+

+As a point of clarification, it is worth emphasizing that typedef matching is a typedef reduction 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 Struct, the typemap below will not be used for the aStruct parameter, +because Struct is fully reduced: +

+ +
+
+struct Struct {...};
+typedef Struct StructTypedef;
+
+%typemap(in) StructTypedef { 
+  ...
+}
+
+void go(Struct aStruct);
+
+
+

10.3.3 Default typemaps