Index: ChangeLog
===================================================================
RCS file: /cvsroot/tcl/tcl/ChangeLog,v
retrieving revision 1.781
diff -u -u -r1.781 ChangeLog
--- ChangeLog	2002/01/07 23:09:12	1.781
+++ ChangeLog	2002/01/09 16:33:58
@@ -1,3 +1,18 @@
+2002-01-09  Don Porter <dgp@users.sourceforge.net>
+
+	* doc/CrtSlave.3:
+	* generic/tcl.decls (Tcl_CreateAlias, Tcl_CreateAliasObj,
+	  Tcl_CreateSlave, Tcl_GetAlias, Tcl_GetAliasObj, Tcl_GetSlave):
+	* generic/tclInterp.c (Tcl_CreateAlias, Tcl_CreateAliasObj,
+	  Tcl_CreateSlave, Tcl_GetAlias, Tcl_GetAliasObj, Tcl_GetSlave):
+	Updated APIs in the file generic/tclInterp.c according to the
+	guidelines of TIP 27.
+	***POTENTIAL INCOMPATIBILITY*** 
+	Includes a source incompatibility in the targetCmdPtr arguments of
+	the Tcl_GetAlias* routines.
+
+	* generic/tclDecls.h: make genstubs
+
 2002-01-07  Don Porter <dgp@users.sourceforge.net>
 
 	* generic/tclEvent.c (TclInExit):
Index: doc/CrtSlave.3
===================================================================
RCS file: /cvsroot/tcl/tcl/doc/CrtSlave.3,v
retrieving revision 1.5
diff -u -u -r1.5 CrtSlave.3
--- doc/CrtSlave.3	2001/04/24 20:59:17	1.5
+++ doc/CrtSlave.3	2002/01/09 16:33:59
@@ -35,18 +35,18 @@
 .sp
 .VS
 int
-\fBTcl_CreateAlias\fR(\fIslaveInterp, srcCmd, targetInterp, targetCmd, argc, argv\fR)
+\fBTcl_CreateAlias\fR(\fIslaveInterp, slaveCmd, targetInterp, targetCmd, argc, argv\fR)
 .sp
 int
-\fBTcl_CreateAliasObj\fR(\fIslaveInterp, srcCmd, targetInterp, targetCmd, objc, objv\fR)
+\fBTcl_CreateAliasObj\fR(\fIslaveInterp, slaveCmd, targetInterp, targetCmd, objc, objv\fR)
 .VE
 .sp
 int
-\fBTcl_GetAlias\fR(\fIinterp, srcCmd, targetInterpPtr, targetCmdPtr, argcPtr, argvPtr\fR)
+\fBTcl_GetAlias\fR(\fIinterp, slaveCmd, targetInterpPtr, targetCmdPtr, argcPtr, argvPtr\fR)
 .sp
 .VS
 int
-\fBTcl_GetAliasObj\fR(\fIinterp, srcCmd, targetInterpPtr, targetCmdPtr, objcPtr, objvPtr\fR)
+\fBTcl_GetAliasObj\fR(\fIinterp, slaveCmd, targetInterpPtr, targetCmdPtr, objcPtr, objvPtr\fR)
 .sp
 int
 \fBTcl_ExposeCommand\fR(\fIinterp, hiddenCmdName, cmdName\fR)
@@ -57,7 +57,7 @@
 .AS Tcl_InterpDeleteProc **hiddenCmdName
 .AP Tcl_Interp *interp in
 Interpreter in which to execute the specified command.
-.AP char *slaveName in
+.AP "CONST char" *slaveName in
 Name of slave interpreter to create or manipulate.
 .AP int isSafe in
 If non-zero, a ``safe'' slave that is suitable for running untrusted code
@@ -65,15 +65,15 @@
 .AP Tcl_Interp *slaveInterp in
 Interpreter to use for creating the source command for an alias (see
 below).
-.AP char *srcCmd in
+.AP "CONST char" *slaveCmd in
 Name of source command for alias.
 .AP Tcl_Interp *targetInterp in
 Interpreter that contains the target command for an alias.
