From c264ed2c5bc68ca29c93a8d7cf8db658dd0d79b7 Mon Sep 17 00:00:00 2001 From: Marcelo Matus Date: Mon, 20 Dec 2004 21:23:10 +0000 Subject: [PATCH] fix template_deftype to work with functions git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@6904 626c5289-ae23-0410-ae9c-e8d60b6d4f22 --- Examples/test-suite/template_default.i | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/Examples/test-suite/template_default.i b/Examples/test-suite/template_default.i index 2d395e763..52490cf75 100644 --- a/Examples/test-suite/template_default.i +++ b/Examples/test-suite/template_default.i @@ -162,3 +162,26 @@ namespace ns1 { } %} + + +%inline %{ + + namespace hi + { + class CFoo + { + }; + + template class CTemplate + { + }; + + typedef CTemplate TBla; // OK + typedef void (*TFunc1)(CFoo arg); // OK + typedef void (*TFunc2)(CTemplate arg); // crashes SWIG + typedef void (*TFunc3)(CTemplate* arg); // crashes SWIG + + + int foo(TFunc1 a, TFunc2 b, TFunc3 c); + } +%}