Index: ChangeLog
===================================================================
RCS file: /cvsroot/tcl/tcl/ChangeLog,v
retrieving revision 1.816
diff -u -u -r1.816 ChangeLog
--- ChangeLog	2002/01/25 21:36:09	1.816
+++ ChangeLog	2002/01/25 21:58:01
@@ -1,5 +1,16 @@
 2002-01-25  Don Porter <dgp@users.sourceforge.net>
 
+	* Following is [Patch 501006]
+	* generic/tclInt.decls (Tcl_AddInterpResolvers, Tcl_Export,
+	  Tcl_FindNamespace, Tcl_GetInterpResolvers, Tcl_ForgetImport,
+	  Tcl_Import, Tcl_RemoveInterpResolvers):
+	* generic/tclNamesp.c (Tcl_Export, Tcl_Import, Tcl_ForgetImport,
+	  Tcl_FindNamespace):
+	* generic/tclResolve.c (Tcl_AddInterpResolvers,Tcl_GetInterpResolvers,
+	  Tcl_RemoveInterpResolvers): Updated APIs in generic/tclResolve.c
+	and generic/tclNamesp.c according to the guidelines of TIP 27.
+	* generic/tclIntDecls.h: make genstubs
+
 	* Following is [Patch 505630]
 	* doc/AddErrorInfo.3:
 	* generic/tcl.decls (Tcl_LogCommandInfo):