-.AP char *targetCmd in
+.AP "CONST char" *targetCmd in
 Name of target command for alias in \fItargetInterp\fR.
 .AP int argc in
 Count of additional arguments to pass to the alias command.
-.AP char **argv in
+.AP "char * CONST" *argv in
 Vector of strings, the additional arguments to pass to the alias command.
 This storage is owned by the caller.
 .AP int objc in
@@ -85,7 +85,7 @@
 .AP Tcl_Interp **targetInterpPtr in
 Pointer to location to store the address of the interpreter where a target
 command is defined for an alias.
-.AP char **targetCmdPtr out
+.AP "CONST char" **targetCmdPtr out
 Pointer to location to store the address of the name of the target command
 for an alias.
 .AP int *argcPtr out
@@ -161,11 +161,11 @@
 \fIaskingInterp\fR contains the error message.
 .PP
 .VS
-\fBTcl_CreateAlias\fR creates an object command named \fIsrcCmd\fR in
+\fBTcl_CreateAlias\fR creates an object command named \fIslaveCmd\fR in
 \fIslaveInterp\fR that when invoked, will cause the command \fItargetCmd\fR
 to be invoked in \fItargetInterp\fR. The arguments specified by the strings
 contained in \fIargv\fR are always prepended to any arguments supplied in the
-invocation of \fIsrcCmd\fR and passed to \fItargetCmd\fR.
+invocation of \fIslaveCmd\fR and passed to \fItargetCmd\fR.
 This operation returns \fBTCL_OK\fR if it succeeds, or \fBTCL_ERROR\fR if
 it fails; in that case, an error message is left in the object result
 of \fIslaveInterp\fR.
