$OpenBSD: patch-Modules__tkinter_c,v 1.1 2004/01/03 17:32:57 sturm Exp $
--- Modules/_tkinter.c.orig	2001-07-19 11:43:12.000000000 +0200
+++ Modules/_tkinter.c	2004-01-03 18:27:10.000000000 +0100
@@ -294,8 +294,8 @@ static char *
 Merge(PyObject *args)
 {
 	PyObject *tmp = NULL;
-	char *argvStore[ARGSZ];
-	char **argv = NULL;
+	CONST84 char *argvStore[ARGSZ];
+	CONST84 char **argv = NULL;
 	int fvStore[ARGSZ];
 	int *fv = NULL;
 	int argc = 0, fvc = 0, i;
@@ -320,7 +320,7 @@ Merge(PyObject *args)
 		argc = PyTuple_Size(args);
 
 		if (argc > ARGSZ) {
-			argv = (char **)ckalloc(argc * sizeof(char *));
+			argv = (CONST84 char **)ckalloc(argc * sizeof(char *));
 			fv = (int *)ckalloc(argc * sizeof(int));
 			if (argv == NULL || fv == NULL) {
 				PyErr_NoMemory();
@@ -355,7 +355,7 @@ Merge(PyObject *args)
   finally:
 	for (i = 0; i < fvc; i++)
 		if (fv[i]) {
-			ckfree(argv[i]);
+			ckfree((char *)argv[i]);
 		}
 	if (argv != argvStore)
 		ckfree(FREECAST argv);
@@ -372,7 +372,7 @@ static PyObject *
 Split(char *list)
 {
 	int argc;
-	char **argv;
+	CONST84 char **argv;
 	PyObject *v;
 
 	if (list == NULL) {
@@ -397,7 +397,7 @@ Split(char *list)
 		PyObject *w;
 
 		for (i = 0; i < argc; i++) {
-			if ((w = Split(argv[i])) == NULL) {
+			if ((w = Split((char *)argv[i])) == NULL) {
 				Py_DECREF(v);
 				v = NULL;
 				break;
@@ -621,8 +621,8 @@ Tkapp_Call(PyObject *self, PyObject *arg
 	else {
 		/* We could request the object result here, but doing
 		   so would confuse applications that expect a string. */
-		char *s = Tcl_GetStringResult(interp);
-		char *p = s;
+		CONST84 char *s = Tcl_GetStringResult(interp);
+		CONST84 char *p = s;
 		/* If the result contains any bytes with the top bit set,
 		   it's UTF-8 and we should decode it to Unicode */
 		while (*p != '\0') {
@@ -908,7 +908,8 @@ Tkapp_AddErrorInfo(PyObject *self, PyObj
 static PyObject *
 SetVar(PyObject *self, PyObject *args, int flags)
 {
-	char *name1, *name2, *ok, *s;
+	char *name1, *name2, *s;
+	CONST84 char *ok;
 	PyObject *newValue;
 	PyObject *tmp;
 
@@ -968,7 +969,8 @@ Tkapp_GlobalSetVar(PyObject *self, PyObj
 static PyObject *
 GetVar(PyObject *self, PyObject *args, int flags)
 {
-	char *name1, *name2=NULL, *s;
+	char *name1, *name2=NULL;
+	CONST84 char *s;
 	PyObject *res = NULL;
 
 	if (!PyArg_ParseTuple(args, "s|s:getvar", &name1, &name2))
@@ -1177,7 +1179,7 @@ Tkapp_SplitList(PyObject *self, PyObject
 {
 	char *list;
 	int argc;
-	char **argv;
+	CONST84 char **argv;
 	PyObject *v;
 	int i;
 
@@ -1343,7 +1345,7 @@ Tkapp_CreateCommand(PyObject *self, PyOb
 	data->func = func;
 
 	ENTER_TCL
-	err = Tcl_CreateCommand(Tkapp_Interp(self), cmdName, PythonCmd,
+	err = Tcl_CreateCommand(Tkapp_Interp(self), cmdName, (Tcl_CmdProc *)PythonCmd,
 				(ClientData)data, PythonCmdDelete);
 	LEAVE_TCL
 	if (err == NULL) {