Index: generic/tclInt.decls
===================================================================
RCS file: /cvsroot/tcl/tcl/generic/tclInt.decls,v
retrieving revision 1.43
diff -u -u -r1.43 tclInt.decls
--- generic/tclInt.decls	2002/01/25 20:40:55	1.43
+++ generic/tclInt.decls	2002/01/25 21:58:02
@@ -431,7 +431,7 @@
 # defined here instead of in tcl.decls since they are not stable yet.
 
 declare 111 generic {
-    void Tcl_AddInterpResolvers(Tcl_Interp *interp, char *name, \
+    void Tcl_AddInterpResolvers(Tcl_Interp *interp, CONST char *name, \
 	    Tcl_ResolveCmdProc *cmdProc, Tcl_ResolveVarProc *varProc, \
 	    Tcl_ResolveCompiledVarProc *compiledVarProc)
 }
@@ -447,19 +447,19 @@
     void Tcl_DeleteNamespace(Tcl_Namespace *nsPtr)
 }
 declare 115 generic {
-    int Tcl_Export(Tcl_Interp *interp, Tcl_Namespace *nsPtr, char *pattern, \
-	    int resetListFirst)
+    int Tcl_Export(Tcl_Interp *interp, Tcl_Namespace *nsPtr, \
+	    CONST char *pattern, int resetListFirst)
 }
 declare 116 generic {
     Tcl_Command Tcl_FindCommand(Tcl_Interp *interp, CONST char *name, \
 	    Tcl_Namespace *contextNsPtr, int flags)
 }
 declare 117 generic {
-    Tcl_Namespace * Tcl_FindNamespace(Tcl_Interp *interp, char *name, \
+    Tcl_Namespace * Tcl_FindNamespace(Tcl_Interp *interp, CONST char *name, \
 	    Tcl_Namespace *contextNsPtr, int flags)
 }
 declare 118 generic {
-    int Tcl_GetInterpResolvers(Tcl_Interp *interp, char *name, \
+    int Tcl_GetInterpResolvers(Tcl_Interp *interp, CONST char *name, \
 	    Tcl_ResolverInfo *resInfo)
 }
 declare 119 generic {
@@ -472,7 +472,7 @@
 }
 declare 121 generic {
     int Tcl_ForgetImport(Tcl_Interp *interp, Tcl_Namespace *nsPtr, \
-	    char *pattern)
+	    CONST char *pattern)
 }
 declare 122 generic {
     Tcl_Command Tcl_GetCommandFromObj(Tcl_Interp *interp, Tcl_Obj *objPtr)
@@ -493,7 +493,7 @@
 }
 declare 127 generic {
     int Tcl_Import(Tcl_Interp *interp, Tcl_Namespace *nsPtr, \
-	    char *pattern, int allowOverwrite)
+	    CONST char *pattern, int allowOverwrite)
 }
 declare 128 generic {
     void Tcl_PopCallFrame(Tcl_Interp* interp)
@@ -503,7 +503,7 @@
 	    Tcl_Namespace *nsPtr, int isProcCallFrame)
 } 
 declare 130 generic {
-    int Tcl_RemoveInterpResolvers(Tcl_Interp *interp, char *name)
+    int Tcl_RemoveInterpResolvers(Tcl_Interp *interp, CONST char *name)
 }
 declare 131 generic {
     void Tcl_SetNamespaceResolvers(Tcl_Namespace *namespacePtr, \
Index: generic/tclIntDecls.h
===================================================================
RCS file: /cvsroot/tcl/tcl/generic/tclIntDecls.h,v
retrieving revision 1.36
diff -u -u -r1.36 tclIntDecls.h
--- generic/tclIntDecls.h	2002/01/25 20:40:55	1.36
+++ generic/tclIntDecls.h	2002/01/25 21:58:03
@@ -336,7 +336,7 @@
 /* Slot 110 is reserved */
 /* 111 */
 EXTERN void		Tcl_AddInterpResolvers _ANSI_ARGS_((
-				Tcl_Interp * interp, char * name, 
+				Tcl_Interp * interp, CONST char * name, 
 				Tcl_ResolveCmdProc * cmdProc, 
 				Tcl_ResolveVarProc * varProc, 
 				Tcl_ResolveCompiledVarProc * compiledVarProc));
@@ -353,7 +353,7 @@
 				Tcl_Namespace * nsPtr));
 /* 115 */
 EXTERN int		Tcl_Export _ANSI_ARGS_((Tcl_Interp * interp, 
-				Tcl_Namespace * nsPtr, char * pattern, 
+				Tcl_Namespace * nsPtr, CONST char * pattern, 
 				int resetListFirst));
 /* 116 */
 EXTERN Tcl_Command	Tcl_FindCommand _ANSI_ARGS_((Tcl_Interp * interp, 
@@ -361,11 +361,11 @@
 				Tcl_Namespace * contextNsPtr, int flags));
 /* 117 */
 EXTERN Tcl_Namespace *	Tcl_FindNamespace _ANSI_ARGS_((Tcl_Interp * interp, 
-				char * name, Tcl_Namespace * contextNsPtr, 
-				int flags));
+				CONST char * name, 
+				Tcl_Namespace * contextNsPtr, int flags));
 /* 118 */
 EXTERN int		Tcl_GetInterpResolvers _ANSI_ARGS_((
-				Tcl_Interp * interp, char * name, 
+				Tcl_Interp * interp, CONST char * name, 
 				Tcl_ResolverInfo * resInfo));
 /* 119 */
 EXTERN int		Tcl_GetNamespaceResolvers _ANSI_ARGS_((
@@ -377,7 +377,7 @@
 				Tcl_Namespace * contextNsPtr, int flags));
 /* 121 */
 EXTERN int		Tcl_ForgetImport _ANSI_ARGS_((Tcl_Interp * interp, 
-				Tcl_Namespace * nsPtr, char * pattern));
+				Tcl_Namespace * nsPtr, CONST char * pattern));
 /* 122 */
 EXTERN Tcl_Command	Tcl_GetCommandFromObj _ANSI_ARGS_((
 				Tcl_Interp * interp, Tcl_Obj * objPtr));
@@ -397,7 +397,7 @@
 				Tcl_Obj * objPtr));
 /* 127 */
 EXTERN int		Tcl_Import _ANSI_ARGS_((Tcl_Interp * interp, 
-				Tcl_Namespace * nsPtr, char * pattern, 
+				Tcl_Namespace * nsPtr, CONST char * pattern, 
 				int allowOverwrite));
 /* 128 */
 EXTERN void		Tcl_PopCallFrame _ANSI_ARGS_((Tcl_Interp* interp));