Index: generic/tcl.decls
===================================================================
RCS file: /cvsroot/tcl/tcl/generic/tcl.decls,v
retrieving revision 1.67
diff -u -u -r1.67 tcl.decls
--- generic/tcl.decls	2001/12/18 15:21:20	1.67
+++ generic/tcl.decls	2002/01/09 16:33:59
@@ -316,12 +316,13 @@
 	    int flags)
 }
 declare 86 generic {
-    int Tcl_CreateAlias(Tcl_Interp *slave, char *slaveCmd, \
-	    Tcl_Interp *target, char *targetCmd, int argc, char **argv)
+    int Tcl_CreateAlias(Tcl_Interp *slave, CONST char *slaveCmd, \
+	    Tcl_Interp *target, CONST char *targetCmd, int argc, \
+	    char * CONST *argv)
 }
 declare 87 generic {
-    int Tcl_CreateAliasObj(Tcl_Interp *slave, char *slaveCmd, \
-	    Tcl_Interp *target, char *targetCmd, int objc, \
+    int Tcl_CreateAliasObj(Tcl_Interp *slave, CONST char *slaveCmd, \
+	    Tcl_Interp *target, CONST char *targetCmd, int objc, \
 	    Tcl_Obj *CONST objv[])
 }
 declare 88 generic {
@@ -363,7 +364,7 @@
 	    Tcl_CmdDeleteProc *deleteProc)
 }
 declare 97 generic {
-    Tcl_Interp * Tcl_CreateSlave(Tcl_Interp *interp, char *slaveName, \
+    Tcl_Interp * Tcl_CreateSlave(Tcl_Interp *interp, CONST char *slaveName, \
 	    int isSafe)
 }
 declare 98 generic {
@@ -529,14 +530,14 @@
     void Tcl_FreeResult(Tcl_Interp *interp)
 }
 declare 148 generic {
-    int Tcl_GetAlias(Tcl_Interp *interp, char *slaveCmd, \
-	    Tcl_Interp **targetInterpPtr, char **targetCmdPtr, int *argcPtr, \
-	    char ***argvPtr)
+    int Tcl_GetAlias(Tcl_Interp *interp, CONST char *slaveCmd, \
+	    Tcl_Interp **targetInterpPtr, CONST char **targetCmdPtr, \
+	    int *argcPtr, char ***argvPtr)
 }
 declare 149 generic {
-    int Tcl_GetAliasObj(Tcl_Interp *interp, char *slaveCmd, \
-	    Tcl_Interp **targetInterpPtr, char **targetCmdPtr, int *objcPtr, \
-	    Tcl_Obj ***objv)
+    int Tcl_GetAliasObj(Tcl_Interp *interp, CONST char *slaveCmd, \
+	    Tcl_Interp **targetInterpPtr, CONST char **targetCmdPtr, \
+	    int *objcPtr, Tcl_Obj ***objv)
 }
 declare 150 generic {
     ClientData Tcl_GetAssocData(Tcl_Interp *interp, CONST char *name, \
@@ -617,7 +618,7 @@
     int Tcl_GetServiceMode(void)
 }
 declare 172 generic {
-    Tcl_Interp * Tcl_GetSlave(Tcl_Interp *interp, char *slaveName)
+    Tcl_Interp * Tcl_GetSlave(Tcl_Interp *interp, CONST char *slaveName)
 }
 declare 173 generic {
     Tcl_Channel Tcl_GetStdChannel(int type)
Index: generic/tclDecls.h
===================================================================
RCS file: /cvsroot/tcl/tcl/generic/tclDecls.h,v
retrieving revision 1.67
diff -u -u -r1.67 tclDecls.h
--- generic/tclDecls.h	2001/12/18 15:21:20	1.67
+++ generic/tclDecls.h	2002/01/09 16:34:00
@@ -284,12 +284,13 @@
 				int flags));
 /* 86 */
 EXTERN int		Tcl_CreateAlias _ANSI_ARGS_((Tcl_Interp * slave, 
-				char * slaveCmd, Tcl_Interp * target, 
-				char * targetCmd, int argc, char ** argv));
+				CONST char * slaveCmd, Tcl_Interp * target, 
+				CONST char * targetCmd, int argc, 
+				char * CONST * argv));
 /* 87 */
 EXTERN int		Tcl_CreateAliasObj _ANSI_ARGS_((Tcl_Interp * slave, 
-				char * slaveCmd, Tcl_Interp * target, 
-				char * targetCmd, int objc, 
+				CONST char * slaveCmd, Tcl_Interp * target, 
+				CONST char * targetCmd, int objc, 
 				Tcl_Obj *CONST objv[]));
 /* 88 */
 EXTERN Tcl_Channel	Tcl_CreateChannel _ANSI_ARGS_((
@@ -330,7 +331,7 @@
 				Tcl_CmdDeleteProc * deleteProc));
 /* 97 */
 EXTERN Tcl_Interp *	Tcl_CreateSlave _ANSI_ARGS_((Tcl_Interp * interp, 
-				char * slaveName, int isSafe));
+				CONST char * slaveName, int isSafe));
 /* 98 */
 EXTERN Tcl_TimerToken	Tcl_CreateTimerHandler _ANSI_ARGS_((int milliseconds, 
 				Tcl_TimerProc * proc, ClientData clientData));
@@ -488,15 +489,15 @@
 EXTERN void		Tcl_FreeResult _ANSI_ARGS_((Tcl_Interp * interp));
 /* 148 */
 EXTERN int		Tcl_GetAlias _ANSI_ARGS_((Tcl_Interp * interp, 
-				char * slaveCmd, 
+				CONST char * slaveCmd, 
 				Tcl_Interp ** targetInterpPtr, 
-				char ** targetCmdPtr, int * argcPtr, 
+				CONST char ** targetCmdPtr, int * argcPtr, 
 				char *** argvPtr));
 /* 149 */
 EXTERN int		Tcl_GetAliasObj _ANSI_ARGS_((Tcl_Interp * interp, 
-				char * slaveCmd, 
+				CONST char * slaveCmd, 
 				Tcl_Interp ** targetInterpPtr, 
-				char ** targetCmdPtr, int * objcPtr, 
+				CONST char ** targetCmdPtr, int * objcPtr, 
 				Tcl_Obj *** objv));
 /* 150 */
 EXTERN ClientData	Tcl_GetAssocData _ANSI_ARGS_((Tcl_Interp * interp, 
@@ -562,7 +563,7 @@
 EXTERN int		Tcl_GetServiceMode _ANSI_ARGS_((void));
 /* 172 */
 EXTERN Tcl_Interp *	Tcl_GetSlave _ANSI_ARGS_((Tcl_Interp * interp, 
-				char * slaveName));
+				CONST char * slaveName));
 /* 173 */
 EXTERN Tcl_Channel	Tcl_GetStdChannel _ANSI_ARGS_((int type));
 /* 174 */
