|
carrays: getitem to return a reference: msg#00118programming.swig
Hello swig, today carrays getitem method returns copy of held object: //carrays.i TYPE getitem(int index) { return self[index]; } what works for me is getitem returning reference: TYPE* getitem(int index) { return self+index; } Is it an acceptable change? I think it would be consistent with how indexing works in c/c++ and python(don't know about other languages). Best regards, Kerim mailto:warkid@xxxxxxxxx _______________________________________________ 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-PERL-Vector of pointers: 00118, Luigi Ballabio |
|---|---|
| Next by Date: | carrays: getitem to return a reference: 00118, David Beazley |
| Previous by Thread: | ignoring inputs and using self objects in typemapsi: 00118, Viktor Marohnic |
| Next by Thread: | carrays: getitem to return a reference: 00118, David Beazley |
| Indexes: | [Date] [Thread] [Top] [All Lists] |
| News | FAQ | advertise |