From: SourceForge.net <no...@so...> - 2009-07-24 06:53:06
|
Bugs item #2826403, was opened at 2009-07-24 06:53 Message generated for change (Tracker Item Submitted) made by auriocus You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=101645&aid=2826403&group_id=1645 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: tcl Group: None Status: Open Resolution: None Priority: 5 Private: No Submitted By: Christian Gollwitzer (auriocus) Assigned to: Nobody/Anonymous (nobody) Summary: Named objects in function calls return additional arguments Initial Comment: When a C-function with return type void is called which accepts a reference to a class, the return list has an additional argument, when it is called with a named object as opposed to a pointer: Assume a class s and a function void change_s(s&) (swigbug) 56 % s news 120 _e0db3301_p_s (swigbug) 57 % change_s [new_s cget -this] (swigbug) 58 % change_s new_s _10a03301_p_s While this is harmless with real void functions, it becomes problematic when the function returns by a pointer: void return_by_typemap(s& the_s, int *OUTPUT) (swigbug) 59 % return_by_typemap [new_s cget -this] 5 (swigbug) 60 % return_by_typemap new_s _10a03301_p_s 5 (swigbug) 61 % 95-88-123-251-dynip:swigbug chris$ The problem is, that interp->result is not cleaned after the conversion in SWIG_Tcl_ConvertPtrFromString ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=101645&aid=2826403&group_id=1645 |