From: William S F. <ws...@fu...> - 2007-04-23 20:40:19
|
Andy Doddington wrote: > I am trying to write an interface file for std::set, based largely on the > existing one for std::string. > > However, when I specify a typemap of the form: > > %typemap(in) set { ...blah blah... }; > > then this never matches. > > However, if I change this to: > > %typemap(in) *std::*set { ...blah blah... }; > Is this a typo? You need a C++ type, so I think you mean std::set. > then a match occurs correctly. > > The question is, if this works for std::string, why not for std::set? You need to fully qualify the typemap types, so you need the std:: qualifier for both set and string. Maybe you had a 'using std::string' somewhere if you are getting a match for just 'string'? However, for member variables / global variables, it might seem a peculiar and is documented, but you need a pointer to the type unless you are using the naturalvar feature. See the docs. William |