From: Jesus Cea Date: Fri, 5 Oct 2012 02:02:41 +0000 (+0200) Subject: Issue #14446: Remove deprecated tkinter functions: Delete an unused function to avoid... X-Git-Tag: v3.4.0a1~2362 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=6efe9dff14857770a6436c0ea83029f570692131;p=python Issue #14446: Remove deprecated tkinter functions: Delete an unused function to avoid a warning --- diff --git a/Modules/_tkinter.c b/Modules/_tkinter.c index 2e9b6ded84..761557fd34 100644 --- a/Modules/_tkinter.c +++ b/Modules/_tkinter.c @@ -323,36 +323,6 @@ WaitForMainloop(TkappObject* self) #endif /* WITH_THREAD */ -static char * -AsString(PyObject *value, PyObject *tmp) -{ - if (PyBytes_Check(value)) - return PyBytes_AsString(value); - else if (PyUnicode_Check(value)) { - PyObject *v = PyUnicode_AsUTF8String(value); - if (v == NULL) - return NULL; - if (PyList_Append(tmp, v) != 0) { - Py_DECREF(v); - return NULL; - } - Py_DECREF(v); - return PyBytes_AsString(v); - } - else { - PyObject *v = PyObject_Str(value); - if (v == NULL) - return NULL; - if (PyList_Append(tmp, v) != 0) { - Py_DECREF(v); - return NULL; - } - Py_DECREF(v); - return PyBytes_AsString(v); - } -} - - #define ARGSZ 64