|
From: Jan N. <jan...@gm...> - 2008-11-27 16:32:58
|
2008/11/23 Joe English <jen...@fl...>:
>
> Jan Nijtmans wrote:
>> This is a Call For Votes on TIP #340.
>>
>> TIP #340: CONST Qualification of Tcl_SetResult's argument and -Wwrite-string
>
> TIP#340: NO.
>
> I support the goals of this TIP, but not the specific
> proposed refactoring. It leaves Tcl_SetResult() in a
> broken state: with an incorrect const qualifier on the
> second argument and a worthless vestigial third argument.
Understandably (is that good english?...) there were no
other votes on this, and after Joe's response Joe and I
have been working to resolve our 'conflict'. Therefore I
decided to modify the TIP along the following lines.
- The Tcl_SetResult signature will not change, but this
function will be deprecated in full. It will be replaced
by a macro:
#define Tcl_SetStringResult(interp, s) \
Tcl_SetObjResult(interp, Tcl_NewStringObj(s, -1))
This allows to modify almost all Tcl_SetResult() calls
in the core to Tcl_SetStringResult(), except for the
ones in tclResult.c and tclTest.c. All tests pass,
and all extensions compiled against Tcl 8.5 still
run unmodified with Tcl 8.6. It will still be a lot of
work to check all Tcl_SetResult() calls, because
a simple change to Tcl_SetStringResult() is not
always the best solution. (I hope that Joe will
help me with this.....)
The disadvantage is that it might break extensions
compiled against Tcl 8.6 which still use interp->result,
but since TIP #330 is accepted, who cares!
I will create a new patch this weekend, so the vote
can go on. But then, monday is a little short.
So, I would like to delay the vote until:
Monday dec 1st, 12:00 GMT (i.e. [clock format 1228478400]).
Regards,
Jan Nijtmans
|