more examples

git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@8379 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
Marcelo Matus 2006-01-11 23:13:36 +00:00
commit 54df37da81
2 changed files with 10 additions and 0 deletions

View file

@ -24,3 +24,6 @@ namespace std {
%template(halfd) half_map<std::string,double>;
%template(halfi) half_map<std::string,int>;
%template() std::pair<swig::PyObject_ptr, swig::PyObject_ptr>;
%template(pymap) std::map<swig::PyObject_ptr, swig::PyObject_ptr>;

View file

@ -2,6 +2,13 @@
import example
pmap = example.pymap()
pmap["hi"] = 1
pmap["hello"] = 2
dmap = {}
dmap["hello"] = 1.0
dmap["hi"] = 2.0