Issue #14446: Remove deprecated tkinter functions: Delete an unused function to avoid a warning
This commit is contained in:
parent
bf0f34421c
commit
6efe9dff14
|
@ -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
|
||||
|
||||
|
|
Loading…
Reference in New Issue