summaryrefslogtreecommitdiffstats
path: root/generic
diff options
context:
space:
mode:
Diffstat (limited to 'generic')
-rw-r--r--generic/tclUnicodeObj.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/generic/tclUnicodeObj.c b/generic/tclUnicodeObj.c
index 315644d..1809b20 100644
--- a/generic/tclUnicodeObj.c
+++ b/generic/tclUnicodeObj.c
@@ -9,7 +9,7 @@
* See the file "license.terms" for information on usage and redistribution
* of this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tclUnicodeObj.c,v 1.5 1999/06/10 04:28:51 stanton Exp $
+ * RCS: @(#) $Id: tclUnicodeObj.c,v 1.6 1999/06/10 19:14:54 hershey Exp $
*/
#include <math.h>
@@ -640,7 +640,7 @@ DupUnicodeInternalRep(srcPtr, copyPtr)
Tcl_Obj *copyPtr; /* Object with internal rep to set. */
{
Unicode *srcUnicodePtr = GET_UNICODE(srcPtr);
- Unicode *copyUnicodePtr; /*GET_UNICODE(copyPtr);*/
+ Unicode *copyUnicodePtr;
/*
* If the src obj is a string of 1-byte Utf chars, then copy the
@@ -649,7 +649,7 @@ DupUnicodeInternalRep(srcPtr, copyPtr)
* internal rep, and invalidate the string rep of the new object.
*/
- if (AllSingleByteChars(srcPtr)) {
+ if (srcUnicodePtr->numChars == srcPtr->length) {
copyUnicodePtr = (Unicode *) ckalloc(sizeof(Unicode));
copyUnicodePtr->allocated = 0;
} else {
@@ -664,6 +664,7 @@ DupUnicodeInternalRep(srcPtr, copyPtr)
}
copyUnicodePtr->numChars = srcUnicodePtr->numChars;
SET_UNICODE(copyPtr, copyUnicodePtr);
+ copyPtr->typePtr = &tclUnicodeType;
}
/*