From f077a9b6d129f86000831ac155f0fc23648f2d4e Mon Sep 17 00:00:00 2001 From: Marcelo Matus Date: Wed, 11 Jan 2006 23:13:36 +0000 Subject: [PATCH] more examples git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@8379 626c5289-ae23-0410-ae9c-e8d60b6d4f22 --- SWIG/Examples/python/std_map/example.i | 3 +++ SWIG/Examples/python/std_map/runme.py | 7 +++++++ 2 files changed, 10 insertions(+) diff --git a/SWIG/Examples/python/std_map/example.i b/SWIG/Examples/python/std_map/example.i index eb5794a57..1dcf8a536 100644 --- a/SWIG/Examples/python/std_map/example.i +++ b/SWIG/Examples/python/std_map/example.i @@ -24,3 +24,6 @@ namespace std { %template(halfd) half_map; %template(halfi) half_map; + +%template() std::pair; +%template(pymap) std::map; diff --git a/SWIG/Examples/python/std_map/runme.py b/SWIG/Examples/python/std_map/runme.py index 39a77a9d6..b521c9c9c 100644 --- a/SWIG/Examples/python/std_map/runme.py +++ b/SWIG/Examples/python/std_map/runme.py @@ -2,6 +2,13 @@ import example +pmap = example.pymap() +pmap["hi"] = 1 +pmap["hello"] = 2 + + + + dmap = {} dmap["hello"] = 1.0 dmap["hi"] = 2.0