From: Shields, D. P.(Technology) <Dan...@gs...> - 2007-08-22 08:42:47
|
I'm generating java and python wrappers for an application written in C++. I have a template: %rename (toString) field<std::string>::operator const std::string&; %template (StringField) field<std::string>; This works fine for java and allows me to print a StringField as if its a string. The same trick for python doesn't work: %rename (__str__) field<std::string>::operator const std::string&; I have also tried %extend to add a __str__ function but I always get the default SWIG implementation "<SWIG Object of type...". What am I doing wrong? -- Daniel Shields Equities Technology Goldman Sachs International +44(0)207 051 4033 |