diff options
author | dkf <donal.k.fellows@manchester.ac.uk> | 2006-10-27 12:33:17 (GMT) |
---|---|---|
committer | dkf <donal.k.fellows@manchester.ac.uk> | 2006-10-27 12:33:17 (GMT) |
commit | 9a9b87ca71f8790e35c76118128a219d7936cf44 (patch) | |
tree | 3b11147e8457a1cbd27f581a04adf7a852f19150 | |
parent | 69ba11554c721b6f8f3cc0fd8b033dc5e287ccea (diff) | |
download | tcl-9a9b87ca71f8790e35c76118128a219d7936cf44.zip tcl-9a9b87ca71f8790e35c76118128a219d7936cf44.tar.gz tcl-9a9b87ca71f8790e35c76118128a219d7936cf44.tar.bz2 |
Fixed a spot where CONSTness had been forgotten.
-rw-r--r-- | ChangeLog | 6 | ||||
-rw-r--r-- | generic/tclBasic.c | 9 | ||||
-rw-r--r-- | generic/tclInt.decls | 5 |
3 files changed, 13 insertions, 7 deletions
@@ -1,3 +1,9 @@ +2006-10-27 Donal K. Fellows <dkf@users.sf.net> + + * generic/tclBasic.c (TclRenameCommand): Change to take CONST args; + they were only ever used in a constant way anyway, so this appears to + be a spot that was missed during TIP#27 work. + 2006-10-26 Miguel Sofer <msofer@users.sf.net> * generic/tclProc.c (SetLambdaFromAny): minor change, eliminate diff --git a/generic/tclBasic.c b/generic/tclBasic.c index 8e7cfc1..b6abca2 100644 --- a/generic/tclBasic.c +++ b/generic/tclBasic.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: tclBasic.c,v 1.203 2006/10/23 23:04:12 msofer Exp $ + * RCS: @(#) $Id: tclBasic.c,v 1.204 2006/10/27 12:33:18 dkf Exp $ */ #include "tclInt.h" @@ -1969,8 +1969,8 @@ TclInvokeObjectCommand( int TclRenameCommand( Tcl_Interp *interp, /* Current interpreter. */ - char *oldName, /* Existing command name. */ - char *newName) /* New command name. */ + const char *oldName, /* Existing command name. */ + const char *newName) /* New command name. */ { Interp *iPtr = (Interp *) interp; CONST char *newTail; @@ -1987,8 +1987,7 @@ TclRenameCommand( * found. */ - cmd = Tcl_FindCommand(interp, oldName, NULL, - /*flags*/ 0); + cmd = Tcl_FindCommand(interp, oldName, NULL, /*flags*/ 0); cmdPtr = (Command *) cmd; if (cmdPtr == NULL) { Tcl_AppendResult(interp, "can't ", diff --git a/generic/tclInt.decls b/generic/tclInt.decls index e257ff8..121402a 100644 --- a/generic/tclInt.decls +++ b/generic/tclInt.decls @@ -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: tclInt.decls,v 1.100 2006/10/20 15:16:47 dkf Exp $ +# RCS: @(#) $Id: tclInt.decls,v 1.101 2006/10/27 12:33:18 dkf Exp $ library tcl @@ -390,7 +390,8 @@ declare 93 generic { # int TclpStat(CONST char *path, Tcl_StatBuf *buf) #} declare 96 generic { - int TclRenameCommand(Tcl_Interp *interp, char *oldName, char *newName) + int TclRenameCommand(Tcl_Interp *interp, CONST char *oldName, + CONST char *newName) } declare 97 generic { void TclResetShadowedCmdRefs(Tcl_Interp *interp, Command *newCmdPtr) |