Attachment "None" to
ticket [402702ffff]
added by
dkf
2000-12-07 18:14:58.
Index: generic/tclExecute.c
===================================================================
RCS file: /cvsroot/tcl/tcl/generic/tclExecute.c,v
retrieving revision 1.16
diff -c -r1.16 tclExecute.c
*** generic/tclExecute.c 2000/11/24 15:29:51 1.16
--- generic/tclExecute.c 2000/12/07 11:12:43
***************
*** 2505,2514 ****
case INST_LNOT:
{
/*
! * The operand must be numeric. If the operand object is
! * unshared modify it directly, otherwise create a copy to
! * modify: this is "copy on write". free any old string
! * representation since it is now invalid.
*/
double d;
--- 2505,2516 ----
case INST_LNOT:
{
/*
! * The operand must be numeric or a boolean string as
! * accepted by Tcl_GetBooleanFromObj(). If the operand
! * object is unshared modify it directly, otherwise
! * create a copy to modify: this is "copy on write".
! * Free any old string representation since it is now
! * invalid.
*/
double d;
***************
*** 2551,2557 ****
/*
* Create a new object.
*/
! if (tPtr == &tclIntType) {
i = valuePtr->internalRep.longValue;
objPtr = Tcl_NewLongObj(
(*pc == INST_UMINUS)? -i : !i);
--- 2553,2559 ----
/*
* Create a new object.
*/
! if (tPtr == &tclIntType || tPtr == &tclBooleanType) {
i = valuePtr->internalRep.longValue;
objPtr = Tcl_NewLongObj(
(*pc == INST_UMINUS)? -i : !i);
***************
*** 2575,2581 ****
/*
* valuePtr is unshared. Modify it directly.
*/
! if (tPtr == &tclIntType) {
i = valuePtr->internalRep.longValue;
Tcl_SetLongObj(valuePtr,
(*pc == INST_UMINUS)? -i : !i);
--- 2577,2583 ----
/*
* valuePtr is unshared. Modify it directly.
*/
! if (tPtr == &tclIntType || tPtr == &tclBooleanType) {
i = valuePtr->internalRep.longValue;
Tcl_SetLongObj(valuePtr,
(*pc == INST_UMINUS)? -i : !i);