|
Re: Typedefs of template instantiations not recognized properly?: msg#00144programming.swig
Did you try the last CVS version? This seem to work fine ------------- template_opaque.i ------------- %module template_opaque %include std_vector.i %{ namespace A { struct OpaqueStruct { }; } %} %inline { namespace A { struct OpaqueStruct; typedef struct OpaqueStruct OpaqueType; typedef std::vector<OpaqueType> OpaqueVectorType; void FillVector(OpaqueVectorType& v) { for (int i = 0; i < v.size(); ++i) { v[i] = OpaqueStruct(); } } } } %template(OpaqueVectorType) std::vector<A::OpaqueType>; --------------- --------------- template_opaque_runme.py ------ import template_opaque v = template_opaque.OpaqueVectorType(10) template_opaque.FillVector(v) print v[0] --------------- Marcelo Zachary Pincus wrote: The typedef resolution mechanism seems (in my hands) to play poorly with namespaces and/or the template mechanism. _______________________________________________ Swig maillist - Swig@xxxxxxxxxxxxxxx http://mailman.cs.uchicago.edu/mailman/listinfo/swig |
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| Previous by Date: | Re: renaming the .so in C->python: 00144, Martin F Krafft |
|---|---|
| Next by Date: | Re: [PATCH] assortment of problems: 00144, Marcelo Matus |
| Previous by Thread: | Re: Typedefs of template instantiations not recognized properly?i: 00144, Steve Fink |
| Next by Thread: | String Arrays: 00144, Alastair Burnett |
| Indexes: | [Date] [Thread] [Top] [All Lists] |
| News | FAQ | advertise |