From 1e15563e9a0ba038175fd5b0a2dda5cca01bd363 Mon Sep 17 00:00:00 2001 From: dgp Date: Thu, 4 Aug 2005 16:32:23 +0000 Subject: Deleted the UpdateStringOfBoolean() routine, that can never be called. --- ChangeLog | 1 + generic/tclObj.c | 36 ++---------------------------------- 2 files changed, 3 insertions(+), 34 deletions(-) diff --git a/ChangeLog b/ChangeLog index 42b83b0..d318dc6 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,6 +1,7 @@ 2005-08-04 Don Porter * generic/tclObj.c: Simplified routines that manage the typeTable. + Deleted the UpdateStringOfBoolean() routine, that can never be called. 2005-08-03 Don Porter diff --git a/generic/tclObj.c b/generic/tclObj.c index f817a71..1115b6f 100644 --- a/generic/tclObj.c +++ b/generic/tclObj.c @@ -12,7 +12,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.90 2005/08/04 15:55:12 dgp Exp $ + * RCS: @(#) $Id: tclObj.c,v 1.91 2005/08/04 16:32:41 dgp Exp $ */ #include "tclInt.h" @@ -182,7 +182,6 @@ static int SetIntFromAny _ANSI_ARGS_((Tcl_Interp *interp, Tcl_Obj *objPtr)); static int SetIntOrWideFromAny _ANSI_ARGS_((Tcl_Interp* interp, Tcl_Obj *objPtr)); -static void UpdateStringOfBoolean _ANSI_ARGS_((Tcl_Obj *objPtr)); static void UpdateStringOfDouble _ANSI_ARGS_((Tcl_Obj *objPtr)); static void UpdateStringOfInt _ANSI_ARGS_((Tcl_Obj *objPtr)); static int SetWideIntFromAny _ANSI_ARGS_((Tcl_Interp *interp, @@ -234,7 +233,7 @@ Tcl_ObjType tclBooleanType = { "boolean", /* name */ (Tcl_FreeInternalRepProc *) NULL, /* freeIntRepProc */ (Tcl_DupInternalRepProc *) NULL, /* dupIntRepProc */ - UpdateStringOfBoolean, /* updateStringProc */ + (Tcl_UpdateStringProc *) NULL, /* updateStringProc */ SetBooleanFromAny /* setFromAnyProc */ }; @@ -1555,37 +1554,6 @@ SetBooleanFromAny(interp, objPtr) /* *---------------------------------------------------------------------- * - * UpdateStringOfBoolean -- - * - * Update the string representation for a boolean object. Note: This - * procedure does not free an existing old string rep so storage will be - * lost if this has not already been done. - * - * Results: - * None. - * - * Side effects: - * The object's string is set to a valid string that results from the - * boolean-to-string conversion. - * - *---------------------------------------------------------------------- - */ - -static void -UpdateStringOfBoolean(objPtr) - register Tcl_Obj *objPtr; /* Int object whose string rep to update. */ -{ - char *s = ckalloc((unsigned) 2); - - s[0] = (char) (objPtr->internalRep.longValue? '1' : '0'); - s[1] = '\0'; - objPtr->bytes = s; - objPtr->length = 1; -} - -/* - *---------------------------------------------------------------------- - * * Tcl_NewDoubleObj -- * * This procedure is normally called when not debugging: i.e., when -- cgit v0.12