From: Alan W. I. <ir...@be...> - 2011-04-21 00:39:20
|
On 2011-04-20 11:39-0600 Eileen Wei wrote: > Hi Alan, > > Since "%rename applies a renaming operation to all future occurrences of a name", if in the .i file I do this: > > > // interface.i //////////////////// > > %rename(result1_input) result1; > %apply double& OUTPUT { double& result2 }; > extern static bool foo2(const double& result1, double& result2 ); > > %include "header.h" > > ////////////////////////////////// > > Would this change foo1 as well? How can I make sure that the rename only applies to foo2 and not other functions? Hi Eileen: I don't think %rename can help you for the reason you mentioned. Instead, I suggest you change argument names in header.h so distinct kinds of arguments have distinct swig argument signatures. When you follow that exact suggestion does that solve your issue? Alan __________________________ Alan W. Irwin Astronomical research affiliation with Department of Physics and Astronomy, University of Victoria (astrowww.phys.uvic.ca). Programming affiliations with the FreeEOS equation-of-state implementation for stellar interiors (freeeos.sf.net); PLplot scientific plotting software package (plplot.org); the libLASi project (unifont.org/lasi); the Loads of Linux Links project (loll.sf.net); and the Linux Brochure Project (lbproject.sf.net). __________________________ Linux-powered Science __________________________ |