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