summaryrefslogtreecommitdiffstats
path: root/Modules/_tkinter.c
diff options
context:
space:
mode:
authorTim Peters <tim.peters@gmail.com>2004-08-04 02:16:48 (GMT)
committerTim Peters <tim.peters@gmail.com>2004-08-04 02:16:48 (GMT)
commit51fa3b740f3d76a26942904e151d366699b3eba9 (patch)
tree91572ed88e65b1a54af5934b681c8d12cc585e1d /Modules/_tkinter.c
parentedcac8f416ebe4561bbc0e91c46a3bfc5457f73c (diff)
downloadcpython-51fa3b740f3d76a26942904e151d366699b3eba9.zip
cpython-51fa3b740f3d76a26942904e151d366699b3eba9.tar.gz
cpython-51fa3b740f3d76a26942904e151d366699b3eba9.tar.bz2
Tkapp_New(): Rewrite in C so it compiles again.
Diffstat (limited to 'Modules/_tkinter.c')
-rw-r--r--Modules/_tkinter.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/Modules/_tkinter.c b/Modules/_tkinter.c
index 74fe0f8..852bde4 100644
--- a/Modules/_tkinter.c
+++ b/Modules/_tkinter.c
@@ -580,6 +580,7 @@ Tkapp_New(char *screenName, char *baseName, char *className,
{
TkappObject *v;
char *argv0;
+
v = PyObject_New(TkappObject, &Tkapp_Type);
if (v == NULL)
return NULL;
@@ -646,13 +647,15 @@ Tkapp_New(char *screenName, char *baseName, char *className,
/* 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);