summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordgp <dgp@users.sourceforge.net>2009-02-10 21:04:05 (GMT)
committerdgp <dgp@users.sourceforge.net>2009-02-10 21:04:05 (GMT)
commit23f46a304464683d61975cfe1622a61b52b2d86a (patch)
treef702137882fe7766c99fc1a85bbac55682ec836f
parent0de29ee94bd90a5b0401dd31599c0c5a44c387e2 (diff)
downloadtcl-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--ChangeLog2
-rw-r--r--generic/tclStringObj.c4
2 files changed, 3 insertions, 3 deletions
diff --git a/ChangeLog b/ChangeLog
index c05dd16..f3978af 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -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;
}