On 26/05/11 21:44, Miller, Eric wrote:
> Functions that return a vector of pointers are not getting handled consistently.
> At least in Perl and python the elements are dereferenced automatically, but Tcl returns a pointer (to a pointer) which messes up the stringified object names.
> I think this is because the tcl/std_vector.i does not have a specialized class for vector of pointers.
> I made a half-assed attempt to add them (see std_vector_tcl.i in the attached test case) but while the output typemap works, I doubt I got the input typemaps correct.
> I was going to file a bug but the sourceforge bug tracker is/was down.
> Anyways, I slapped together a minimal test case (attached) to demonstrate. I'd appreciate it if anyone has time to take a look.
> I'll file a bug as soon as the tracker is back up.
Specialization of pointers is required. There isn't much developer
expertise for Tcl, so the missing 'in' typemaps are a problem. If you
can tweak the vector<T> versions for vector<T*>, then please post your
patch to SF bug tracker and I'll test and include in next version.