diff options
author | dgp <dgp@users.sourceforge.net> | 2009-02-10 15:37:18 (GMT) |
---|---|---|
committer | dgp <dgp@users.sourceforge.net> | 2009-02-10 15:37:18 (GMT) |
commit | 7b3c951b15a0055349ce9b6514624ea3eee60caa (patch) | |
tree | c5c0f1d846d816a0158f7385968d196079d35658 | |
parent | 526787f45e75e5f6fb736b3f4b3938ec4eaf2c44 (diff) | |
download | tcl-7b3c951b15a0055349ce9b6514624ea3eee60caa.zip tcl-7b3c951b15a0055349ce9b6514624ea3eee60caa.tar.gz tcl-7b3c951b15a0055349ce9b6514624ea3eee60caa.tar.bz2 |
Convert all Tcl_InvalidateStringRep() calls into macros.
-rw-r--r-- | ChangeLog | 1 | ||||
-rw-r--r-- | generic/tclStringObj.c | 14 |
2 files changed, 8 insertions, 7 deletions
@@ -2,6 +2,7 @@ * generic/tclStringObj.c: Reduce code duplication in Tcl_GetUnicode*. Restrict AppendUtfToUtfRep to non-negative length appends. + Convert all Tcl_InvalidateStringRep() calls into macros. 2009-02-09 Jan Nijtmans <nijtmans@users.sf.net> diff --git a/generic/tclStringObj.c b/generic/tclStringObj.c index f74f90b..2b0157e 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.89 2009/02/10 14:59:34 dgp Exp $ */ + * RCS: @(#) $Id: tclStringObj.c,v 1.90 2009/02/10 15:37:19 dgp Exp $ */ #include "tclInt.h" #include "tommath.h" @@ -739,7 +739,7 @@ Tcl_SetStringObj( * length bytes starting at "bytes". */ - Tcl_InvalidateStringRep(objPtr); + TclInvalidateStringRep(objPtr); if (length < 0) { length = (bytes? strlen(bytes) : 0); } @@ -814,7 +814,7 @@ Tcl_SetObjLength( if (objPtr->bytes != NULL && objPtr->length != 0) { memcpy(newBytes, objPtr->bytes, (size_t) objPtr->length); - Tcl_InvalidateStringRep(objPtr); + TclInvalidateStringRep(objPtr); } objPtr->bytes = newBytes; } @@ -940,7 +940,7 @@ Tcl_AttemptSetObjLength( } if (objPtr->bytes != NULL && objPtr->length != 0) { memcpy(newBytes, objPtr->bytes, (size_t) objPtr->length); - Tcl_InvalidateStringRep(objPtr); + TclInvalidateStringRep(objPtr); } } objPtr->bytes = newBytes; @@ -1063,7 +1063,7 @@ SetUnicodeObj( memcpy(stringPtr->unicode, unicode, uallocated); stringPtr->unicode[numChars] = 0; - Tcl_InvalidateStringRep(objPtr); + TclInvalidateStringRep(objPtr); objPtr->typePtr = &tclStringType; SET_STRING(objPtr, stringPtr); } @@ -1422,7 +1422,7 @@ AppendUnicodeToUnicodeRep( stringPtr->unicode[numChars] = 0; stringPtr->numChars = numChars; - Tcl_InvalidateStringRep(objPtr); + TclInvalidateStringRep(objPtr); } /* @@ -2674,7 +2674,7 @@ TclStringObjReverse( source[lastCharIdx--] = source[i]; source[i++] = tmp; } - Tcl_InvalidateStringRep(objPtr); + TclInvalidateStringRep(objPtr); return objPtr; } |