Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit b9279bc

Browse files
committed
Remove baseName argument from Tkapp_New, as it apparently
isn't used anymore.
1 parent 2a241ca commit b9279bc

1 file changed

Lines changed: 4 additions & 8 deletions

File tree

Modules/_tkinter.c

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -583,7 +583,7 @@ static void EnableEventHook(void); /* Forward */
583583
static void DisableEventHook(void); /* Forward */
584584

585585
static TkappObject *
586-
Tkapp_New(char *screenName, char *baseName, char *className,
586+
Tkapp_New(char *screenName, char *className,
587587
int interactive, int wantobjects, int wantTk, int sync, char *use)
588588
{
589589
TkappObject *v;
@@ -2812,19 +2812,15 @@ static PyObject *
28122812
Tkinter_Create(PyObject *self, PyObject *args)
28132813
{
28142814
char *screenName = NULL;
2815-
char *baseName = NULL;
2815+
char *baseName = NULL; /* XXX this is not used anymore;
2816+
try getting rid of it. */
28162817
char *className = NULL;
28172818
int interactive = 0;
28182819
int wantobjects = 0;
28192820
int wantTk = 1; /* If false, then Tk_Init() doesn't get called */
28202821
int sync = 0; /* pass -sync to wish */
28212822
char *use = NULL; /* pass -use to wish */
28222823

2823-
baseName = strrchr(Py_GetProgramName(), '/');
2824-
if (baseName != NULL)
2825-
baseName++;
2826-
else
2827-
baseName = Py_GetProgramName();
28282824
className = "Tk";
28292825

28302826
if (!PyArg_ParseTuple(args, "|zssiiiiz:create",
@@ -2833,7 +2829,7 @@ Tkinter_Create(PyObject *self, PyObject *args)
28332829
&sync, &use))
28342830
return NULL;
28352831

2836-
return (PyObject *) Tkapp_New(screenName, baseName, className,
2832+
return (PyObject *) Tkapp_New(screenName, className,
28372833
interactive, wantobjects, wantTk,
28382834
sync, use);
28392835
}

0 commit comments

Comments
 (0)