|
Re: Supplying default OUTPUT values: msg#00165programming.swig
On Wed, 2004-09-22 at 13:52, William S Fulton wrote: > > Can I have SWIG assign a default value to *error, such that the value of > > $err is either zero (preferred), or undef? Alternately, is there a way > > to have SWIG override 'errno', such that $! in perl would behave as > > expected (e.g. numeric value from *error, and string value set by > > another wrapped function log_err())? > > > > Supply a new "in" typemap with your default value... > > %include "typemaps.i" > %typemap(in,numinputs=0) int *OUTPUT(int temp = -1) "$1 = &temp;"; > > William William, Thanks for the reply -- worked like a charm. Regards, Cory. -- Cory Omand <Cory.Omand@xxxxxxx> _______________________________________________ Swig maillist - Swig@xxxxxxxxxxxxxxx http://mailman.cs.uchicago.edu/mailman/listinfo/swig |
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| Previous by Date: | RE: Problems with %rename (const): 00165, Emanuel Greisen |
|---|---|
| Next by Date: | Re: Problems with %rename (const): 00165, William S Fulton |
| Previous by Thread: | Re: Supplying default OUTPUT valuesi: 00165, William S Fulton |
| Next by Thread: | FW: [jreed@xxxxxxxxxxxx: Csharp module and memory pressure on GC]: 00165, William . Fulton |
| Indexes: | [Date] [Thread] [Top] [All Lists] |
| News | FAQ | advertise |