summaryrefslogtreecommitdiffstats
path: root/Modules
diff options
context:
space:
mode:
authorJesus Cea <jcea@jcea.es>2012-10-05 01:57:56 (GMT)
committerJesus Cea <jcea@jcea.es>2012-10-05 01:57:56 (GMT)
commitbf0f34421ca71be9eedafc9d288e2bc1623c41b3 (patch)
tree73b71694fb5866d734fb8161be274d71f852f4e3 /Modules
parentf01d695ccdf47855aa9b5f2185a8ce349ed004aa (diff)
downloadcpython-bf0f34421ca71be9eedafc9d288e2bc1623c41b3.zip
cpython-bf0f34421ca71be9eedafc9d288e2bc1623c41b3.tar.gz
cpython-bf0f34421ca71be9eedafc9d288e2bc1623c41b3.tar.bz2
Issue #14446: Remove deprecated tkinter functions: Delete an unused function to avoid a warning
Diffstat (limited to 'Modules')
-rw-r--r--Modules/_tkinter.c76
1 files changed, 0 insertions, 76 deletions
diff --git a/Modules/_tkinter.c b/Modules/_tkinter.c
index c39d73f..2e9b6de 100644
--- a/Modules/_tkinter.c
+++ b/Modules/_tkinter.c
@@ -356,82 +356,6 @@ AsString(PyObject *value, PyObject *tmp)
#define ARGSZ 64
-static char *
-Merge(PyObject *args)
-{
- PyObject *tmp = NULL;
- char *argvStore[ARGSZ];
- char **argv = NULL;
- int fvStore[ARGSZ];
- int *fv = NULL;
- int argc = 0, fvc = 0, i;
- char *res = NULL;
-
- if (!(tmp = PyList_New(0)))
- return NULL;
-
- argv = argvStore;
- fv = fvStore;
-
- if (args == NULL)
- argc = 0;
-
- else if (!PyTuple_Check(args)) {
- argc = 1;
- fv[0] = 0;
- if (!(argv[0] = AsString(args, tmp)))
- goto finally;
- }
- else {
- argc = PyTuple_Size(args);
-
- if (argc > ARGSZ) {
- argv = (char **)ckalloc(argc * sizeof(char *));
- fv = (int *)ckalloc(argc * sizeof(int));
- if (argv == NULL || fv == NULL) {
- PyErr_NoMemory();
- goto finally;
- }
- }
-
- for (i = 0; i < argc; i++) {
- PyObject *v = PyTuple_GetItem(args, i);
- if (PyTuple_Check(v)) {
- fv[i] = 1;
- if (!(argv[i] = Merge(v)))
- goto finally;
- fvc++;
- }
- else if (v == Py_None) {
- argc = i;
- break;
- }
- else {
- fv[i] = 0;
- if (!(argv[i] = AsString(v, tmp)))
- goto finally;
- fvc++;
- }
- }
- }
- res = Tcl_Merge(argc, argv);
- if (res == NULL)
- PyErr_SetString(Tkinter_TclError, "merge failed");
-
- finally:
- for (i = 0; i < fvc; i++)
- if (fv[i]) {
- ckfree(argv[i]);
- }
- if (argv != argvStore)
- ckfree(FREECAST argv);
- if (fv != fvStore)
- ckfree(FREECAST fv);
-
- Py_DECREF(tmp);
- return res;
-}
-
static PyObject *