[Python-checkins] cpython: Issue #14446: Remove deprecated tkinter functions: Delete an unused function to

jesus.cea python-checkins at python.org
Fri Oct 5 04:03:15 CEST 2012


http://hg.python.org/cpython/rev/e278f3ab0190
changeset:   79484:e278f3ab0190
user:        Jesus Cea <jcea at jcea.es>
date:        Fri Oct 05 04:02:41 2012 +0200
summary:
  Issue #14446: Remove deprecated tkinter functions: Delete an unused function to avoid a warning

files:
  Modules/_tkinter.c |  30 ------------------------------
  1 files changed, 0 insertions(+), 30 deletions(-)


diff --git a/Modules/_tkinter.c b/Modules/_tkinter.c
--- a/Modules/_tkinter.c
+++ b/Modules/_tkinter.c
@@ -323,36 +323,6 @@
 #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
 

-- 
Repository URL: http://hg.python.org/cpython


More information about the Python-checkins mailing list