diff options
author | dgp <dgp@users.sourceforge.net> | 2009-02-10 21:04:05 (GMT) |
---|---|---|
committer | dgp <dgp@users.sourceforge.net> | 2009-02-10 21:04:05 (GMT) |
commit | 23f46a304464683d61975cfe1622a61b52b2d86a (patch) | |
tree | f702137882fe7766c99fc1a85bbac55682ec836f | |
parent | 0de29ee94bd90a5b0401dd31599c0c5a44c387e2 (diff) | |
download | tcl-23f46a304464683d61975cfe1622a61b52b2d86a.zip tcl-23f46a304464683d61975cfe1622a61b52b2d86a.tar.gz tcl-23f46a304464683d61975cfe1622a61b52b2d86a.tar.bz2 |
Removed handling of (objPtr->bytes != NULL) from UpdateStringOfString,
which is only called when objPtr->bytes is NULL.
-rw-r--r-- | ChangeLog | 2 | ||||
-rw-r--r-- | generic/tclStringObj.c | 4 |
2 files changed, 3 insertions, 3 deletions
@@ -9,6 +9,8 @@ Simplify Tcl_AttemptSetObjLength by removing unreachable code. Simplify SetStringFromAny() by removing unreachable and duplicate code. Simplify Tcl_SetObjLength by removing unreachable code. + Removed handling of (objPtr->bytes != NULL) from UpdateStringOfString, + which is only called when objPtr->bytes is NULL. 2009-02-09 Jan Nijtmans <nijtmans@users.sf.net> diff --git a/generic/tclStringObj.c b/generic/tclStringObj.c index 940e6d1..2d2622c 100644 --- a/generic/tclStringObj.c +++ b/generic/tclStringObj.c @@ -33,7 +33,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclStringObj.c,v 1.93 2009/02/10 17:37:35 dgp Exp $ */ + * RCS: @(#) $Id: tclStringObj.c,v 1.94 2009/02/10 21:04:06 dgp Exp $ */ #include "tclInt.h" #include "tommath.h" @@ -2888,7 +2888,6 @@ UpdateStringOfString( String *stringPtr; stringPtr = GET_STRING(objPtr); - if ((objPtr->bytes == NULL) || (stringPtr->allocated == 0)) { if (stringPtr->numChars <= 0) { /* * If there is no Unicode rep, or the string has 0 chars, then set @@ -2921,7 +2920,6 @@ UpdateStringOfString( dst += Tcl_UniCharToUtf(unicode[i], dst); } *dst = '\0'; - } return; } |