diff options
author | Neal Norwitz <nnorwitz@gmail.com> | 2004-02-19 02:44:22 (GMT) |
---|---|---|
committer | Neal Norwitz <nnorwitz@gmail.com> | 2004-02-19 02:44:22 (GMT) |
commit | 44dbae8cca50ab94acde193df4415a27ac1b47fd (patch) | |
tree | 0fbbc01f5f6c955eb9f60348fa2998d3d89b5c67 /Modules/_tkinter.c | |
parent | 63dfece675929bc585b1a37fbb3274822c5a3647 (diff) | |
download | cpython-44dbae8cca50ab94acde193df4415a27ac1b47fd.zip cpython-44dbae8cca50ab94acde193df4415a27ac1b47fd.tar.gz cpython-44dbae8cca50ab94acde193df4415a27ac1b47fd.tar.bz2 |
Remove gcc warning from using "main". Use METH_NOARGS instead of METH_VARARGS
Diffstat (limited to 'Modules/_tkinter.c')
-rw-r--r-- | Modules/_tkinter.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/Modules/_tkinter.c b/Modules/_tkinter.c index 39a93da..36aa010 100644 --- a/Modules/_tkinter.c +++ b/Modules/_tkinter.c @@ -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} }; |