Issue #21951: Fixed a crash in Tkinter on AIX when called Tcl command with
empty string or tuple argument.

On some platforms Tcl memory allocator returns NULL when allocating zero-sized
block of memory.
diff --git a/Modules/_tkinter.c b/Modules/_tkinter.c
index 7871dec..6d777d3 100644
--- a/Modules/_tkinter.c
+++ b/Modules/_tkinter.c
@@ -899,6 +899,8 @@
         Py_ssize_t size, i;
 
         size = PyTuple_Size(value);
+        if (size == 0)
+            return Tcl_NewListObj(0, NULL);
         if (!CHECK_SIZE(size, sizeof(Tcl_Obj *))) {
             PyErr_SetString(PyExc_OverflowError, "tuple is too long");
             return NULL;
@@ -925,6 +927,8 @@
 
         inbuf = PyUnicode_DATA(value);
         size = PyUnicode_GET_LENGTH(value);
+        if (size == 0)
+            return Tcl_NewUnicodeObj((const void *)"", 0);
         if (!CHECK_SIZE(size, sizeof(Tcl_UniChar))) {
             PyErr_SetString(PyExc_OverflowError, "string is too long");
             return NULL;