]> granicus.if.org Git - python/commitdiff
Issue #14446: Remove deprecated tkinter functions: Delete an unused function to avoid...
authorJesus Cea <jcea@jcea.es>
Fri, 5 Oct 2012 02:02:41 +0000 (04:02 +0200)
committerJesus Cea <jcea@jcea.es>
Fri, 5 Oct 2012 02:02:41 +0000 (04:02 +0200)
Modules/_tkinter.c

index 2e9b6ded847ffa2a8a995442f0fa000815927273..761557fd3492ac5b5135eecd5cdd5082a687a36c 100644 (file)
@@ -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