summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ChangeLog20
-rw-r--r--doc/ByteArrObj.34
-rw-r--r--doc/DumpActiveMemory.34
-rw-r--r--doc/InitStubs.36
-rw-r--r--doc/PkgRequire.314
-rw-r--r--doc/StringObj.38
-rw-r--r--generic/tcl.decls86
-rw-r--r--generic/tcl.h6
-rw-r--r--generic/tclBinary.c16
-rw-r--r--generic/tclCkalloc.c44
-rw-r--r--generic/tclDecls.h144
-rw-r--r--generic/tclListObj.c6
-rw-r--r--generic/tclObj.c24
-rw-r--r--generic/tclPkg.c57
-rw-r--r--generic/tclStringObj.c40
-rw-r--r--generic/tclStubLib.c8
16 files changed, 262 insertions, 225 deletions
diff --git a/ChangeLog b/ChangeLog
index f66cbc8..e6e65ea 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,23 @@
+2001-04-05 Kevin Kenny <kennykb@acm.org>
+
+ * doc/ByteArrObj.3:
+ * doc/DumpActiveMemory.3:
+ * doc/InitStubs.3:
+ * doc/PkgRequire.3:
+ * doc/StringObj.3:
+ * generic/tcl.decls:
+ * generic/tcl.h:
+ * generic/tclBinary.c:
+ * generic/tclCkalloc.c:
+ * generic/tclDecls.h:
+ * generic/tclListObj.c:
+ * generic/tclObj.c:
+ * generic/tclPkg.c:
+ * generic/tclStringObj.c:
+ * generic/tclStubLib.c:
+ (TIP#27) Changed a number of Tcl API's to accept "CONST char*"
+ in place of simple "char*". (kennykb) [Patch #404026]
+
2001-04-04 Jeff Hobbs <jeffh@ActiveState.com>
* generic/tclListObj.c (Tcl_SetListObj): set objPtr->length = 0 in
diff --git a/doc/ByteArrObj.3 b/doc/ByteArrObj.3
index b3ed34f..f5471db 100644
--- a/doc/ByteArrObj.3
+++ b/doc/ByteArrObj.3
@@ -4,7 +4,7 @@
'\" See the file "license.terms" for information on usage and redistribution
'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
'\"
-'\" RCS: @(#) $Id: ByteArrObj.3,v 1.2 1999/03/03 00:38:36 stanton Exp $
+'\" RCS: @(#) $Id: ByteArrObj.3,v 1.3 2001/04/04 16:07:20 kennykb Exp $
'\"
.so man.macros
.TH Tcl_ByteArrayObj 3 8.1 Tcl "Tcl Library Procedures"
@@ -28,7 +28,7 @@ unsigned char *
\fBTcl_SetByteArrayLength\fR(\fIobjPtr, length\fR)
.SH ARGUMENTS
.AS "unsigned char" *lengthPtr in/out
-.AP "unsigned char" *bytes in
+.AP "CONST unsigned char" *bytes in
The array of bytes used to initialize or set a byte-array object.
.AP int length in
The length of the array of bytes. It must be >= 0.
diff --git a/doc/DumpActiveMemory.3 b/doc/DumpActiveMemory.3
index 02b8d81..bbf5b45 100644
--- a/doc/DumpActiveMemory.3
+++ b/doc/DumpActiveMemory.3
@@ -3,7 +3,7 @@
'\" Copyright (c) 2000 by Scriptics Corporation.
'\" All rights reserved.
'\"
-'\" RCS: @(#) $Id: DumpActiveMemory.3,v 1.2 2000/04/28 00:47:48 ericm Exp $
+'\" RCS: @(#) $Id: DumpActiveMemory.3,v 1.3 2001/04/04 16:07:20 kennykb Exp $
'\"
.so man.macros
.TH "Tcl_DumpActiveMemory" 3 8.1 Tcl "Tcl Library Procedures"
@@ -26,7 +26,7 @@ void
.SH ARGUMENTS
.AP Tcl_Interp *interp in
Tcl interpreter in which to add commands.
-.AP char *fileName in
+.AP "CONST char"v *fileName in
For \fBTcl_DumpActiveMemory\fR, name of the file to which memory
information will be written. For \fBTcl_ValidateAllMemory\fR, name of
the file from which the call is being made (normally \fB__FILE__\fR).
diff --git a/doc/InitStubs.3 b/doc/InitStubs.3
index 4701927..27dae2f 100644
--- a/doc/InitStubs.3
+++ b/doc/InitStubs.3
@@ -4,7 +4,7 @@
'\" See the file "license.terms" for information on usage and redistribution
'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
'\"
-'\" RCS: @(#) $Id: InitStubs.3,v 1.4 1999/05/06 19:14:40 stanton Exp $
+'\" RCS: @(#) $Id: InitStubs.3,v 1.5 2001/04/04 16:07:20 kennykb Exp $
'\"
.so man.macros
.TH Tcl_InitStubs 3 8.1 Tcl "Tcl Library Procedures"
@@ -15,13 +15,13 @@ Tcl_InitStubs \- initialize the Tcl stubs mechanism
.nf
\fB#include <tcl.h>\fR
.sp
-char *
+CONST char *
\fBTcl_InitStubs\fR(\fIinterp, version, exact\fR)
.SH ARGUMENTS
.AS Tcl_Interp *interp in
.AP Tcl_Interp *interp in
Tcl interpreter handle.
-.AP char *version in
+.AP CONST char *version in
A version string consisting of one or more decimal numbers
separated by dots.
.AP int exact in
diff --git a/doc/PkgRequire.3 b/doc/PkgRequire.3
index 40cd542..3164259 100644
--- a/doc/PkgRequire.3
+++ b/doc/PkgRequire.3
@@ -4,7 +4,7 @@
'\" See the file "license.terms" for information on usage and redistribution
'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
'\"
-'\" RCS: @(#) $Id: PkgRequire.3,v 1.4 2000/04/14 23:01:53 hobbs Exp $
+'\" RCS: @(#) $Id: PkgRequire.3,v 1.5 2001/04/04 16:07:20 kennykb Exp $
'\"
.so man.macros
.TH Tcl_PkgRequire 3 7.5 Tcl "Tcl Library Procedures"
@@ -15,16 +15,16 @@ Tcl_PkgRequire, Tcl_PkgRequireEx, Tcl_PkgPresent, Tcl_PkgPresentEx, Tcl_PkgProvi
.nf
\fB#include <tcl.h>\fR
.sp
-char *
+CONST char *
\fBTcl_PkgRequire\fR(\fIinterp, name, version, exact\fR)
.sp
-char *
+CONST char *
\fBTcl_PkgRequireEx\fR(\fIinterp, name, version, exact, clientDataPtr\fR)
.sp
-char *
+CONST char *
\fBTcl_PkgPresent\fR(\fIinterp, name, version, exact\fR)
.sp
-char *
+CONST char *
\fBTcl_PkgPresentEx\fR(\fIinterp, name, version, exact, clientDataPtr\fR)
.sp
int
@@ -36,9 +36,9 @@ int
.AS Tcl_FreeProc clientDataPtr
.AP Tcl_Interp *interp in
Interpreter where package is needed or available.
-.AP char *name in
+.AP "CONST char" *name in
Name of package.
-.AP char *version in
+.AP "CONST char" *version in
A version string consisting of one or more decimal numbers
separated by dots.
.AP int exact in
diff --git a/doc/StringObj.3 b/doc/StringObj.3
index 23273d0..4be6eef 100644
--- a/doc/StringObj.3
+++ b/doc/StringObj.3
@@ -4,7 +4,7 @@
'\" See the file "license.terms" for information on usage and redistribution
'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
'\"
-'\" RCS: @(#) $Id: StringObj.3,v 1.6 2000/09/14 18:42:29 ericm Exp $
+'\" RCS: @(#) $Id: StringObj.3,v 1.7 2001/04/04 16:07:20 kennykb Exp $
'\"
.so man.macros
.TH Tcl_StringObj 3 8.1 Tcl "Tcl Library Procedures"
@@ -78,7 +78,7 @@ Tcl_Obj *
\fBTcl_ConcatObj\fR(\fIobjc, objv\fR)
.SH ARGUMENTS
.AS Tcl_Interp *appendObjPtr in/out
-.AP char *bytes in
+.AP "CONST char" *bytes in
Points to the first byte of an array of bytes
used to set or append to a string object.
This byte array may contain embedded null bytes
@@ -87,7 +87,7 @@ unless \fIlength\fR is negative.
The number of bytes to copy from \fIbytes\fR when
initializing, setting, or appending to a string object.
If negative, all bytes up to the first null are used.
-.AP Tcl_UniChar *unicode in
+.AP "CONST Tcl_UniChar" *unicode in
Points to the first byte of an array of Unicode characters
used to set or append to a string object.
This byte array may contain embedded null characters
@@ -113,7 +113,7 @@ The object to append to \fIobjPtr\fR in \fBTcl_AppendObjToObj\fR.
.AP int *lengthPtr out
If non-NULL, the location where \fBTcl_GetStringFromObj\fR will store
the the length of an object's string representation.
-.AP char *string in
+.AP "CONST char" *string in
Null-terminated string value to append to \fIobjPtr\fR.
.AP va_list argList in
An argument list which must have been initialised using
diff --git a/generic/tcl.decls b/generic/tcl.decls
index ada4049..82152ff 100644
--- a/generic/tcl.decls
+++ b/generic/tcl.decls
@@ -10,7 +10,7 @@
# See the file "license.terms" for information on usage and redistribution
# of this file, and for a DISCLAIMER OF ALL WARRANTIES.
#
-# RCS: @(#) $Id: tcl.decls,v 1.44 2001/03/30 23:06:39 andreas_kupries Exp $
+# RCS: @(#) $Id: tcl.decls,v 1.45 2001/04/04 16:07:20 kennykb Exp $
library tcl
@@ -27,12 +27,13 @@ hooks {tclPlat tclInt tclIntPlat}
# to preserve backwards compatibility.
declare 0 generic {
- int Tcl_PkgProvideEx(Tcl_Interp *interp, char *name, char *version, \
- ClientData clientData)
+ int Tcl_PkgProvideEx( Tcl_Interp* interp, CONST char* name,
+ CONST char* version, ClientData clientData )
}
declare 1 generic {
- char * Tcl_PkgRequireEx(Tcl_Interp *interp, char *name, char *version, \
- int exact, ClientData *clientDataPtr)
+ CONST char * Tcl_PkgRequireEx( Tcl_Interp *interp, CONST char *name,
+ CONST char *version,
+ int exact, ClientData *clientDataPtr )
}
declare 2 generic {
void Tcl_Panic(char *format, ...)
@@ -47,13 +48,14 @@ declare 5 generic {
char * Tcl_Realloc(char *ptr, unsigned int size)
}
declare 6 generic {
- char * Tcl_DbCkalloc(unsigned int size, char *file, int line)
+ char * Tcl_DbCkalloc(unsigned int size, CONST char *file, int line)
}
declare 7 generic {
- int Tcl_DbCkfree(char *ptr, char *file, int line)
+ int Tcl_DbCkfree(char *ptr, CONST char *file, int line)
}
declare 8 generic {
- char * Tcl_DbCkrealloc(char *ptr, unsigned int size, char *file, int line)
+ char * Tcl_DbCkrealloc(char *ptr, unsigned int size,
+ CONST char *file, int line)
}
# Tcl_CreateFileHandler and Tcl_DeleteFileHandler are only available on unix,
@@ -84,7 +86,7 @@ declare 15 generic {
void Tcl_AppendStringsToObj(Tcl_Obj *objPtr, ...)
}
declare 16 generic {
- void Tcl_AppendToObj(Tcl_Obj *objPtr, char *bytes, int length)
+ void Tcl_AppendToObj( Tcl_Obj* objPtr, CONST char* bytes, int length )
}
declare 17 generic {
Tcl_Obj * Tcl_ConcatObj(int objc, Tcl_Obj *CONST objv[])
@@ -94,37 +96,38 @@ declare 18 generic {
Tcl_ObjType *typePtr)
}
declare 19 generic {
- void Tcl_DbDecrRefCount(Tcl_Obj *objPtr, char *file, int line)
+ void Tcl_DbDecrRefCount(Tcl_Obj *objPtr, CONST char *file, int line)
}
declare 20 generic {
- void Tcl_DbIncrRefCount(Tcl_Obj *objPtr, char *file, int line)
+ void Tcl_DbIncrRefCount(Tcl_Obj *objPtr, CONST char *file, int line)
}
declare 21 generic {
- int Tcl_DbIsShared(Tcl_Obj *objPtr, char *file, int line)
+ int Tcl_DbIsShared(Tcl_Obj *objPtr, CONST char *file, int line)
}
declare 22 generic {
- Tcl_Obj * Tcl_DbNewBooleanObj(int boolValue, char *file, int line)
+ Tcl_Obj * Tcl_DbNewBooleanObj(int boolValue, CONST char *file, int line)
}
declare 23 generic {
- Tcl_Obj * Tcl_DbNewByteArrayObj(unsigned char *bytes, int length, \
- char *file, int line)
+ Tcl_Obj * Tcl_DbNewByteArrayObj(CONST unsigned char *bytes, int length, \
+ CONST char *file, int line)
}
declare 24 generic {
- Tcl_Obj * Tcl_DbNewDoubleObj(double doubleValue, char *file, int line)
+ Tcl_Obj * Tcl_DbNewDoubleObj(double doubleValue,
+ CONST char *file, int line)
}
declare 25 generic {
- Tcl_Obj * Tcl_DbNewListObj(int objc, Tcl_Obj *CONST objv[], char *file, \
- int line)
+ Tcl_Obj * Tcl_DbNewListObj(int objc, Tcl_Obj *CONST *objv,
+ CONST char *file, int line)
}
declare 26 generic {
- Tcl_Obj * Tcl_DbNewLongObj(long longValue, char *file, int line)
+ Tcl_Obj * Tcl_DbNewLongObj(long longValue, CONST char *file, int line)
}
declare 27 generic {
- Tcl_Obj * Tcl_DbNewObj(char *file, int line)
+ Tcl_Obj * Tcl_DbNewObj(CONST char *file, int line)
}
declare 28 generic {
- Tcl_Obj * Tcl_DbNewStringObj(CONST char *bytes, int length, \
- char *file, int line)
+ Tcl_Obj * Tcl_DbNewStringObj(CONST char *bytes, int length,
+ CONST char *file, int line)
}
declare 29 generic {
Tcl_Obj * Tcl_DuplicateObj(Tcl_Obj *objPtr)
@@ -198,7 +201,8 @@ declare 49 generic {
Tcl_Obj * Tcl_NewBooleanObj(int boolValue)
}
declare 50 generic {
- Tcl_Obj * Tcl_NewByteArrayObj(unsigned char *bytes, int length)
+ Tcl_Obj * Tcl_NewByteArrayObj( CONST unsigned char* bytes,
+ int length )
}
declare 51 generic {
Tcl_Obj * Tcl_NewDoubleObj(double doubleValue)
@@ -225,7 +229,8 @@ declare 58 generic {
unsigned char * Tcl_SetByteArrayLength(Tcl_Obj *objPtr, int length)
}
declare 59 generic {
- void Tcl_SetByteArrayObj(Tcl_Obj *objPtr, unsigned char *bytes, int length)
+ void Tcl_SetByteArrayObj(Tcl_Obj *objPtr, CONST unsigned char *bytes,
+ int length)
}
declare 60 generic {
void Tcl_SetDoubleObj(Tcl_Obj *objPtr, double doubleValue)
@@ -243,7 +248,7 @@ declare 64 generic {
void Tcl_SetObjLength(Tcl_Obj *objPtr, int length)
}
declare 65 generic {
- void Tcl_SetStringObj(Tcl_Obj *objPtr, char *bytes, int length)
+ void Tcl_SetStringObj( Tcl_Obj* objPtr, CONST char* bytes, int length )
}
declare 66 generic {
void Tcl_AddErrorInfo(Tcl_Interp *interp, CONST char *message)
@@ -916,11 +921,12 @@ declare 264 generic {
Tcl_Obj *CONST objv[], char *message)
}
declare 265 generic {
- int Tcl_DumpActiveMemory(char *fileName)
+ int Tcl_DumpActiveMemory( CONST char *fileName )
}
declare 266 generic {
- void Tcl_ValidateAllMemory(char *file, int line)
+ void Tcl_ValidateAllMemory( CONST char *file, int line )
}
+
declare 267 generic {
void Tcl_AppendResultVA(Tcl_Interp *interp, va_list argList)
}
@@ -934,19 +940,21 @@ declare 270 generic {
char * Tcl_ParseVar(Tcl_Interp *interp, char *str, char **termPtr)
}
declare 271 generic {
- char * Tcl_PkgPresent(Tcl_Interp *interp, char *name, char *version, \
- int exact)
+ CONST char * Tcl_PkgPresent(Tcl_Interp *interp, CONST char *name,
+ CONST char *version, int exact)
}
declare 272 generic {
- char * Tcl_PkgPresentEx(Tcl_Interp *interp, char *name, char *version, \
- int exact, ClientData *clientDataPtr)
+ CONST char * Tcl_PkgPresentEx(Tcl_Interp *interp, CONST char *name,
+ CONST char *version, int exact,
+ ClientData *clientDataPtr)
}
declare 273 generic {
- int Tcl_PkgProvide(Tcl_Interp *interp, char *name, char *version)
+ int Tcl_PkgProvide(Tcl_Interp *interp, CONST char *name,
+ CONST char *version)
}
declare 274 generic {
- char * Tcl_PkgRequire(Tcl_Interp *interp, char *name, char *version, \
- int exact)
+ CONST char * Tcl_PkgRequire(Tcl_Interp *interp, CONST char *name,
+ CONST char *version, int exact)
}
declare 275 generic {
void Tcl_SetErrorCodeVA(Tcl_Interp *interp, va_list argList)
@@ -1309,11 +1317,11 @@ declare 377 generic {
void Tcl_RegExpGetInfo(Tcl_RegExp regexp, Tcl_RegExpInfo *infoPtr)
}
declare 378 generic {
- Tcl_Obj * Tcl_NewUnicodeObj(Tcl_UniChar *unicode, int numChars)
+ Tcl_Obj * Tcl_NewUnicodeObj(CONST Tcl_UniChar *unicode, int numChars)
}
declare 379 generic {
- void Tcl_SetUnicodeObj(Tcl_Obj *objPtr, Tcl_UniChar *unicode, \
- int numChars)
+ void Tcl_SetUnicodeObj(Tcl_Obj *objPtr, CONST Tcl_UniChar *unicode,
+ int numChars)
}
declare 380 generic {
int Tcl_GetCharLength (Tcl_Obj *objPtr)
@@ -1328,8 +1336,8 @@ declare 383 generic {
Tcl_Obj * Tcl_GetRange (Tcl_Obj *objPtr, int first, int last)
}
declare 384 generic {
- void Tcl_AppendUnicodeToObj (Tcl_Obj *objPtr, \
- Tcl_UniChar *unicode, int length)
+ void Tcl_AppendUnicodeToObj (Tcl_Obj *objPtr,
+ CONST Tcl_UniChar *unicode, int length)
}
declare 385 generic {
int Tcl_RegExpMatchObj(Tcl_Interp *interp, Tcl_Obj *stringObj, \
diff --git a/generic/tcl.h b/generic/tcl.h
index d8acbd9..1c8bf05 100644
--- a/generic/tcl.h
+++ b/generic/tcl.h
@@ -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: tcl.h,v 1.87 2001/04/02 01:59:25 hobbs Exp $
+ * RCS: @(#) $Id: tcl.h,v 1.88 2001/04/04 16:07:20 kennykb Exp $
*/
#ifndef _TCL
@@ -1817,8 +1817,8 @@ typedef unsigned short Tcl_UniChar;
* linked into an application.
*/
-EXTERN char * Tcl_InitStubs _ANSI_ARGS_((Tcl_Interp *interp,
- char *version, int exact));
+EXTERN CONST char * Tcl_InitStubs _ANSI_ARGS_((Tcl_Interp *interp,
+ CONST char *version, int exact));
#ifndef USE_TCL_STUBS
diff --git a/generic/tclBinary.c b/generic/tclBinary.c
index 4c55c40..e0facb5 100644
--- a/generic/tclBinary.c
+++ b/generic/tclBinary.c
@@ -10,7 +10,7 @@
* See the file "license.terms" for information on usage and redistribution
* of this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tclBinary.c,v 1.6 1999/05/03 19:19:03 stanton Exp $
+ * RCS: @(#) $Id: tclBinary.c,v 1.7 2001/04/04 16:07:20 kennykb Exp $
*/
#include <math.h>
@@ -125,7 +125,7 @@ typedef struct ByteArray {
Tcl_Obj *
Tcl_NewByteArrayObj(bytes, length)
- unsigned char *bytes; /* The array of bytes used to initialize
+ CONST unsigned char *bytes; /* The array of bytes used to initialize
* the new object. */
int length; /* Length of the array of bytes, which must
* be >= 0. */
@@ -137,7 +137,7 @@ Tcl_NewByteArrayObj(bytes, length)
Tcl_Obj *
Tcl_NewByteArrayObj(bytes, length)
- unsigned char *bytes; /* The array of bytes used to initialize
+ CONST unsigned char *bytes; /* The array of bytes used to initialize
* the new object. */
int length; /* Length of the array of bytes, which must
* be >= 0. */
@@ -180,11 +180,11 @@ Tcl_NewByteArrayObj(bytes, length)
Tcl_Obj *
Tcl_DbNewByteArrayObj(bytes, length, file, line)
- unsigned char *bytes; /* The array of bytes used to initialize
+ CONST unsigned char *bytes; /* The array of bytes used to initialize
* the new object. */
int length; /* Length of the array of bytes, which must
* be >= 0. */
- char *file; /* The name of the source file calling this
+ CONST char *file; /* The name of the source file calling this
* procedure; used for debugging. */
int line; /* Line number in the source file; used
* for debugging. */
@@ -200,11 +200,11 @@ Tcl_DbNewByteArrayObj(bytes, length, file, line)
Tcl_Obj *
Tcl_DbNewByteArrayObj(bytes, length, file, line)
- unsigned char *bytes; /* The array of bytes used to initialize
+ CONST unsigned char *bytes; /* The array of bytes used to initialize
* the new object. */
int length; /* Length of the array of bytes, which must
* be >= 0. */
- char *file; /* The name of the source file calling this
+ CONST char *file; /* The name of the source file calling this
* procedure; used for debugging. */
int line; /* Line number in the source file; used
* for debugging. */
@@ -234,7 +234,7 @@ Tcl_DbNewByteArrayObj(bytes, length, file, line)
void
Tcl_SetByteArrayObj(objPtr, bytes, length)
Tcl_Obj *objPtr; /* Object to initialize as a ByteArray. */
- unsigned char *bytes; /* The array of bytes to use as the new
+ CONST unsigned char *bytes; /* The array of bytes to use as the new
* value. */
int length; /* Length of the array of bytes, which must
* be >= 0. */
diff --git a/generic/tclCkalloc.c b/generic/tclCkalloc.c
index 68e6336..a3f5e15 100644
--- a/generic/tclCkalloc.c
+++ b/generic/tclCkalloc.c
@@ -13,7 +13,7 @@
*
* This code contributed by Karl Lehenbauer and Mark Diekhans
*
- * RCS: @(#) $Id: tclCkalloc.c,v 1.11 2001/03/31 07:57:31 hobbs Exp $
+ * RCS: @(#) $Id: tclCkalloc.c,v 1.12 2001/04/04 16:07:20 kennykb Exp $
*/
#include "tclInt.h"
@@ -54,7 +54,7 @@ struct mem_header {
struct mem_header *blink;
MemTag *tagPtr; /* Tag from "memory tag" command; may be
* NULL. */
- char *file;
+ CONST char *file;
long length;
int line;
unsigned char low_guard[LOW_GUARD_SIZE];
@@ -131,7 +131,7 @@ static int CheckmemCmd _ANSI_ARGS_((ClientData clientData,
static int MemoryCmd _ANSI_ARGS_((ClientData clientData,
Tcl_Interp *interp, int argc, char **argv));
static void ValidateMemory _ANSI_ARGS_((
- struct mem_header *memHeaderP, char *file,
+ struct mem_header *memHeaderP, CONST char *file,
int line, int nukeGuards));
/*
@@ -200,7 +200,7 @@ TclDumpMemoryInfo(outFile)
static void
ValidateMemory(memHeaderP, file, line, nukeGuards)
struct mem_header *memHeaderP; /* Memory chunk to validate */
- char *file; /* File containing the call to
+ CONST char *file; /* File containing the call to
* Tcl_ValidateAllMemory */
int line; /* Line number of call to
* Tcl_ValidateAllMemory */
@@ -280,8 +280,8 @@ ValidateMemory(memHeaderP, file, line, nukeGuards)
*/
void
Tcl_ValidateAllMemory (file, line)
- char *file; /* File from which Tcl_ValidateAllMemory was called */
- int line; /* Line number of call to Tcl_ValidateAllMemory */
+ CONST char *file; /* File from which Tcl_ValidateAllMemory was called */
+ int line; /* Line number of call to Tcl_ValidateAllMemory */
{
struct mem_header *memScanP;
@@ -310,7 +310,7 @@ Tcl_ValidateAllMemory (file, line)
*/
int
Tcl_DumpActiveMemory (fileName)
- char *fileName; /* Name of the file to write info to */
+ CONST char *fileName; /* Name of the file to write info to */
{
FILE *fileP;
struct mem_header *memScanP;
@@ -364,7 +364,7 @@ Tcl_DumpActiveMemory (fileName)
char *
Tcl_DbCkalloc(size, file, line)
unsigned int size;
- char *file;
+ CONST char *file;
int line;
{
struct mem_header *result;
@@ -553,9 +553,9 @@ Tcl_AttemptDbCkalloc(size, file, line)
int
Tcl_DbCkfree(ptr, file, line)
- char *ptr;
- char *file;
- int line;
+ char *ptr;
+ CONST char *file;
+ int line;
{
struct mem_header *memp;
@@ -630,7 +630,7 @@ char *
Tcl_DbCkrealloc(ptr, size, file, line)
char *ptr;
unsigned int size;
- char *file;
+ CONST char *file;
int line;
{
char *new;
@@ -999,7 +999,7 @@ Tcl_Alloc (size)
char *
Tcl_DbCkalloc(size, file, line)
unsigned int size;
- char *file;
+ CONST char *file;
int line;
{
char *result;
@@ -1073,10 +1073,10 @@ Tcl_Realloc(ptr, size)
char *
Tcl_DbCkrealloc(ptr, size, file, line)
- char *ptr;
+ char *ptr;
unsigned int size;
- char *file;
- int line;
+ CONST char *file;
+ int line;
{
char *result;
@@ -1143,9 +1143,9 @@ Tcl_Free (ptr)
int
Tcl_DbCkfree(ptr, file, line)
- char *ptr;
- char *file;
- int line;
+ char *ptr;
+ CONST char *file;
+ int line;
{
TclpFree(ptr);
return 0;
@@ -1169,15 +1169,15 @@ Tcl_InitMemory(interp)
int
Tcl_DumpActiveMemory(fileName)
- char *fileName;
+ CONST char *fileName;
{
return TCL_OK;
}
void
Tcl_ValidateAllMemory(file, line)
- char *file;
- int line;
+ CONST char *file;
+ int line;
{
}
diff --git a/generic/tclDecls.h b/generic/tclDecls.h
index 06e9b89..34f123a 100644
--- a/generic/tclDecls.h
+++ b/generic/tclDecls.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: tclDecls.h,v 1.46 2001/03/30 23:06:39 andreas_kupries Exp $
+ * RCS: @(#) $Id: tclDecls.h,v 1.47 2001/04/04 16:07:20 kennykb Exp $
*/
#ifndef _TCLDECLS
@@ -27,13 +27,13 @@
*/
/* 0 */
-EXTERN int Tcl_PkgProvideEx _ANSI_ARGS_((Tcl_Interp * interp,
- char * name, char * version,
+EXTERN int Tcl_PkgProvideEx _ANSI_ARGS_((Tcl_Interp* interp,
+ CONST char* name, CONST char* version,
ClientData clientData));
/* 1 */
-EXTERN char * Tcl_PkgRequireEx _ANSI_ARGS_((Tcl_Interp * interp,
- char * name, char * version, int exact,
- ClientData * clientDataPtr));
+EXTERN CONST char * Tcl_PkgRequireEx _ANSI_ARGS_((Tcl_Interp * interp,
+ CONST char * name, CONST char * version,
+ int exact, ClientData * clientDataPtr));
/* 2 */
EXTERN void Tcl_Panic _ANSI_ARGS_(TCL_VARARGS(char *,format));
/* 3 */
@@ -45,13 +45,14 @@ EXTERN char * Tcl_Realloc _ANSI_ARGS_((char * ptr,
unsigned int size));
/* 6 */
EXTERN char * Tcl_DbCkalloc _ANSI_ARGS_((unsigned int size,
- char * file, int line));
+ CONST char * file, int line));
/* 7 */
-EXTERN int Tcl_DbCkfree _ANSI_ARGS_((char * ptr, char * file,
- int line));
+EXTERN int Tcl_DbCkfree _ANSI_ARGS_((char * ptr,
+ CONST char * file, int line));
/* 8 */
EXTERN char * Tcl_DbCkrealloc _ANSI_ARGS_((char * ptr,
- unsigned int size, char * file, int line));
+ unsigned int size, CONST char * file,
+ int line));
#if !defined(__WIN32__) && !defined(MAC_TCL) /* UNIX */
/* 9 */
EXTERN void Tcl_CreateFileHandler _ANSI_ARGS_((int fd, int mask,
@@ -73,8 +74,8 @@ EXTERN int Tcl_AppendAllObjTypes _ANSI_ARGS_((
/* 15 */
EXTERN void Tcl_AppendStringsToObj _ANSI_ARGS_(TCL_VARARGS(Tcl_Obj *,objPtr));
/* 16 */
-EXTERN void Tcl_AppendToObj _ANSI_ARGS_((Tcl_Obj * objPtr,
- char * bytes, int length));
+EXTERN void Tcl_AppendToObj _ANSI_ARGS_((Tcl_Obj* objPtr,
+ CONST char* bytes, int length));
/* 17 */
EXTERN Tcl_Obj * Tcl_ConcatObj _ANSI_ARGS_((int objc,
Tcl_Obj *CONST objv[]));
@@ -83,34 +84,36 @@ EXTERN int Tcl_ConvertToType _ANSI_ARGS_((Tcl_Interp * interp,
Tcl_Obj * objPtr, Tcl_ObjType * typePtr));
/* 19 */
EXTERN void Tcl_DbDecrRefCount _ANSI_ARGS_((Tcl_Obj * objPtr,
- char * file, int line));
+ CONST char * file, int line));
/* 20 */
EXTERN void Tcl_DbIncrRefCount _ANSI_ARGS_((Tcl_Obj * objPtr,
- char * file, int line));
+ CONST char * file, int line));
/* 21 */
EXTERN int Tcl_DbIsShared _ANSI_ARGS_((Tcl_Obj * objPtr,
- char * file, int line));
+ CONST char * file, int line));
/* 22 */
EXTERN Tcl_Obj * Tcl_DbNewBooleanObj _ANSI_ARGS_((int boolValue,
- char * file, int line));
+ CONST char * file, int line));
/* 23 */
EXTERN Tcl_Obj * Tcl_DbNewByteArrayObj _ANSI_ARGS_((
- unsigned char * bytes, int length,
- char * file, int line));
+ CONST unsigned char * bytes, int length,
+ CONST char * file, int line));
/* 24 */
EXTERN Tcl_Obj * Tcl_DbNewDoubleObj _ANSI_ARGS_((double doubleValue,
- char * file, int line));
+ CONST char * file, int line));
/* 25 */
EXTERN Tcl_Obj * Tcl_DbNewListObj _ANSI_ARGS_((int objc,
- Tcl_Obj *CONST objv[], char * file, int line));
+ Tcl_Obj *CONST * objv, CONST char * file,
+ int line));
/* 26 */
EXTERN Tcl_Obj * Tcl_DbNewLongObj _ANSI_ARGS_((long longValue,
- char * file, int line));
+ CONST char * file, int line));
/* 27 */
-EXTERN Tcl_Obj * Tcl_DbNewObj _ANSI_ARGS_((char * file, int line));
+EXTERN Tcl_Obj * Tcl_DbNewObj _ANSI_ARGS_((CONST char * file,
+ int line));
/* 28 */
EXTERN Tcl_Obj * Tcl_DbNewStringObj _ANSI_ARGS_((CONST char * bytes,
- int length, char * file, int line));
+ int length, CONST char * file, int line));
/* 29 */
EXTERN Tcl_Obj * Tcl_DuplicateObj _ANSI_ARGS_((Tcl_Obj * objPtr));
/* 30 */
@@ -180,7 +183,7 @@ EXTERN int Tcl_ListObjReplace _ANSI_ARGS_((Tcl_Interp * interp,
EXTERN Tcl_Obj * Tcl_NewBooleanObj _ANSI_ARGS_((int boolValue));
/* 50 */
EXTERN Tcl_Obj * Tcl_NewByteArrayObj _ANSI_ARGS_((
- unsigned char * bytes, int length));
+ CONST unsigned char* bytes, int length));
/* 51 */
EXTERN Tcl_Obj * Tcl_NewDoubleObj _ANSI_ARGS_((double doubleValue));
/* 52 */
@@ -203,7 +206,7 @@ EXTERN unsigned char * Tcl_SetByteArrayLength _ANSI_ARGS_((Tcl_Obj * objPtr,
int length));
/* 59 */
EXTERN void Tcl_SetByteArrayObj _ANSI_ARGS_((Tcl_Obj * objPtr,
- unsigned char * bytes, int length));
+ CONST unsigned char * bytes, int length));
/* 60 */
EXTERN void Tcl_SetDoubleObj _ANSI_ARGS_((Tcl_Obj * objPtr,
double doubleValue));
@@ -220,8 +223,8 @@ EXTERN void Tcl_SetLongObj _ANSI_ARGS_((Tcl_Obj * objPtr,
EXTERN void Tcl_SetObjLength _ANSI_ARGS_((Tcl_Obj * objPtr,
int length));
/* 65 */
-EXTERN void Tcl_SetStringObj _ANSI_ARGS_((Tcl_Obj * objPtr,
- char * bytes, int length));
+EXTERN void Tcl_SetStringObj _ANSI_ARGS_((Tcl_Obj* objPtr,
+ CONST char* bytes, int length));
/* 66 */
EXTERN void Tcl_AddErrorInfo _ANSI_ARGS_((Tcl_Interp * interp,
CONST char * message));
@@ -851,9 +854,10 @@ EXTERN void Tcl_WrongNumArgs _ANSI_ARGS_((Tcl_Interp * interp,
int objc, Tcl_Obj *CONST objv[],
char * message));
/* 265 */
-EXTERN int Tcl_DumpActiveMemory _ANSI_ARGS_((char * fileName));
+EXTERN int Tcl_DumpActiveMemory _ANSI_ARGS_((
+ CONST char * fileName));
/* 266 */
-EXTERN void Tcl_ValidateAllMemory _ANSI_ARGS_((char * file,
+EXTERN void Tcl_ValidateAllMemory _ANSI_ARGS_((CONST char * file,
int line));
/* 267 */
EXTERN void Tcl_AppendResultVA _ANSI_ARGS_((Tcl_Interp * interp,
@@ -867,18 +871,20 @@ EXTERN char * Tcl_HashStats _ANSI_ARGS_((Tcl_HashTable * tablePtr));
EXTERN char * Tcl_ParseVar _ANSI_ARGS_((Tcl_Interp * interp,
char * str, char ** termPtr));
/* 271 */
-EXTERN char * Tcl_PkgPresent _ANSI_ARGS_((Tcl_Interp * interp,
- char * name, char * version, int exact));
+EXTERN CONST char * Tcl_PkgPresent _ANSI_ARGS_((Tcl_Interp * interp,
+ CONST char * name, CONST char * version,
+ int exact));
/* 272 */
-EXTERN char * Tcl_PkgPresentEx _ANSI_ARGS_((Tcl_Interp * interp,
- char * name, char * version, int exact,
- ClientData * clientDataPtr));
+EXTERN CONST char * Tcl_PkgPresentEx _ANSI_ARGS_((Tcl_Interp * interp,
+ CONST char * name, CONST char * version,
+ int exact, ClientData * clientDataPtr));
/* 273 */
EXTERN int Tcl_PkgProvide _ANSI_ARGS_((Tcl_Interp * interp,
- char * name, char * version));
+ CONST char * name, CONST char * version));
/* 274 */
-EXTERN char * Tcl_PkgRequire _ANSI_ARGS_((Tcl_Interp * interp,
- char * name, char * version, int exact));
+EXTERN CONST char * Tcl_PkgRequire _ANSI_ARGS_((Tcl_Interp * interp,
+ CONST char * name, CONST char * version,
+ int exact));
/* 275 */
EXTERN void Tcl_SetErrorCodeVA _ANSI_ARGS_((Tcl_Interp * interp,
va_list argList));
@@ -1184,11 +1190,11 @@ EXTERN int Tcl_RegExpExecObj _ANSI_ARGS_((Tcl_Interp * interp,
EXTERN void Tcl_RegExpGetInfo _ANSI_ARGS_((Tcl_RegExp regexp,
Tcl_RegExpInfo * infoPtr));
/* 378 */
-EXTERN Tcl_Obj * Tcl_NewUnicodeObj _ANSI_ARGS_((Tcl_UniChar * unicode,
- int numChars));
+EXTERN Tcl_Obj * Tcl_NewUnicodeObj _ANSI_ARGS_((
+ CONST Tcl_UniChar * unicode, int numChars));
/* 379 */
EXTERN void Tcl_SetUnicodeObj _ANSI_ARGS_((Tcl_Obj * objPtr,
- Tcl_UniChar * unicode, int numChars));
+ CONST Tcl_UniChar * unicode, int numChars));
/* 380 */
EXTERN int Tcl_GetCharLength _ANSI_ARGS_((Tcl_Obj * objPtr));
/* 381 */
@@ -1201,7 +1207,7 @@ EXTERN Tcl_Obj * Tcl_GetRange _ANSI_ARGS_((Tcl_Obj * objPtr,
int first, int last));
/* 384 */
EXTERN void Tcl_AppendUnicodeToObj _ANSI_ARGS_((Tcl_Obj * objPtr,
- Tcl_UniChar * unicode, int length));
+ CONST Tcl_UniChar * unicode, int length));
/* 385 */
EXTERN int Tcl_RegExpMatchObj _ANSI_ARGS_((Tcl_Interp * interp,
Tcl_Obj * stringObj, Tcl_Obj * patternObj));
@@ -1364,15 +1370,15 @@ typedef struct TclStubs {
int magic;
struct TclStubHooks *hooks;
- int (*tcl_PkgProvideEx) _ANSI_ARGS_((Tcl_Interp * interp, char * name, char * version, ClientData clientData)); /* 0 */
- char * (*tcl_PkgRequireEx) _ANSI_ARGS_((Tcl_Interp * interp, char * name, char * version, int exact, ClientData * clientDataPtr)); /* 1 */
+ int (*tcl_PkgProvideEx) _ANSI_ARGS_((Tcl_Interp* interp, CONST char* name, CONST char* version, ClientData clientData)); /* 0 */
+ CONST char * (*tcl_PkgRequireEx) _ANSI_ARGS_((Tcl_Interp * interp, CONST char * name, CONST char * version, int exact, ClientData * clientDataPtr)); /* 1 */
void (*tcl_Panic) _ANSI_ARGS_(TCL_VARARGS(char *,format)); /* 2 */
char * (*tcl_Alloc) _ANSI_ARGS_((unsigned int size)); /* 3 */
void (*tcl_Free) _ANSI_ARGS_((char * ptr)); /* 4 */
char * (*tcl_Realloc) _ANSI_ARGS_((char * ptr, unsigned int size)); /* 5 */
- char * (*tcl_DbCkalloc) _ANSI_ARGS_((unsigned int size, char * file, int line)); /* 6 */
- int (*tcl_DbCkfree) _ANSI_ARGS_((char * ptr, char * file, int line)); /* 7 */
- char * (*tcl_DbCkrealloc) _ANSI_ARGS_((char * ptr, unsigned int size, char * file, int line)); /* 8 */
+ char * (*tcl_DbCkalloc) _ANSI_ARGS_((unsigned int size, CONST char * file, int line)); /* 6 */
+ int (*tcl_DbCkfree) _ANSI_ARGS_((char * ptr, CONST char * file, int line)); /* 7 */
+ char * (*tcl_DbCkrealloc) _ANSI_ARGS_((char * ptr, unsigned int size, CONST char * file, int line)); /* 8 */
#if !defined(__WIN32__) && !defined(MAC_TCL) /* UNIX */
void (*tcl_CreateFileHandler) _ANSI_ARGS_((int fd, int mask, Tcl_FileProc * proc, ClientData clientData)); /* 9 */
#endif /* UNIX */
@@ -1396,19 +1402,19 @@ typedef struct TclStubs {
int (*tcl_WaitForEvent) _ANSI_ARGS_((Tcl_Time * timePtr)); /* 13 */
int (*tcl_AppendAllObjTypes) _ANSI_ARGS_((Tcl_Interp * interp, Tcl_Obj * objPtr)); /* 14 */
void (*tcl_AppendStringsToObj) _ANSI_ARGS_(TCL_VARARGS(Tcl_Obj *,objPtr)); /* 15 */
- void (*tcl_AppendToObj) _ANSI_ARGS_((Tcl_Obj * objPtr, char * bytes, int length)); /* 16 */
+ void (*tcl_AppendToObj) _ANSI_ARGS_((Tcl_Obj* objPtr, CONST char* bytes, int length)); /* 16 */
Tcl_Obj * (*tcl_ConcatObj) _ANSI_ARGS_((int objc, Tcl_Obj *CONST objv[])); /* 17 */
int (*tcl_ConvertToType) _ANSI_ARGS_((Tcl_Interp * interp, Tcl_Obj * objPtr, Tcl_ObjType * typePtr)); /* 18 */
- void (*tcl_DbDecrRefCount) _ANSI_ARGS_((Tcl_Obj * objPtr, char * file, int line)); /* 19 */
- void (*tcl_DbIncrRefCount) _ANSI_ARGS_((Tcl_Obj * objPtr, char * file, int line)); /* 20 */
- int (*tcl_DbIsShared) _ANSI_ARGS_((Tcl_Obj * objPtr, char * file, int line)); /* 21 */
- Tcl_Obj * (*tcl_DbNewBooleanObj) _ANSI_ARGS_((int boolValue, char * file, int line)); /* 22 */
- Tcl_Obj * (*tcl_DbNewByteArrayObj) _ANSI_ARGS_((unsigned char * bytes, int length, char * file, int line)); /* 23 */
- Tcl_Obj * (*tcl_DbNewDoubleObj) _ANSI_ARGS_((double doubleValue, char * file, int line)); /* 24 */
- Tcl_Obj * (*tcl_DbNewListObj) _ANSI_ARGS_((int objc, Tcl_Obj *CONST objv[], char * file, int line)); /* 25 */
- Tcl_Obj * (*tcl_DbNewLongObj) _ANSI_ARGS_((long longValue, char * file, int line)); /* 26 */
- Tcl_Obj * (*tcl_DbNewObj) _ANSI_ARGS_((char * file, int line)); /* 27 */
- Tcl_Obj * (*tcl_DbNewStringObj) _ANSI_ARGS_((CONST char * bytes, int length, char * file, int line)); /* 28 */
+ void (*tcl_DbDecrRefCount) _ANSI_ARGS_((Tcl_Obj * objPtr, CONST char * file, int line)); /* 19 */
+ void (*tcl_DbIncrRefCount) _ANSI_ARGS_((Tcl_Obj * objPtr, CONST char * file, int line)); /* 20 */
+ int (*tcl_DbIsShared) _ANSI_ARGS_((Tcl_Obj * objPtr, CONST char * file, int line)); /* 21 */
+ Tcl_Obj * (*tcl_DbNewBooleanObj) _ANSI_ARGS_((int boolValue, CONST char * file, int line)); /* 22 */
+ Tcl_Obj * (*tcl_DbNewByteArrayObj) _ANSI_ARGS_((CONST unsigned char * bytes, int length, CONST char * file, int line)); /* 23 */
+ Tcl_Obj * (*tcl_DbNewDoubleObj) _ANSI_ARGS_((double doubleValue, CONST char * file, int line)); /* 24 */
+ Tcl_Obj * (*tcl_DbNewListObj) _ANSI_ARGS_((int objc, Tcl_Obj *CONST * objv, CONST char * file, int line)); /* 25 */
+ Tcl_Obj * (*tcl_DbNewLongObj) _ANSI_ARGS_((long longValue, CONST char * file, int line)); /* 26 */
+ Tcl_Obj * (*tcl_DbNewObj) _ANSI_ARGS_((CONST char * file, int line)); /* 27 */
+ Tcl_Obj * (*tcl_DbNewStringObj) _ANSI_ARGS_((CONST char * bytes, int length, CONST char * file, int line)); /* 28 */
Tcl_Obj * (*tcl_DuplicateObj) _ANSI_ARGS_((Tcl_Obj * objPtr)); /* 29 */
void (*tclFreeObj) _ANSI_ARGS_((Tcl_Obj * objPtr)); /* 30 */
int (*tcl_GetBoolean) _ANSI_ARGS_((Tcl_Interp * interp, char * str, int * boolPtr)); /* 31 */
@@ -1430,7 +1436,7 @@ typedef struct TclStubs {
int (*tcl_ListObjLength) _ANSI_ARGS_((Tcl_Interp * interp, Tcl_Obj * listPtr, int * intPtr)); /* 47 */
int (*tcl_ListObjReplace) _ANSI_ARGS_((Tcl_Interp * interp, Tcl_Obj * listPtr, int first, int count, int objc, Tcl_Obj *CONST objv[])); /* 48 */
Tcl_Obj * (*tcl_NewBooleanObj) _ANSI_ARGS_((int boolValue)); /* 49 */
- Tcl_Obj * (*tcl_NewByteArrayObj) _ANSI_ARGS_((unsigned char * bytes, int length)); /* 50 */
+ Tcl_Obj * (*tcl_NewByteArrayObj) _ANSI_ARGS_((CONST unsigned char* bytes, int length)); /* 50 */
Tcl_Obj * (*tcl_NewDoubleObj) _ANSI_ARGS_((double doubleValue)); /* 51 */
Tcl_Obj * (*tcl_NewIntObj) _ANSI_ARGS_((int intValue)); /* 52 */
Tcl_Obj * (*tcl_NewListObj) _ANSI_ARGS_((int objc, Tcl_Obj *CONST objv[])); /* 53 */
@@ -1439,13 +1445,13 @@ typedef struct TclStubs {
Tcl_Obj * (*tcl_NewStringObj) _ANSI_ARGS_((CONST char * bytes, int length)); /* 56 */
void (*tcl_SetBooleanObj) _ANSI_ARGS_((Tcl_Obj * objPtr, int boolValue)); /* 57 */
unsigned char * (*tcl_SetByteArrayLength) _ANSI_ARGS_((Tcl_Obj * objPtr, int length)); /* 58 */
- void (*tcl_SetByteArrayObj) _ANSI_ARGS_((Tcl_Obj * objPtr, unsigned char * bytes, int length)); /* 59 */
+ void (*tcl_SetByteArrayObj) _ANSI_ARGS_((Tcl_Obj * objPtr, CONST unsigned char * bytes, int length)); /* 59 */
void (*tcl_SetDoubleObj) _ANSI_ARGS_((Tcl_Obj * objPtr, double doubleValue)); /* 60 */
void (*tcl_SetIntObj) _ANSI_ARGS_((Tcl_Obj * objPtr, int intValue)); /* 61 */
void (*tcl_SetListObj) _ANSI_ARGS_((Tcl_Obj * objPtr, int objc, Tcl_Obj *CONST objv[])); /* 62 */
void (*tcl_SetLongObj) _ANSI_ARGS_((Tcl_Obj * objPtr, long longValue)); /* 63 */
void (*tcl_SetObjLength) _ANSI_ARGS_((Tcl_Obj * objPtr, int length)); /* 64 */
- void (*tcl_SetStringObj) _ANSI_ARGS_((Tcl_Obj * objPtr, char * bytes, int length)); /* 65 */
+ void (*tcl_SetStringObj) _ANSI_ARGS_((Tcl_Obj* objPtr, CONST char* bytes, int length)); /* 65 */
void (*tcl_AddErrorInfo) _ANSI_ARGS_((Tcl_Interp * interp, CONST char * message)); /* 66 */
void (*tcl_AddObjErrorInfo) _ANSI_ARGS_((Tcl_Interp * interp, CONST char * message, int length)); /* 67 */
void (*tcl_AllowExceptions) _ANSI_ARGS_((Tcl_Interp * interp)); /* 68 */
@@ -1677,16 +1683,16 @@ typedef struct TclStubs {
ClientData (*tcl_VarTraceInfo2) _ANSI_ARGS_((Tcl_Interp * interp, char * part1, char * part2, int flags, Tcl_VarTraceProc * procPtr, ClientData prevClientData)); /* 262 */
int (*tcl_Write) _ANSI_ARGS_((Tcl_Channel chan, char * s, int slen)); /* 263 */
void (*tcl_WrongNumArgs) _ANSI_ARGS_((Tcl_Interp * interp, int objc, Tcl_Obj *CONST objv[], char * message)); /* 264 */
- int (*tcl_DumpActiveMemory) _ANSI_ARGS_((char * fileName)); /* 265 */
- void (*tcl_ValidateAllMemory) _ANSI_ARGS_((char * file, int line)); /* 266 */
+ int (*tcl_DumpActiveMemory) _ANSI_ARGS_((CONST char * fileName)); /* 265 */
+ void (*tcl_ValidateAllMemory) _ANSI_ARGS_((CONST char * file, int line)); /* 266 */
void (*tcl_AppendResultVA) _ANSI_ARGS_((Tcl_Interp * interp, va_list argList)); /* 267 */
void (*tcl_AppendStringsToObjVA) _ANSI_ARGS_((Tcl_Obj * objPtr, va_list argList)); /* 268 */
char * (*tcl_HashStats) _ANSI_ARGS_((Tcl_HashTable * tablePtr)); /* 269 */
char * (*tcl_ParseVar) _ANSI_ARGS_((Tcl_Interp * interp, char * str, char ** termPtr)); /* 270 */
- char * (*tcl_PkgPresent) _ANSI_ARGS_((Tcl_Interp * interp, char * name, char * version, int exact)); /* 271 */
- char * (*tcl_PkgPresentEx) _ANSI_ARGS_((Tcl_Interp * interp, char * name, char * version, int exact, ClientData * clientDataPtr)); /* 272 */
- int (*tcl_PkgProvide) _ANSI_ARGS_((Tcl_Interp * interp, char * name, char * version)); /* 273 */
- char * (*tcl_PkgRequire) _ANSI_ARGS_((Tcl_Interp * interp, char * name, char * version, int exact)); /* 274 */
+ CONST char * (*tcl_PkgPresent) _ANSI_ARGS_((Tcl_Interp * interp, CONST char * name, CONST char * version, int exact)); /* 271 */
+ CONST char * (*tcl_PkgPresentEx) _ANSI_ARGS_((Tcl_Interp * interp, CONST char * name, CONST char * version, int exact, ClientData * clientDataPtr)); /* 272 */
+ int (*tcl_PkgProvide) _ANSI_ARGS_((Tcl_Interp * interp, CONST char * name, CONST char * version)); /* 273 */
+ CONST char * (*tcl_PkgRequire) _ANSI_ARGS_((Tcl_Interp * interp, CONST char * name, CONST char * version, int exact)); /* 274 */
void (*tcl_SetErrorCodeVA) _ANSI_ARGS_((Tcl_Interp * interp, va_list argList)); /* 275 */
int (*tcl_VarEvalVA) _ANSI_ARGS_((Tcl_Interp * interp, va_list argList)); /* 276 */
Tcl_Pid (*tcl_WaitPid) _ANSI_ARGS_((Tcl_Pid pid, int * statPtr, int options)); /* 277 */
@@ -1798,13 +1804,13 @@ typedef struct TclStubs {
int (*tcl_UniCharIsPunct) _ANSI_ARGS_((int ch)); /* 375 */
int (*tcl_RegExpExecObj) _ANSI_ARGS_((Tcl_Interp * interp, Tcl_RegExp regexp, Tcl_Obj * objPtr, int offset, int nmatches, int flags)); /* 376 */
void (*tcl_RegExpGetInfo) _ANSI_ARGS_((Tcl_RegExp regexp, Tcl_RegExpInfo * infoPtr)); /* 377 */
- Tcl_Obj * (*tcl_NewUnicodeObj) _ANSI_ARGS_((Tcl_UniChar * unicode, int numChars)); /* 378 */
- void (*tcl_SetUnicodeObj) _ANSI_ARGS_((Tcl_Obj * objPtr, Tcl_UniChar * unicode, int numChars)); /* 379 */
+ Tcl_Obj * (*tcl_NewUnicodeObj) _ANSI_ARGS_((CONST Tcl_UniChar * unicode, int numChars)); /* 378 */
+ void (*tcl_SetUnicodeObj) _ANSI_ARGS_((Tcl_Obj * objPtr, CONST Tcl_UniChar * unicode, int numChars)); /* 379 */
int (*tcl_GetCharLength) _ANSI_ARGS_((Tcl_Obj * objPtr)); /* 380 */
Tcl_UniChar (*tcl_GetUniChar) _ANSI_ARGS_((Tcl_Obj * objPtr, int index)); /* 381 */
Tcl_UniChar * (*tcl_GetUnicode) _ANSI_ARGS_((Tcl_Obj * objPtr)); /* 382 */
Tcl_Obj * (*tcl_GetRange) _ANSI_ARGS_((Tcl_Obj * objPtr, int first, int last)); /* 383 */
- void (*tcl_AppendUnicodeToObj) _ANSI_ARGS_((Tcl_Obj * objPtr, Tcl_UniChar * unicode, int length)); /* 384 */
+ void (*tcl_AppendUnicodeToObj) _ANSI_ARGS_((Tcl_Obj * objPtr, CONST Tcl_UniChar * unicode, int length)); /* 384 */
int (*tcl_RegExpMatchObj) _ANSI_ARGS_((Tcl_Interp * interp, Tcl_Obj * stringObj, Tcl_Obj * patternObj)); /* 385 */
void (*tcl_SetNotifier) _ANSI_ARGS_((Tcl_NotifierProcs * notifierProcPtr)); /* 386 */
Tcl_Mutex * (*tcl_GetAllocMutex) _ANSI_ARGS_((void)); /* 387 */
diff --git a/generic/tclListObj.c b/generic/tclListObj.c
index fb4a06b..fabe581 100644
--- a/generic/tclListObj.c
+++ b/generic/tclListObj.c
@@ -10,7 +10,7 @@
* See the file "license.terms" for information on usage and redistribution
* of this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tclListObj.c,v 1.8 2001/04/04 07:14:16 hobbs Exp $
+ * RCS: @(#) $Id: tclListObj.c,v 1.9 2001/04/04 16:07:21 kennykb Exp $
*/
#include "tclInt.h"
@@ -147,7 +147,7 @@ Tcl_Obj *
Tcl_DbNewListObj(objc, objv, file, line)
int objc; /* Count of objects referenced by objv. */
Tcl_Obj *CONST objv[]; /* An array of pointers to Tcl objects. */
- char *file; /* The name of the source file calling this
+ CONST char *file; /* The name of the source file calling this
* procedure; used for debugging. */
int line; /* Line number in the source file; used
* for debugging. */
@@ -186,7 +186,7 @@ Tcl_Obj *
Tcl_DbNewListObj(objc, objv, file, line)
int objc; /* Count of objects referenced by objv. */
Tcl_Obj *CONST objv[]; /* An array of pointers to Tcl objects. */
- char *file; /* The name of the source file calling this
+ CONST char *file; /* The name of the source file calling this
* procedure; used for debugging. */
int line; /* Line number in the source file; used
* for debugging. */
diff --git a/generic/tclObj.c b/generic/tclObj.c
index e2a9bae..3b86934 100644
--- a/generic/tclObj.c
+++ b/generic/tclObj.c
@@ -10,7 +10,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.19 2001/01/18 19:09:55 andreas_kupries Exp $
+ * RCS: @(#) $Id: tclObj.c,v 1.20 2001/04/04 16:07:21 kennykb Exp $
*/
#include "tclInt.h"
@@ -491,7 +491,7 @@ Tcl_NewObj()
Tcl_Obj *
Tcl_DbNewObj(file, line)
- register char *file; /* The name of the source file calling this
+ register CONST char *file; /* The name of the source file calling this
* procedure; used for debugging. */
register int line; /* Line number in the source file; used
* for debugging. */
@@ -521,7 +521,7 @@ Tcl_DbNewObj(file, line)
Tcl_Obj *
Tcl_DbNewObj(file, line)
- char *file; /* The name of the source file calling this
+ CONST char *file; /* The name of the source file calling this
* procedure; used for debugging. */
int line; /* Line number in the source file; used
* for debugging. */
@@ -894,7 +894,7 @@ Tcl_NewBooleanObj(boolValue)
Tcl_Obj *
Tcl_DbNewBooleanObj(boolValue, file, line)
register int boolValue; /* Boolean used to initialize new object. */
- char *file; /* The name of the source file calling this
+ CONST char *file; /* The name of the source file calling this
* procedure; used for debugging. */
int line; /* Line number in the source file; used
* for debugging. */
@@ -914,7 +914,7 @@ Tcl_DbNewBooleanObj(boolValue, file, line)
Tcl_Obj *
Tcl_DbNewBooleanObj(boolValue, file, line)
register int boolValue; /* Boolean used to initialize new object. */
- char *file; /* The name of the source file calling this
+ CONST char *file; /* The name of the source file calling this
* procedure; used for debugging. */
int line; /* Line number in the source file; used
* for debugging. */
@@ -1252,7 +1252,7 @@ Tcl_NewDoubleObj(dblValue)
Tcl_Obj *
Tcl_DbNewDoubleObj(dblValue, file, line)
register double dblValue; /* Double used to initialize the object. */
- char *file; /* The name of the source file calling this
+ CONST char *file; /* The name of the source file calling this
* procedure; used for debugging. */
int line; /* Line number in the source file; used
* for debugging. */
@@ -1272,7 +1272,7 @@ Tcl_DbNewDoubleObj(dblValue, file, line)
Tcl_Obj *
Tcl_DbNewDoubleObj(dblValue, file, line)
register double dblValue; /* Double used to initialize the object. */
- char *file; /* The name of the source file calling this
+ CONST char *file; /* The name of the source file calling this
* procedure; used for debugging. */
int line; /* Line number in the source file; used
* for debugging. */
@@ -1884,7 +1884,7 @@ Tcl_Obj *
Tcl_DbNewLongObj(longValue, file, line)
register long longValue; /* Long integer used to initialize the
* new object. */
- char *file; /* The name of the source file calling this
+ CONST char *file; /* The name of the source file calling this
* procedure; used for debugging. */
int line; /* Line number in the source file; used
* for debugging. */
@@ -1905,7 +1905,7 @@ Tcl_Obj *
Tcl_DbNewLongObj(longValue, file, line)
register long longValue; /* Long integer used to initialize the
* new object. */
- char *file; /* The name of the source file calling this
+ CONST char *file; /* The name of the source file calling this
* procedure; used for debugging. */
int line; /* Line number in the source file; used
* for debugging. */
@@ -2018,7 +2018,7 @@ void
Tcl_DbIncrRefCount(objPtr, file, line)
register Tcl_Obj *objPtr; /* The object we are registering a
* reference to. */
- char *file; /* The name of the source file calling this
+ CONST char *file; /* The name of the source file calling this
* procedure; used for debugging. */
int line; /* Line number in the source file; used
* for debugging. */
@@ -2058,7 +2058,7 @@ void
Tcl_DbDecrRefCount(objPtr, file, line)
register Tcl_Obj *objPtr; /* The object we are releasing a reference
* to. */
- char *file; /* The name of the source file calling this
+ CONST char *file; /* The name of the source file calling this
* procedure; used for debugging. */
int line; /* Line number in the source file; used
* for debugging. */
@@ -2099,7 +2099,7 @@ Tcl_DbDecrRefCount(objPtr, file, line)
int
Tcl_DbIsShared(objPtr, file, line)
register Tcl_Obj *objPtr; /* The object to test for being shared. */
- char *file; /* The name of the source file calling this
+ CONST char *file; /* The name of the source file calling this
* procedure; used for debugging. */
int line; /* Line number in the source file; used
* for debugging. */
diff --git a/generic/tclPkg.c b/generic/tclPkg.c
index 11211d9..0219a2f 100644
--- a/generic/tclPkg.c
+++ b/generic/tclPkg.c
@@ -9,7 +9,7 @@
* See the file "license.terms" for information on usage and redistribution
* of this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tclPkg.c,v 1.5 1999/09/21 04:20:40 hobbs Exp $
+ * RCS: @(#) $Id: tclPkg.c,v 1.6 2001/04/04 16:07:21 kennykb Exp $
*/
#include "tclInt.h"
@@ -51,11 +51,12 @@ typedef struct Package {
*/
static int CheckVersion _ANSI_ARGS_((Tcl_Interp *interp,
- char *string));
-static int ComparePkgVersions _ANSI_ARGS_((char *v1, char *v2,
+ CONST char *string));
+static int ComparePkgVersions _ANSI_ARGS_((CONST char *v1,
+ CONST char *v2,
int *satPtr));
static Package * FindPackage _ANSI_ARGS_((Tcl_Interp *interp,
- char *name));
+ CONST char *name));
/*
*----------------------------------------------------------------------
@@ -84,8 +85,8 @@ int
Tcl_PkgProvide(interp, name, version)
Tcl_Interp *interp; /* Interpreter in which package is now
* available. */
- char *name; /* Name of package. */
- char *version; /* Version string for package. */
+ CONST char *name; /* Name of package. */
+ CONST char *version; /* Version string for package. */
{
return Tcl_PkgProvideEx(interp, name, version, (ClientData) NULL);
}
@@ -94,8 +95,8 @@ int
Tcl_PkgProvideEx(interp, name, version, clientData)
Tcl_Interp *interp; /* Interpreter in which package is now
* available. */
- char *name; /* Name of package. */
- char *version; /* Version string for package. */
+ CONST char *name; /* Name of package. */
+ CONST char *version; /* Version string for package. */
ClientData clientData; /* clientdata for this package (normally
* used for C callback function table) */
{
@@ -148,12 +149,12 @@ Tcl_PkgProvideEx(interp, name, version, clientData)
*----------------------------------------------------------------------
*/
-char *
+CONST char *
Tcl_PkgRequire(interp, name, version, exact)
Tcl_Interp *interp; /* Interpreter in which package is now
* available. */
- char *name; /* Name of desired package. */
- char *version; /* Version string for desired version;
+ CONST char *name; /* Name of desired package. */
+ CONST char *version; /* Version string for desired version;
* NULL means use the latest version
* available. */
int exact; /* Non-zero means that only the particular
@@ -163,12 +164,12 @@ Tcl_PkgRequire(interp, name, version, exact)
return Tcl_PkgRequireEx(interp, name, version, exact, (ClientData *) NULL);
}
-char *
+CONST char *
Tcl_PkgRequireEx(interp, name, version, exact, clientDataPtr)
Tcl_Interp *interp; /* Interpreter in which package is now
* available. */
- char *name; /* Name of desired package. */
- char *version; /* Version string for desired version;
+ CONST char *name; /* Name of desired package. */
+ CONST char *version; /* Version string for desired version;
* NULL means use the latest version
* available. */
int exact; /* Non-zero means that only the particular
@@ -350,12 +351,12 @@ Tcl_PkgRequireEx(interp, name, version, exact, clientDataPtr)
*----------------------------------------------------------------------
*/
-char *
+CONST char *
Tcl_PkgPresent(interp, name, version, exact)
Tcl_Interp *interp; /* Interpreter in which package is now
* available. */
- char *name; /* Name of desired package. */
- char *version; /* Version string for desired version;
+ CONST char *name; /* Name of desired package. */
+ CONST char *version; /* Version string for desired version;
* NULL means use the latest version
* available. */
int exact; /* Non-zero means that only the particular
@@ -365,12 +366,12 @@ Tcl_PkgPresent(interp, name, version, exact)
return Tcl_PkgPresentEx(interp, name, version, exact, (ClientData *) NULL);
}
-char *
+CONST char *
Tcl_PkgPresentEx(interp, name, version, exact, clientDataPtr)
Tcl_Interp *interp; /* Interpreter in which package is now
* available. */
- char *name; /* Name of desired package. */
- char *version; /* Version string for desired version;
+ CONST char *name; /* Name of desired package. */
+ CONST char *version; /* Version string for desired version;
* NULL means use the latest version
* available. */
int exact; /* Non-zero means that only the particular
@@ -485,7 +486,8 @@ Tcl_PackageObjCmd(dummy, interp, objc, objv)
Tcl_HashEntry *hPtr;
Tcl_HashSearch search;
Tcl_HashTable *tablePtr;
- char *version, *argv2, *argv3, *argv4;
+ CONST char *version;
+ char *argv2, *argv3, *argv4;
if (objc < 2) {
Tcl_WrongNumArgs(interp, 1, objv, "option ?arg arg ...?");
@@ -619,7 +621,7 @@ Tcl_PackageObjCmd(dummy, interp, objc, objv)
if (version == NULL) {
return TCL_ERROR;
}
- Tcl_SetResult(interp, version, TCL_VOLATILE);
+ Tcl_SetObjResult( interp, Tcl_NewStringObj( version, -1 ) );
break;
}
case PKG_PROVIDE: {
@@ -674,7 +676,7 @@ Tcl_PackageObjCmd(dummy, interp, objc, objv)
if (version == NULL) {
return TCL_ERROR;
}
- Tcl_SetResult(interp, version, TCL_VOLATILE);
+ Tcl_SetObjResult( interp, Tcl_NewStringObj( version, -1 ) );
break;
}
case PKG_UNKNOWN: {
@@ -776,7 +778,7 @@ Tcl_PackageObjCmd(dummy, interp, objc, objv)
static Package *
FindPackage(interp, name)
Tcl_Interp *interp; /* Interpreter to use for package lookup. */
- char *name; /* Name of package to fine. */
+ CONST char *name; /* Name of package to fine. */
{
Interp *iPtr = (Interp *) interp;
Tcl_HashEntry *hPtr;
@@ -866,11 +868,11 @@ TclFreePackageInfo(iPtr)
static int
CheckVersion(interp, string)
Tcl_Interp *interp; /* Used for error reporting. */
- char *string; /* Supposedly a version number, which is
+ CONST char *string; /* Supposedly a version number, which is
* groups of decimal digits separated
* by dots. */
{
- char *p = string;
+ CONST char *p = string;
char prevChar;
if (!isdigit(UCHAR(*p))) { /* INTL: digit */
@@ -915,7 +917,8 @@ CheckVersion(interp, string)
static int
ComparePkgVersions(v1, v2, satPtr)
- char *v1, *v2; /* Versions strings, of form 2.1.3 (any
+ CONST char *v1;
+ CONST char *v2; /* Versions strings, of form 2.1.3 (any
* number of version numbers). */
int *satPtr; /* If non-null, the word pointed to is
* filled in with a 0/1 value. 1 means
diff --git a/generic/tclStringObj.c b/generic/tclStringObj.c
index a20fa06..dbab4c7 100644
--- a/generic/tclStringObj.c
+++ b/generic/tclStringObj.c
@@ -33,7 +33,7 @@
* See the file "license.terms" for information on usage and redistribution
* of this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tclStringObj.c,v 1.19 2000/09/14 18:42:31 ericm Exp $ */
+ * RCS: @(#) $Id: tclStringObj.c,v 1.20 2001/04/04 16:07:21 kennykb Exp $ */
#include "tclInt.h"
@@ -42,15 +42,15 @@
*/
static void AppendUnicodeToUnicodeRep _ANSI_ARGS_((
- Tcl_Obj *objPtr, Tcl_UniChar *unicode,
+ Tcl_Obj *objPtr, CONST Tcl_UniChar *unicode,
int appendNumChars));
static void AppendUnicodeToUtfRep _ANSI_ARGS_((
- Tcl_Obj *objPtr, Tcl_UniChar *unicode,
+ Tcl_Obj *objPtr, CONST Tcl_UniChar *unicode,
int numChars));
static void AppendUtfToUnicodeRep _ANSI_ARGS_((Tcl_Obj *objPtr,
- char *bytes, int numBytes));
+ CONST char *bytes, int numBytes));
static void AppendUtfToUtfRep _ANSI_ARGS_((Tcl_Obj *objPtr,
- char *bytes, int numBytes));
+ CONST char *bytes, int numBytes));
static void FillUnicodeRep _ANSI_ARGS_((Tcl_Obj *objPtr));
@@ -250,7 +250,7 @@ Tcl_DbNewStringObj(bytes, length, file, line)
* when initializing the new object. If
* negative, use bytes up to the first
* NULL byte. */
- char *file; /* The name of the source file calling this
+ CONST char *file; /* The name of the source file calling this
* procedure; used for debugging. */
int line; /* Line number in the source file; used
* for debugging. */
@@ -275,7 +275,7 @@ Tcl_DbNewStringObj(bytes, length, file, line)
* when initializing the new object. If
* negative, use bytes up to the first
* NULL byte. */
- char *file; /* The name of the source file calling this
+ CONST char *file; /* The name of the source file calling this
* procedure; used for debugging. */
int line; /* Line number in the source file; used
* for debugging. */
@@ -306,7 +306,7 @@ Tcl_DbNewStringObj(bytes, length, file, line)
Tcl_Obj *
Tcl_NewUnicodeObj(unicode, numChars)
- Tcl_UniChar *unicode; /* The unicode string used to initialize
+ CONST Tcl_UniChar *unicode; /* The unicode string used to initialize
* the new object. */
int numChars; /* Number of characters in the unicode
* string. */
@@ -617,7 +617,7 @@ Tcl_GetRange(objPtr, first, last)
void
Tcl_SetStringObj(objPtr, bytes, length)
register Tcl_Obj *objPtr; /* Object whose internal rep to init. */
- char *bytes; /* Points to the first of the length bytes
+ CONST char *bytes; /* Points to the first of the length bytes
* used to initialize the object. */
register int length; /* The number of bytes to copy from "bytes"
* when initializing the object. If
@@ -827,7 +827,7 @@ Tcl_AttemptSetObjLength(objPtr, length)
void
Tcl_SetUnicodeObj(objPtr, unicode, numChars)
Tcl_Obj *objPtr; /* The object to set the string of. */
- Tcl_UniChar *unicode; /* The unicode string used to initialize
+ CONST Tcl_UniChar *unicode; /* The unicode string used to initialize
* the object. */
int numChars; /* Number of characters in the unicode
* string. */
@@ -889,7 +889,7 @@ Tcl_SetUnicodeObj(objPtr, unicode, numChars)
void
Tcl_AppendToObj(objPtr, bytes, length)
register Tcl_Obj *objPtr; /* Points to the object to append to. */
- char *bytes; /* Points to the bytes to append to the
+ CONST char *bytes; /* Points to the bytes to append to the
* object. */
register int length; /* The number of bytes to append from
* "bytes". If < 0, then append all bytes
@@ -946,7 +946,7 @@ Tcl_AppendToObj(objPtr, bytes, length)
void
Tcl_AppendUnicodeToObj(objPtr, unicode, length)
register Tcl_Obj *objPtr; /* Points to the object to append to. */
- Tcl_UniChar *unicode; /* The unicode string to append to the
+ CONST Tcl_UniChar *unicode; /* The unicode string to append to the
* object. */
int length; /* Number of chars in "unicode". */
{
@@ -1084,9 +1084,9 @@ Tcl_AppendObjToObj(objPtr, appendObjPtr)
static void
AppendUnicodeToUnicodeRep(objPtr, unicode, appendNumChars)
- Tcl_Obj *objPtr; /* Points to the object to append to. */
- Tcl_UniChar *unicode; /* String to append. */
- int appendNumChars; /* Number of chars of "unicode" to append. */
+ Tcl_Obj *objPtr; /* Points to the object to append to. */
+ CONST Tcl_UniChar *unicode; /* String to append. */
+ int appendNumChars; /* Number of chars of "unicode" to append. */
{
String *stringPtr, *tmpString;
size_t numChars;
@@ -1160,9 +1160,9 @@ AppendUnicodeToUnicodeRep(objPtr, unicode, appendNumChars)
static void
AppendUnicodeToUtfRep(objPtr, unicode, numChars)
- Tcl_Obj *objPtr; /* Points to the object to append to. */
- Tcl_UniChar *unicode; /* String to convert to UTF. */
- int numChars; /* Number of chars of "unicode" to convert. */
+ Tcl_Obj *objPtr; /* Points to the object to append to. */
+ CONST Tcl_UniChar *unicode; /* String to convert to UTF. */
+ int numChars; /* Number of chars of "unicode" to convert. */
{
Tcl_DString dsPtr;
char *bytes;
@@ -1204,7 +1204,7 @@ AppendUnicodeToUtfRep(objPtr, unicode, numChars)
static void
AppendUtfToUnicodeRep(objPtr, bytes, numBytes)
Tcl_Obj *objPtr; /* Points to the object to append to. */
- char *bytes; /* String to convert to Unicode. */
+ CONST char *bytes; /* String to convert to Unicode. */
int numBytes; /* Number of bytes of "bytes" to convert. */
{
Tcl_DString dsPtr;
@@ -1245,7 +1245,7 @@ AppendUtfToUnicodeRep(objPtr, bytes, numBytes)
static void
AppendUtfToUtfRep(objPtr, bytes, numBytes)
Tcl_Obj *objPtr; /* Points to the object to append to. */
- char *bytes; /* String to append. */
+ CONST char *bytes; /* String to append. */
int numBytes; /* Number of bytes of "bytes" to append. */
{
String *stringPtr;
diff --git a/generic/tclStubLib.c b/generic/tclStubLib.c
index df1d385..f1f165e 100644
--- a/generic/tclStubLib.c
+++ b/generic/tclStubLib.c
@@ -10,7 +10,7 @@
* See the file "license.terms" for information on usage and redistribution
* of this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tclStubLib.c,v 1.4 1999/05/25 01:00:27 stanton Exp $
+ * RCS: @(#) $Id: tclStubLib.c,v 1.5 2001/04/04 16:07:21 kennykb Exp $
*/
/*
@@ -80,13 +80,13 @@ HasStubSupport (interp)
#undef Tcl_InitStubs
#endif
-char *
+CONST char *
Tcl_InitStubs (interp, version, exact)
Tcl_Interp *interp;
- char *version;
+ CONST char *version;
int exact;
{
- char *actualVersion;
+ CONST char *actualVersion;
TclStubs *tmp;
if (!tclStubsPtr) {