Commits

Anonymous committed fbb5428

Tkapp_New(): Rewrite in C so it compiles again.

Comments (0)

Files changed (1)

Modules/_tkinter.c

 {
 	TkappObject *v;
 	char *argv0;
+
 	v = PyObject_New(TkappObject, &Tkapp_Type);
 	if (v == NULL)
 		return NULL;
 
 	/* some initial arguments need to be in argv */
 	if (sync || use) {
+		char *args;
 		int len = 0;
+
 		if (sync)
 			len += sizeof "-sync";
 		if (use)
 			len += strlen(use) + sizeof "-use ";
 
-		char *args = (char*)ckalloc(len);
+		args = (char*)ckalloc(len);
 		if (!args) {
 			PyErr_NoMemory();
 			Py_DECREF(v);