|
RE: SWIG: std::string returned as reference - solution: msg#00132programming.swig
Nair, Sanjay S writes: > > This is different than most OUTPUT typemaps which do not modify their > > arguments. Use std::string &REFERENCE if you're going to do that (to > > be consistent with other typemaps that behave in the same way). > > What happens if you have multiple out params? > > Well, that's an entirely different problem. > > > > %typemap(in) std::string*, std::string& ($basetype string_temp) { > > if (!SvPOK($input)) { > > croak("Argument $argnum is not a string"); > > } > > $1 = &string_temp; > > argvi++; > > } > > I just noticed this, but why are you incrementing argvi++ in an "in" typemap? That's related to output, not input. -- Dave _______________________________________________ Swig maillist - Swig@xxxxxxxxxxxxxxx http://mailman.cs.uchicago.edu/mailman/listinfo/swig |
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| Previous by Date: | RE: SWIG: std::string returned as reference - solution: 00132, Nair, Sanjay S |
|---|---|
| Next by Date: | RE: SWIG: std::string returned as reference - solution: 00132, Nair, Sanjay S |
| Previous by Thread: | RE: SWIG: std::string returned as reference - solutioni: 00132, Nair, Sanjay S |
| Next by Thread: | RE: SWIG: std::string returned as reference - solution: 00132, Nair, Sanjay S |
| Indexes: | [Date] [Thread] [Top] [All Lists] |
| News | FAQ | advertise |