summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordkf <donal.k.fellows@manchester.ac.uk>2002-09-24 12:53:32 (GMT)
committerdkf <donal.k.fellows@manchester.ac.uk>2002-09-24 12:53:32 (GMT)
commiteecec49335f0d2337be70d531e45388e516a3553 (patch)
tree8d1d95ce1f23411ccbc34e67f4f0aa76908519f8
parent12a1147d92f1b9f9f75f2340701430d18f970795 (diff)
downloadtcl-eecec49335f0d2337be70d531e45388e516a3553.zip
tcl-eecec49335f0d2337be70d531e45388e516a3553.tar.gz
tcl-eecec49335f0d2337be70d531e45388e516a3553.tar.bz2
Removing more CONST-related warnings.
-rw-r--r--ChangeLog5
-rw-r--r--generic/tclCompile.c6
-rw-r--r--generic/tclCompile.h4
-rw-r--r--generic/tclExecute.c23
4 files changed, 22 insertions, 16 deletions
diff --git a/ChangeLog b/ChangeLog
index d8f9447..e020dcc 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,10 @@
2002-09-24 Donal K. Fellows <fellowsd@cs.man.ac.uk>
+ * generic/tclCompile.c (TclPrintSource): More CONSTifying.
+ * generic/tclExecute.c (EvalStatsCmd): Object-ify to reduce
+ warnings. Thanks to 'CoderX2' on the chat for bringing this to my
+ attention...
+
* unix/tcl.m4: Forgot to define TCL_WIDE_INT_IS_LONG at the
appropriate moment. I believe this is the cause of [Bug 613117]
diff --git a/generic/tclCompile.c b/generic/tclCompile.c
index 75f253e..c069d76 100644
--- a/generic/tclCompile.c
+++ b/generic/tclCompile.c
@@ -11,7 +11,7 @@
* See the file "license.terms" for information on usage and redistribution
* of this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tclCompile.c,v 1.40 2002/08/05 03:24:40 dgp Exp $
+ * RCS: @(#) $Id: tclCompile.c,v 1.41 2002/09/24 12:53:33 dkf Exp $
*/
#include "tclInt.h"
@@ -3334,10 +3334,10 @@ TclPrintObject(outFile, objPtr, maxChars)
void
TclPrintSource(outFile, string, maxChars)
FILE *outFile; /* The file to print the source to. */
- char *string; /* The string to print. */
+ CONST char *string; /* The string to print. */
int maxChars; /* Maximum number of chars to print. */
{
- register char *p;
+ register CONST char *p;
register int i = 0;
if (string == NULL) {
diff --git a/generic/tclCompile.h b/generic/tclCompile.h
index 272c777..0d2d781 100644
--- a/generic/tclCompile.h
+++ b/generic/tclCompile.h
@@ -8,7 +8,7 @@
* See the file "license.terms" for information on usage and redistribution
* of this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tclCompile.h,v 1.31 2002/08/07 15:50:29 msofer Exp $
+ * RCS: @(#) $Id: tclCompile.h,v 1.32 2002/09/24 12:53:33 dkf Exp $
*/
#ifndef _TCLCOMPILATION
@@ -805,7 +805,7 @@ EXTERN int TclPrintInstruction _ANSI_ARGS_((ByteCode* codePtr,
EXTERN void TclPrintObject _ANSI_ARGS_((FILE *outFile,
Tcl_Obj *objPtr, int maxChars));
EXTERN void TclPrintSource _ANSI_ARGS_((FILE *outFile,
- char *string, int maxChars));
+ CONST char *string, int maxChars));
EXTERN void TclRegisterAuxDataType _ANSI_ARGS_((AuxDataType *typePtr));
EXTERN int TclRegisterLiteral _ANSI_ARGS_((CompileEnv *envPtr,
char *bytes, int length, int onHeap));
diff --git a/generic/tclExecute.c b/generic/tclExecute.c
index d90a362..00f89e3 100644
--- a/generic/tclExecute.c
+++ b/generic/tclExecute.c
@@ -11,7 +11,7 @@
* See the file "license.terms" for information on usage and redistribution
* of this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tclExecute.c,v 1.88 2002/08/01 22:17:07 msofer Exp $
+ * RCS: @(#) $Id: tclExecute.c,v 1.89 2002/09/24 12:53:33 dkf Exp $
*/
#include "tclInt.h"
@@ -374,14 +374,15 @@ static int ExprUnaryFunc _ANSI_ARGS_((Tcl_Interp *interp,
#ifndef TCL_WIDE_INT_IS_LONG
static int ExprWideFunc _ANSI_ARGS_((Tcl_Interp *interp,
ExecEnv *eePtr, ClientData clientData));
-#endif
+#endif /* TCL_WIDE_INT_IS_LONG */
#ifdef TCL_COMPILE_STATS
static int EvalStatsCmd _ANSI_ARGS_((ClientData clientData,
- Tcl_Interp *interp, int argc, char **argv));
-#endif
+ Tcl_Interp *interp, int objc,
+ Tcl_Obj *CONST objv[]));
+#endif /* TCL_COMPILE_STATS */
#ifdef TCL_COMPILE_DEBUG
static char * GetOpcodeName _ANSI_ARGS_((unsigned char *pc));
-#endif
+#endif /* TCL_COMPILE_DEBUG */
static ExceptionRange * GetExceptRangeForPc _ANSI_ARGS_((unsigned char *pc,
int catchOnly, ByteCode* codePtr));
static char * GetSrcInfoForPc _ANSI_ARGS_((unsigned char *pc,
@@ -398,7 +399,7 @@ static char * StringForResultCode _ANSI_ARGS_((int result));
static void ValidatePcAndStackTop _ANSI_ARGS_((
ByteCode *codePtr, unsigned char *pc,
int stackTop, int stackLowerBound));
-#endif
+#endif /* TCL_COMPILE_DEBUG */
static int VerifyExprObjType _ANSI_ARGS_((Tcl_Interp *interp,
Tcl_Obj *objPtr));
@@ -478,8 +479,8 @@ InitByteCodeExecution(interp)
}
#endif
#ifdef TCL_COMPILE_STATS
- Tcl_CreateCommand(interp, "evalstats", EvalStatsCmd,
- (ClientData) NULL, (Tcl_CmdDeleteProc *) NULL);
+ Tcl_CreateObjCommand(interp, "evalstats", EvalStatsCmd,
+ (ClientData) NULL, (Tcl_CmdDeleteProc *) NULL);
#endif /* TCL_COMPILE_STATS */
}
@@ -5782,11 +5783,11 @@ TclLog2(value)
*/
static int
-EvalStatsCmd(unused, interp, argc, argv)
+EvalStatsCmd(unused, interp, objc, objv)
ClientData unused; /* Unused. */
Tcl_Interp *interp; /* The current interpreter. */
- int argc; /* The number of arguments. */
- char **argv; /* The argument strings. */
+ int objc; /* The number of arguments. */
+ Tcl_Obj *CONST objv[]; /* The argument strings. */
{
Interp *iPtr = (Interp *) interp;
LiteralTable *globalTablePtr = &(iPtr->literalTable);