From e0ed43c52629c283f02e749517e7fc83ace2942e Mon Sep 17 00:00:00 2001 From: dgp Date: Thu, 12 May 2016 19:49:06 +0000 Subject: The "ensembleCommand" Tcl_ObjType has no need for an UpdateString routine. It is entirely a caching type. No "pure" value can exist. --- generic/tclEnsemble.c | 32 +------------------------------- 1 file changed, 1 insertion(+), 31 deletions(-) diff --git a/generic/tclEnsemble.c b/generic/tclEnsemble.c index ecf10ff..ead96a3 100644 --- a/generic/tclEnsemble.c +++ b/generic/tclEnsemble.c @@ -34,7 +34,6 @@ static void MakeCachedEnsembleCommand(Tcl_Obj *objPtr, const char *subcmdName, Tcl_Obj *prefixObjPtr); static void FreeEnsembleCmdRep(Tcl_Obj *objPtr); static void DupEnsembleCmdRep(Tcl_Obj *objPtr, Tcl_Obj *copyPtr); -static void StringOfEnsembleCmdRep(Tcl_Obj *objPtr); static void CompileToInvokedCommand(Tcl_Interp *interp, Tcl_Parse *parsePtr, Tcl_Obj *replacements, Command *cmdPtr, CompileEnv *envPtr); @@ -81,7 +80,7 @@ const Tcl_ObjType tclEnsembleCmdType = { "ensembleCommand", /* the type's name */ FreeEnsembleCmdRep, /* freeIntRepProc */ DupEnsembleCmdRep, /* dupIntRepProc */ - StringOfEnsembleCmdRep, /* updateStringProc */ + NULL, /* updateStringProc */ NULL /* setFromAnyProc */ }; @@ -2677,35 +2676,6 @@ DupEnsembleCmdRep( /* *---------------------------------------------------------------------- * - * StringOfEnsembleCmdRep -- - * - * Creates a string representation of a Tcl_Obj that holds a subcommand - * of an ensemble. - * - * Results: - * None. - * - * Side effects: - * The object gains a string (UTF-8) representation. - * - *---------------------------------------------------------------------- - */ - -static void -StringOfEnsembleCmdRep( - Tcl_Obj *objPtr) -{ - EnsembleCmdRep *ensembleCmd = objPtr->internalRep.twoPtrValue.ptr1; - int length = strlen(ensembleCmd->fullSubcmdName); - - objPtr->length = length; - objPtr->bytes = ckalloc(length + 1); - memcpy(objPtr->bytes, ensembleCmd->fullSubcmdName, (unsigned) length+1); -} - -/* - *---------------------------------------------------------------------- - * * TclCompileEnsemble -- * * Procedure called to compile an ensemble command. Note that most -- cgit v0.12