From: Marcelo M. <mar...@us...> - 2004-12-13 20:22:56
|
Update of /cvsroot/swig/SWIG/Examples/test-suite In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv15752/Examples/test-suite Modified Files: common.mk Added Files: director_string.i Log Message: fix directorout typemap for const std::string&. Adding warning about the new typemap, which is not thread safe --- NEW FILE: director_string.i --- %module(directors="1") director_string; %include stl.i %include std_vector.i %include std_string.i // Using thread unsafe wrapping %warnfilter(470) A; %{ #include <vector> #include <string> %} %feature("director") A; %inline %{ struct A { A(const std::string& first) : m_strings(1, first) {} virtual ~A() {} virtual const std::string& get_first() const { return get(0); } virtual const std::string& get(int n) const { return m_strings.at(n); } std::vector<std::string> m_strings; }; %} %template(StringVector) std::vector<std::string>; Index: common.mk =================================================================== RCS file: /cvsroot/swig/SWIG/Examples/test-suite/common.mk,v retrieving revision 1.126 retrieving revision 1.127 diff -C2 -d -r1.126 -r1.127 *** common.mk 12 Dec 2004 21:40:17 -0000 1.126 --- common.mk 13 Dec 2004 20:22:16 -0000 1.127 *************** *** 120,123 **** --- 120,124 ---- director_protected \ director_redefined \ + director_string \ director_unroll \ director_wombat \ |