@@ -1623,8 +1624,8 @@
     char * (*tcl_Concat) _ANSI_ARGS_((int argc, char * CONST * argv)); /* 83 */
     int (*tcl_ConvertElement) _ANSI_ARGS_((CONST char * src, char * dst, int flags)); /* 84 */
     int (*tcl_ConvertCountedElement) _ANSI_ARGS_((CONST char * src, int length, char * dst, int flags)); /* 85 */
-    int (*tcl_CreateAlias) _ANSI_ARGS_((Tcl_Interp * slave, char * slaveCmd, Tcl_Interp * target, char * targetCmd, int argc, char ** argv)); /* 86 */
-    int (*tcl_CreateAliasObj) _ANSI_ARGS_((Tcl_Interp * slave, char * slaveCmd, Tcl_Interp * target, char * targetCmd, int objc, Tcl_Obj *CONST objv[])); /* 87 */
+    int (*tcl_CreateAlias) _ANSI_ARGS_((Tcl_Interp * slave, CONST char * slaveCmd, Tcl_Interp * target, CONST char * targetCmd, int argc, char * CONST * argv)); /* 86 */
+    int (*tcl_CreateAliasObj) _ANSI_ARGS_((Tcl_Interp * slave, CONST char * slaveCmd, Tcl_Interp * target, CONST char * targetCmd, int objc, Tcl_Obj *CONST objv[])); /* 87 */
     Tcl_Channel (*tcl_CreateChannel) _ANSI_ARGS_((Tcl_ChannelType * typePtr, char * chanName, ClientData instanceData, int mask)); /* 88 */
     void (*tcl_CreateChannelHandler) _ANSI_ARGS_((Tcl_Channel chan, int mask, Tcl_ChannelProc * proc, ClientData clientData)); /* 89 */
     void (*tcl_CreateCloseHandler) _ANSI_ARGS_((Tcl_Channel chan, Tcl_CloseProc * proc, ClientData clientData)); /* 90 */
@@ -1634,7 +1635,7 @@
     Tcl_Interp * (*tcl_CreateInterp) _ANSI_ARGS_((void)); /* 94 */
     void (*tcl_CreateMathFunc) _ANSI_ARGS_((Tcl_Interp * interp, CONST char * name, int numArgs, Tcl_ValueType * argTypes, Tcl_MathProc * proc, ClientData clientData)); /* 95 */
     Tcl_Command (*tcl_CreateObjCommand) _ANSI_ARGS_((Tcl_Interp * interp, CONST char * cmdName, Tcl_ObjCmdProc * proc, ClientData clientData, Tcl_CmdDeleteProc * deleteProc)); /* 96 */
-    Tcl_Interp * (*tcl_CreateSlave) _ANSI_ARGS_((Tcl_Interp * interp, char * slaveName, int isSafe)); /* 97 */
+    Tcl_Interp * (*tcl_CreateSlave) _ANSI_ARGS_((Tcl_Interp * interp, CONST char * slaveName, int isSafe)); /* 97 */
     Tcl_TimerToken (*tcl_CreateTimerHandler) _ANSI_ARGS_((int milliseconds, Tcl_TimerProc * proc, ClientData clientData)); /* 98 */
     Tcl_Trace (*tcl_CreateTrace) _ANSI_ARGS_((Tcl_Interp * interp, int level, Tcl_CmdTraceProc * proc, ClientData clientData)); /* 99 */
     void (*tcl_DeleteAssocData) _ANSI_ARGS_((Tcl_Interp * interp, CONST char * name)); /* 100 */
