tclex (1.2a1-15) types.diff

Summary

 src/tcLex.c |   16 ++++++++--------
 1 file changed, 8 insertions(+), 8 deletions(-)

    
download this patch

Patch contents

--- tclex-1.2a1.orig/src/tcLex.c
+++ tclex-1.2a1/src/tcLex.c
@@ -1194,7 +1198,7 @@
     Tcl_Obj	*CONST objv[];
     int		start;
 {
-    static char * options[] = {
+    static const char * options[] = {
 	"-inclusiveconditions",		"-ic",
 	"-exclusiveconditions",		"-ec",
 	"-resultvariable",
@@ -1271,7 +1275,7 @@
 	 * Get the switch
 	 */
 
-	if (Tcl_GetIndexFromObj(interp, objv[i], options, "switch", 0, &optionIndex) == TCL_ERROR)
+	if (Tcl_GetIndexFromObj(interp, objv[i], options, "switch", 0, (int *) &optionIndex) == TCL_ERROR)
 	    return TCL_ERROR;
 
 	switch (optionIndex) {
@@ -1444,7 +1448,7 @@
     int            objc;
     Tcl_Obj *CONST objv[];
 {
-    static char * options[] = {
+    static const char * options[] = {
 	"create",	"current", 
 	NULL
     };
@@ -1469,7 +1473,7 @@
      * Get the switch
      */
 
-    if (Tcl_GetIndexFromObj(interp, objv[1], options, "option", 0, &optionIndex) == TCL_ERROR) {
+    if (Tcl_GetIndexFromObj(interp, objv[1], options, "option", 0, (int *) &optionIndex) == TCL_ERROR) {
 	/*
 	 * For now, an unknown subcommand is interpreted as the name of a new lexer
 	 * to create. This is for compatibility issues, and is likely to change when
@@ -2533,7 +2537,7 @@
 {
     TcLex_Lexer	*lexer    = (TcLex_Lexer *)clientData;
     TcLex_State	*statePtr = lexer->states[lexer->curState];
-    static char	*options[] = {
+    static const char	*options[] = {
 	"-current",
 	NULL};
     static enum {
@@ -2562,7 +2566,7 @@
      * Switch to distinct subfunctions depending on the option
      */
 
-    if (Tcl_GetIndexFromObj(interp, objv[2], options, "option", 0, &optionIndex) == TCL_ERROR)
+    if (Tcl_GetIndexFromObj(interp, objv[2], options, "option", 0, (int *) &optionIndex) == TCL_ERROR)
 	return TCL_ERROR;
 
     switch (optionIndex) {
@@ -2896,7 +2900,7 @@
     Tcl_Obj	*CONST objv[];
 {
     TcLex_Lexer	*lexer = (TcLex_Lexer *)clientData;
-    static char *options[] = {
+    static const char *options[] = {
 	"eval",		    "start",	    "continue",		"finish",
 	"begin",	    "end",
 	"conditions",	    "reject",
@@ -2935,7 +2939,7 @@
      * Get the subcommand
      */
 
-    if (Tcl_GetIndexFromObj(interp, objv[1], options, "option", 0, &optionIndex) == TCL_ERROR)
+    if (Tcl_GetIndexFromObj(interp, objv[1], options, "option", 0, (int *) &optionIndex) == TCL_ERROR)
 	return TCL_ERROR;
 
     /*