|
Directors and returning by value.: msg#00080programming.swig
Hello swig, SWIG doesn't wrap for directors methods that return objects by value? This code: //main.i %module(directors="1") test %feature("director"); %inline %{ struct D{ int value; }; struct C{ virtual ~C(){} virtual D method(){ D d; d.value = 7; return d; } }; int getValue(C&o){ D d = o.method(); return d.value; } %} ////////////////////////// Produces this warning: main.i:29: Warning(461): Unable to return type D in director method C::method (s kipping method). And works like this: Python 2.3.2 (#49, Oct 2 2003, 20:02:00) [MSC v.1200 32 bit (Intel)] on win32 Type "help", "copyright", "credits" or "license" for more information. >>> import test >>> from test import * >>> class Derived(C): ... def method(self): ... d = D() ... d.value = 13 ... return d ... >>> getValue(Derived())#should return 13 7 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: %typemap(argout) does not support sequences of consecu tive argume nts.: 00080, David Beazley |
|---|---|
| Next by Date: | Re: Directors and returning by value.: 00080, Mark Rose |
| Previous by Thread: | RE: %typemap(argout) does not support sequences of consecu tive argume nts.i: 00080, David Benjamin-bdavid02 |
| Next by Thread: | Re: Directors and returning by value.: 00080, Mark Rose |
| Indexes: | [Date] [Thread] [Top] [All Lists] |
| News | FAQ | advertise |