http://bugzilla.novell.com/show_bug.cgi?id=535200 User mvidner@novell.com added comment http://bugzilla.novell.com/show_bug.cgi?id=535200#c2 Martin Vidner <mvidner@novell.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Priority|P5 - None |P3 - Medium Status|NEW |ASSIGNED --- Comment #2 from Martin Vidner <mvidner@novell.com> 2009-08-31 08:44:07 MDT --- It's this code in http://svn.opensuse.org/viewvc/yast/trunk/perl-bindings/pluglib-bindings/swig/stl/string.i?revision=57030&view=markup#l30 %typemap(in) std::string* (std::string temp), std::string& (std::string temp), const std::string* (std::string temp), const std::string& (std::string temp) { SV *sv; if (!SvROK($input) || !(sv = (SV*)SvRV($input)) || !SvPOK(sv) ) SWIG_croak("Type error in argument $argnum of $symname. Expected a REFERENCE to STRING.\n"); STRLEN len; const char *ptr = SvPV(sv, len); if (!ptr) SWIG_croak("Undefined variable in argument $argnum of $symname."); temp.assign(ptr, len); $1 = &temp; } Now, the typemap makes a copy of the referenced string anyway, so there is no point in requiring a reference instead of a plain string. I wonder how it can work in the other cases: $ grep "REFERENCE to STRING" LibStorage_wrap.cc | wc -l 200 -- Configure bugmail: http://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.