@@ -407,7 +407,7 @@
 				Tcl_Namespace * nsPtr, int isProcCallFrame));
 /* 130 */
 EXTERN int		Tcl_RemoveInterpResolvers _ANSI_ARGS_((
-				Tcl_Interp * interp, char * name));
+				Tcl_Interp * interp, CONST char * name));
 /* 131 */
 EXTERN void		Tcl_SetNamespaceResolvers _ANSI_ARGS_((
 				Tcl_Namespace * namespacePtr, 
@@ -650,26 +650,26 @@
     void (*tclTeardownNamespace) _ANSI_ARGS_((Namespace * nsPtr)); /* 108 */
     int (*tclUpdateReturnInfo) _ANSI_ARGS_((Interp * iPtr)); /* 109 */
     void *reserved110;
-    void (*tcl_AddInterpResolvers) _ANSI_ARGS_((Tcl_Interp * interp, char * name, Tcl_ResolveCmdProc * cmdProc, Tcl_ResolveVarProc * varProc, Tcl_ResolveCompiledVarProc * compiledVarProc)); /* 111 */
+    void (*tcl_AddInterpResolvers) _ANSI_ARGS_((Tcl_Interp * interp, CONST char * name, Tcl_ResolveCmdProc * cmdProc, Tcl_ResolveVarProc * varProc, Tcl_ResolveCompiledVarProc * compiledVarProc)); /* 111 */
     int (*tcl_AppendExportList) _ANSI_ARGS_((Tcl_Interp * interp, Tcl_Namespace * nsPtr, Tcl_Obj * objPtr)); /* 112 */
     Tcl_Namespace * (*tcl_CreateNamespace) _ANSI_ARGS_((Tcl_Interp * interp, CONST char * name, ClientData clientData, Tcl_NamespaceDeleteProc * deleteProc)); /* 113 */
     void (*tcl_DeleteNamespace) _ANSI_ARGS_((Tcl_Namespace * nsPtr)); /* 114 */
-    int (*tcl_Export) _ANSI_ARGS_((Tcl_Interp * interp, Tcl_Namespace * nsPtr, char * pattern, int resetListFirst)); /* 115 */
+    int (*tcl_Export) _ANSI_ARGS_((Tcl_Interp * interp, Tcl_Namespace * nsPtr, CONST char * pattern, int resetListFirst)); /* 115 */
     Tcl_Command (*tcl_FindCommand) _ANSI_ARGS_((Tcl_Interp * interp, CONST char * name, Tcl_Namespace * contextNsPtr, int flags)); /* 116 */
-    Tcl_Namespace * (*tcl_FindNamespace) _ANSI_ARGS_((Tcl_Interp * interp, char * name, Tcl_Namespace * contextNsPtr, int flags)); /* 117 */
-    int (*tcl_GetInterpResolvers) _ANSI_ARGS_((Tcl_Interp * interp, char * name, Tcl_ResolverInfo * resInfo)); /* 118 */
+    Tcl_Namespace * (*tcl_FindNamespace) _ANSI_ARGS_((Tcl_Interp * interp, CONST char * name, Tcl_Namespace * contextNsPtr, int flags)); /* 117 */
+    int (*tcl_GetInterpResolvers) _ANSI_ARGS_((Tcl_Interp * interp, CONST char * name, Tcl_ResolverInfo * resInfo)); /* 118 */
     int (*tcl_GetNamespaceResolvers) _ANSI_ARGS_((Tcl_Namespace * namespacePtr, Tcl_ResolverInfo * resInfo)); /* 119 */
     Tcl_Var (*tcl_FindNamespaceVar) _ANSI_ARGS_((Tcl_Interp * interp, char * name, Tcl_Namespace * contextNsPtr, int flags)); /* 120 */
-    int (*tcl_ForgetImport) _ANSI_ARGS_((Tcl_Interp * interp, Tcl_Namespace * nsPtr, char * pattern)); /* 121 */
+    int (*tcl_ForgetImport) _ANSI_ARGS_((Tcl_Interp * interp, Tcl_Namespace * nsPtr, CONST char * pattern)); /* 121 */
     Tcl_Command (*tcl_GetCommandFromObj) _ANSI_ARGS_((Tcl_Interp * interp, Tcl_Obj * objPtr)); /* 122 */
     void (*tcl_GetCommandFullName) _ANSI_ARGS_((Tcl_Interp * interp, Tcl_Command command, Tcl_Obj * objPtr)); /* 123 */
     Tcl_Namespace * (*tcl_GetCurrentNamespace) _ANSI_ARGS_((Tcl_Interp * interp)); /* 124 */
     Tcl_Namespace * (*tcl_GetGlobalNamespace) _ANSI_ARGS_((Tcl_Interp * interp)); /* 125 */
     void (*tcl_GetVariableFullName) _ANSI_ARGS_((Tcl_Interp * interp, Tcl_Var variable, Tcl_Obj * objPtr)); /* 126 */
-    int (*tcl_Import) _ANSI_ARGS_((Tcl_Interp * interp, Tcl_Namespace * nsPtr, char * pattern, int allowOverwrite)); /* 127 */
+    int (*tcl_Import) _ANSI_ARGS_((Tcl_Interp * interp, Tcl_Namespace * nsPtr, CONST char * pattern, int allowOverwrite)); /* 127 */
     void (*tcl_PopCallFrame) _ANSI_ARGS_((Tcl_Interp* interp)); /* 128 */
     int (*tcl_PushCallFrame) _ANSI_ARGS_((Tcl_Interp* interp, Tcl_CallFrame * framePtr, Tcl_Namespace * nsPtr, int isProcCallFrame)); /* 129 */
-    int (*tcl_RemoveInterpResolvers) _ANSI_ARGS_((Tcl_Interp * interp, char * name)); /* 130 */
+    int (*tcl_RemoveInterpResolvers) _ANSI_ARGS_((Tcl_Interp * interp, CONST char * name)); /* 130 */
     void (*tcl_SetNamespaceResolvers) _ANSI_ARGS_((Tcl_Namespace * namespacePtr, Tcl_ResolveCmdProc * cmdProc, Tcl_ResolveVarProc * varProc, Tcl_ResolveCompiledVarProc * compiledVarProc)); /* 131 */
     int (*tclpHasSockets) _ANSI_ARGS_((Tcl_Interp * interp)); /* 132 */
     struct tm * (*tclpGetDate) _ANSI_ARGS_((TclpTime_t time, int useGMT)); /* 133 */
Index: generic/tclNamesp.c
===================================================================
RCS file: /cvsroot/tcl/tcl/generic/tclNamesp.c,v
retrieving revision 1.27
diff -u -u -r1.27 tclNamesp.c
--- generic/tclNamesp.c	2002/01/25 20:40:55	1.27
+++ generic/tclNamesp.c	2002/01/25 21:58:04
@@ -902,7 +902,7 @@
     Tcl_Namespace *namespacePtr; /* Points to the namespace from which 
 				  * commands are to be exported. NULL for
                                   * the current namespace. */
-    char *pattern;               /* String pattern indicating which commands
+    CONST char *pattern;         /* String pattern indicating which commands
                                   * to export. This pattern may not include
 				  * any namespace qualifiers; only commands
 				  * in the specified namespace may be
@@ -1103,7 +1103,7 @@
     Tcl_Namespace *namespacePtr; /* Points to the namespace into which the
 				  * commands are to be imported. NULL for
                                   * the current namespace. */
-    char *pattern;               /* String pattern indicating which commands
+    CONST char *pattern;         /* String pattern indicating which commands
                                   * to import. This pattern should be
 				  * qualified by the name of the namespace
 				  * from which to import the command(s). */
@@ -1338,7 +1338,7 @@
     Tcl_Namespace *namespacePtr; /* Points to the namespace from which
 				  * previously imported commands should be
 				  * removed. NULL for current namespace. */
-    char *pattern;		 /* String pattern indicating which imported
+    CONST char *pattern;	 /* String pattern indicating which imported
 				  * commands to remove. This pattern should
 				  * be qualified by the name of the
 				  * namespace from which the command(s) were
@@ -1881,7 +1881,7 @@
 Tcl_FindNamespace(interp, name, contextNsPtr, flags)
     Tcl_Interp *interp;		 /* The interpreter in which to find the
 				  * namespace. */
-    char *name;			 /* Namespace name. If it starts with "::",
+    CONST char *name;		 /* Namespace name. If it starts with "::",
 				  * will be looked up in global namespace.
 				  * Else, looked up first in contextNsPtr
 				  * (current namespace if contextNsPtr is
Index: generic/tclResolve.c
===================================================================
RCS file: /cvsroot/tcl/tcl/generic/tclResolve.c,v
retrieving revision 1.3
diff -u -u -r1.3 tclResolve.c
--- generic/tclResolve.c	1998/10/06 19:12:06	1.3
+++ generic/tclResolve.c	2002/01/25 21:58:04
@@ -63,7 +63,7 @@
 
     Tcl_Interp *interp;			/* Interpreter whose name resolution
 					 * rules are being modified. */
-    char *name;				/* Name of this resolution scheme. */
+    CONST char *name;			/* Name of this resolution scheme. */
     Tcl_ResolveCmdProc *cmdProc;	/* New procedure for command
 					 * resolution */
     Tcl_ResolveVarProc *varProc;	/* Procedure for variable resolution
@@ -142,7 +142,7 @@
 
     Tcl_Interp *interp;			/* Interpreter whose name resolution
 					 * rules are being queried. */
-    char *name;                         /* Look for a scheme with this name. */
+    CONST char *name;                   /* Look for a scheme with this name. */
     Tcl_ResolverInfo *resInfoPtr;	/* Returns pointers to the procedures,
 					 * if found */
 {
@@ -194,7 +194,7 @@
 
     Tcl_Interp *interp;			/* Interpreter whose name resolution
 					 * rules are being modified. */
-    char *name;                         /* Name of the scheme to be removed. */
+    CONST char *name;                   /* Name of the scheme to be removed. */
 {
     Interp *iPtr = (Interp*)interp;
     ResolverScheme **prevPtrPtr, *resPtr;
@@ -291,7 +291,7 @@
  *	type:
  *
  *	  typedef int (Tcl_ResolveCmdProc) _ANSI_ARGS_((
- *		Tcl_Interp* interp, char* name, Tcl_Namespace *context,
+ *		Tcl_Interp* interp, CONST char* name, Tcl_Namespace *context,
  *              int flags, Tcl_Command *rPtr));
  *          
  *	Whenever a command is executed or Tcl_FindCommand is invoked
@@ -308,7 +308,7 @@
  *	time:
  *
  *        typedef int (Tcl_ResolveCompiledVarProc) _ANSI_ARGS_((
- *	        Tcl_Interp* interp, char* name, Tcl_Namespace *context,
+ *	        Tcl_Interp* interp, CONST char* name, Tcl_Namespace *context,
  *	        Tcl_ResolvedVarInfo *rPtr));
  *
  *      If this procedure is able to resolve the name, it should return
@@ -325,7 +325,7 @@
  *	Tcl_FindNamespaceVar.) This procedure has the following type:
  *
  *	  typedef int (Tcl_ResolveVarProc) _ANSI_ARGS_((
- *	        Tcl_Interp* interp, char* name, Tcl_Namespace *context,
+ *	        Tcl_Interp* interp, CONST char* name, Tcl_Namespace *context,
  *	        int flags, Tcl_Var *rPtr));
  *
  *	This procedure is quite similar to the compile-time version.
