From 397f473edd0bb19e9525ca194b47828fa8a50174 Mon Sep 17 00:00:00 2001 From: Marcelo Matus Date: Wed, 23 Feb 2005 02:04:37 +0000 Subject: [PATCH] add private case and runtime git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@6990 626c5289-ae23-0410-ae9c-e8d60b6d4f22 --- .../test-suite/python/template_static_runme.py | 3 +++ Examples/test-suite/template_static.i | 17 +++++++++++++++++ 2 files changed, 20 insertions(+) create mode 100644 Examples/test-suite/python/template_static_runme.py diff --git a/Examples/test-suite/python/template_static_runme.py b/Examples/test-suite/python/template_static_runme.py new file mode 100644 index 000000000..e7f17af38 --- /dev/null +++ b/Examples/test-suite/python/template_static_runme.py @@ -0,0 +1,3 @@ +from template_static import * + +print Foo.bar_double(1) diff --git a/Examples/test-suite/template_static.i b/Examples/test-suite/template_static.i index 087cb3db2..e4696143d 100644 --- a/Examples/test-suite/template_static.i +++ b/Examples/test-suite/template_static.i @@ -14,3 +14,20 @@ template int foo::test = 0; %template(foo_i) foo; %template(foo_d) foo; + +%inline %{ +namespace toto { + class Foo { + public: + template + static double bar(int i) { + return 1.0; + }; + + private: + int i; + }; +} +%} + +%template(bar_double) toto::Foo::bar;