diff options
-rw-r--r-- | ChangeLog | 4 | ||||
-rw-r--r-- | generic/tclObj.c | 10 |
2 files changed, 6 insertions, 8 deletions
@@ -1,3 +1,7 @@ +2009-02-03 Don Porter <dgp@users.sourceforge.net> + + * generic/tclObj.c (Tcl_GetStringFromObj): Reduce code duplication. + 2009-02-02 Don Porter <dgp@users.sourceforge.net> * generic/tclInterp.c: Reverted the conversion of [interp] into an diff --git a/generic/tclObj.c b/generic/tclObj.c index 2b2219a..93cf2f4 100644 --- a/generic/tclObj.c +++ b/generic/tclObj.c @@ -13,7 +13,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclObj.c,v 1.147 2009/01/09 11:21:46 dkf Exp $ + * RCS: @(#) $Id: tclObj.c,v 1.148 2009/02/03 17:15:28 dgp Exp $ */ #include "tclInt.h" @@ -1099,13 +1099,7 @@ Tcl_GetStringFromObj( * rep's byte array length should * be stored. * If NULL, no length is stored. */ { - if (objPtr->bytes == NULL) { - if (objPtr->typePtr->updateStringProc == NULL) { - Tcl_Panic("UpdateStringProc should not be invoked for type %s", - objPtr->typePtr->name); - } - objPtr->typePtr->updateStringProc(objPtr); - } + (void) TclGetString(objPtr); if (lengthPtr != NULL) { *lengthPtr = objPtr->length; |