@@ -1693,8 +1694,8 @@
     Tcl_HashEntry * (*tcl_FirstHashEntry) _ANSI_ARGS_((Tcl_HashTable * tablePtr, Tcl_HashSearch * searchPtr)); /* 145 */
     int (*tcl_Flush) _ANSI_ARGS_((Tcl_Channel chan)); /* 146 */
     void (*tcl_FreeResult) _ANSI_ARGS_((Tcl_Interp * interp)); /* 147 */
-    int (*tcl_GetAlias) _ANSI_ARGS_((Tcl_Interp * interp, char * slaveCmd, Tcl_Interp ** targetInterpPtr, char ** targetCmdPtr, int * argcPtr, char *** argvPtr)); /* 148 */
-    int (*tcl_GetAliasObj) _ANSI_ARGS_((Tcl_Interp * interp, char * slaveCmd, Tcl_Interp ** targetInterpPtr, char ** targetCmdPtr, int * objcPtr, Tcl_Obj *** objv)); /* 149 */
+    int (*tcl_GetAlias) _ANSI_ARGS_((Tcl_Interp * interp, CONST char * slaveCmd, Tcl_Interp ** targetInterpPtr, CONST char ** targetCmdPtr, int * argcPtr, char *** argvPtr)); /* 148 */
+    int (*tcl_GetAliasObj) _ANSI_ARGS_((Tcl_Interp * interp, CONST char * slaveCmd, Tcl_Interp ** targetInterpPtr, CONST char ** targetCmdPtr, int * objcPtr, Tcl_Obj *** objv)); /* 149 */
     ClientData (*tcl_GetAssocData) _ANSI_ARGS_((Tcl_Interp * interp, CONST char * name, Tcl_InterpDeleteProc ** procPtr)); /* 150 */
     Tcl_Channel (*tcl_GetChannel) _ANSI_ARGS_((Tcl_Interp * interp, char * chanName, int * modePtr)); /* 151 */
     int (*tcl_GetChannelBufferSize) _ANSI_ARGS_((Tcl_Channel chan)); /* 152 */
@@ -1725,7 +1726,7 @@
     int (*tcl_Gets) _ANSI_ARGS_((Tcl_Channel chan, Tcl_DString * dsPtr)); /* 169 */
     int (*tcl_GetsObj) _ANSI_ARGS_((Tcl_Channel chan, Tcl_Obj * objPtr)); /* 170 */
     int (*tcl_GetServiceMode) _ANSI_ARGS_((void)); /* 171 */
-    Tcl_Interp * (*tcl_GetSlave) _ANSI_ARGS_((Tcl_Interp * interp, char * slaveName)); /* 172 */
+    Tcl_Interp * (*tcl_GetSlave) _ANSI_ARGS_((Tcl_Interp * interp, CONST char * slaveName)); /* 172 */
     Tcl_Channel (*tcl_GetStdChannel) _ANSI_ARGS_((int type)); /* 173 */
     char * (*tcl_GetStringResult) _ANSI_ARGS_((Tcl_Interp * interp)); /* 174 */
     char * (*tcl_GetVar) _ANSI_ARGS_((Tcl_Interp * interp, char * varName, int flags)); /* 175 */
Index: generic/tclInterp.c
===================================================================
RCS file: /cvsroot/tcl/tcl/generic/tclInterp.c,v
retrieving revision 1.8
diff -u -u -r1.8 tclInterp.c
--- generic/tclInterp.c	2001/11/16 22:28:08	1.8
+++ generic/tclInterp.c	2002/01/09 16:34:01
@@ -808,11 +808,11 @@
 int
 Tcl_CreateAlias(slaveInterp, slaveCmd, targetInterp, targetCmd, argc, argv)
     Tcl_Interp *slaveInterp;	/* Interpreter for source command. */
