]> granicus.if.org Git - python/commitdiff
Remove gcc warning from using "main". Use METH_NOARGS instead of METH_VARARGS
authorNeal Norwitz <nnorwitz@gmail.com>
Thu, 19 Feb 2004 02:44:22 +0000 (02:44 +0000)
committerNeal Norwitz <nnorwitz@gmail.com>
Thu, 19 Feb 2004 02:44:22 +0000 (02:44 +0000)
Modules/_tkinter.c

index 39a93da84f038f45b3b43f9a4b992e8b0f82a7ad..36aa0109123de514701e74635f999ec5b50d67cb 100644 (file)
@@ -2573,13 +2573,11 @@ static PyObject *
 Tkapp_TkInit(PyObject *self, PyObject *args)
 {
        Tcl_Interp *interp = Tkapp_Interp(self);
-       Tk_Window main;
+       Tk_Window main_window;
        const char * _tk_exists = NULL;
        PyObject *res = NULL;
        int err;
-       main = Tk_MainWindow(interp);
-       if (!PyArg_ParseTuple(args, ":loadtk"))
-               return NULL;
+       main_window = Tk_MainWindow(interp);
 
        /* We want to guard against calling Tk_Init() multiple times */
        CHECK_TCL_APPARTMENT;
@@ -2671,7 +2669,7 @@ static PyMethodDef Tkapp_methods[] =
        {"dooneevent",         Tkapp_DoOneEvent, METH_VARARGS},
        {"quit",               Tkapp_Quit, METH_VARARGS},
        {"interpaddr",         Tkapp_InterpAddr, METH_VARARGS},
-       {"loadtk",             Tkapp_TkInit, METH_VARARGS},
+       {"loadtk",             Tkapp_TkInit, METH_NOARGS},
        {NULL,                 NULL}
 };