|
Re: AW: typemaps for python lists (double,int) as function arguments: msg#00186programming.swig
At 01:45 PM 1/31/03 +0000, Marcus Stojek wrote: In reality I am using the (double*, int size) solution right now. And I Well, great minds think alike :) In "real" reality my funcitons look like: No, there's no need to write a typemap for each function. If you write one for (double*, int), it will be applied to each such couple of arguments in your functions. For the outgoing list I guess I have to use an (argout) typemap that will Yes, I think so---even though I didn't have to wrap such functions myself, so I don't have first-hand experience. The only way I found for doing this is PyList_New and a PyList_Append loop. Isn't that awfully slow? Probably. It might help to use PyList_New(size) and PyList_SetItem(list,i,obj) instead of PyList_Append---this way you allocate just once. Bye, Luigi _______________________________________________ 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 and perl580 and sun solaris compiler 5.3: 00186, Good Times |
|---|---|
| Next by Date: | Re: naive question about passing in a NULL via Python: 00186, Gerald S. Williams |
| Previous by Thread: | AW: typemaps for python lists (double,int) as function argumentsi: 00186, Marcus Stojek |
| Next by Thread: | Re: naive question about passing in a NULL via Python: 00186, Gerald S. Williams |
| Indexes: | [Date] [Thread] [Top] [All Lists] |
| News | FAQ | advertise |