-    char *slaveCmd;		/* Command to install in slave. */
+    CONST char *slaveCmd;	/* Command to install in slave. */
     Tcl_Interp *targetInterp;	/* Interpreter for target command. */
-    char *targetCmd;		/* Name of target command. */
+    CONST char *targetCmd;	/* Name of target command. */
     int argc;			/* How many additional arguments? */
-    char **argv;		/* These are the additional args. */
+    char * CONST *argv;		/* These are the additional args. */
 {
     Tcl_Obj *slaveObjPtr, *targetObjPtr;
     Tcl_Obj **objv;
@@ -863,9 +863,9 @@
 int
 Tcl_CreateAliasObj(slaveInterp, slaveCmd, targetInterp, targetCmd, objc, objv)
     Tcl_Interp *slaveInterp;	/* Interpreter for source command. */
-    char *slaveCmd;		/* Command to install in slave. */
+    CONST char *slaveCmd;	/* Command to install in slave. */
     Tcl_Interp *targetInterp;	/* Interpreter for target command. */
-    char *targetCmd;		/* Name of target command. */
+    CONST char *targetCmd;	/* Name of target command. */
     int objc;			/* How many additional arguments? */
     Tcl_Obj *CONST objv[];	/* Argument vector. */
 {
@@ -906,9 +906,9 @@
 Tcl_GetAlias(interp, aliasName, targetInterpPtr, targetNamePtr, argcPtr,
         argvPtr)
     Tcl_Interp *interp;			/* Interp to start search from. */
-    char *aliasName;			/* Name of alias to find. */
+    CONST char *aliasName;			/* Name of alias to find. */
     Tcl_Interp **targetInterpPtr;	/* (Return) target interpreter. */
-    char **targetNamePtr;		/* (Return) name of target command. */
+    CONST char **targetNamePtr;		/* (Return) name of target command. */
     int *argcPtr;			/* (Return) count of addnl args. */
     char ***argvPtr;			/* (Return) additional arguments. */
 {
@@ -966,9 +966,9 @@
 Tcl_GetAliasObj(interp, aliasName, targetInterpPtr, targetNamePtr, objcPtr,
         objvPtr)
     Tcl_Interp *interp;			/* Interp to start search from. */
-    char *aliasName;			/* Name of alias to find. */
+    CONST char *aliasName;		/* Name of alias to find. */
     Tcl_Interp **targetInterpPtr;	/* (Return) target interpreter. */
-    char **targetNamePtr;		/* (Return) name of target command. */
+    CONST char **targetNamePtr;		/* (Return) name of target command. */
     int *objcPtr;			/* (Return) count of addnl args. */
     Tcl_Obj ***objvPtr;			/* (Return) additional args. */
 {
@@ -991,7 +991,7 @@
     if (targetInterpPtr != (Tcl_Interp **) NULL) {
         *targetInterpPtr = aliasPtr->targetInterp;
     }
-    if (targetNamePtr != (char **) NULL) {
+    if (targetNamePtr != (CONST char **) NULL) {
         *targetNamePtr = Tcl_GetString(objv[0]);
     }
     if (objcPtr != (int *) NULL) {
@@ -1525,7 +1525,7 @@
 Tcl_Interp *
 Tcl_CreateSlave(interp, slavePath, isSafe)
     Tcl_Interp *interp;		/* Interpreter to start search at. */
-    char *slavePath;		/* Name of slave to create. */
+    CONST char *slavePath;	/* Name of slave to create. */
     int isSafe;			/* Should new slave be "safe" ? */
 {
     Tcl_Obj *pathPtr;
@@ -1558,7 +1558,7 @@
 Tcl_Interp *
 Tcl_GetSlave(interp, slavePath)
     Tcl_Interp *interp;		/* Interpreter to start search from. */
-    char *slavePath;		/* Path of slave to find. */
+    CONST char *slavePath;	/* Path of slave to find. */
 {
     Tcl_Obj *pathPtr;
     Tcl_Interp *slaveInterp;
