Issue #22156: Fix "comparison between signed and unsigned integers" compiler
warnings in the Python/ subdirectory.
diff --git a/Python/bltinmodule.c b/Python/bltinmodule.c
index d905ba2..d2d1698 100644
--- a/Python/bltinmodule.c
+++ b/Python/bltinmodule.c
@@ -581,7 +581,7 @@
         return NULL;
     }
 
-    if (strlen(str) != size) {
+    if (strlen(str) != (size_t)size) {
         PyErr_SetString(PyExc_TypeError,
                         "source code string cannot contain null bytes");
         return NULL;
diff --git a/Python/getargs.c b/Python/getargs.c
index 946faf2..a313269 100644
--- a/Python/getargs.c
+++ b/Python/getargs.c
@@ -872,7 +872,7 @@
             STORE_SIZE(count);
             format++;
         } else {
-            if (strlen(*p) != count)
+            if (strlen(*p) != (size_t)count)
                 return converterr(
                     "bytes without null bytes",
                     arg, msgbuf, bufsize);
@@ -994,7 +994,7 @@
                 *p = PyUnicode_AsUnicodeAndSize(arg, &len);
                 if (*p == NULL)
                     RETURN_ERR_OCCURRED;
-                if (Py_UNICODE_strlen(*p) != len)
+                if (Py_UNICODE_strlen(*p) != (size_t)len)
                     return converterr(
                         "str without null characters or None",
                         arg, msgbuf, bufsize);
diff --git a/Python/pythonrun.c b/Python/pythonrun.c
index b2d5464..63d9eeb 100644
--- a/Python/pythonrun.c
+++ b/Python/pythonrun.c
@@ -1738,7 +1738,7 @@
         return;
 
     if (offset >= 0) {
-        if (offset > 0 && offset == strlen(text) && text[offset - 1] == '\n')
+        if (offset > 0 && (size_t)offset == strlen(text) && text[offset - 1] == '\n')
             offset--;
         for (;;) {
             nl = strchr(text, '\n');
diff --git a/Python/thread.c b/Python/thread.c
index d1cb0e6..9eb5d12 100644
--- a/Python/thread.c
+++ b/Python/thread.c
@@ -431,7 +431,7 @@
      && defined(_CS_GNU_LIBPTHREAD_VERSION))
     value = NULL;
     len = confstr(_CS_GNU_LIBPTHREAD_VERSION, buffer, sizeof(buffer));
-    if (1 < len && len < sizeof(buffer)) {
+    if (1 < len && (size_t)len < sizeof(buffer)) {
         value = PyUnicode_DecodeFSDefaultAndSize(buffer, len-1);
         if (value == NULL)
             PyErr_Clear();
diff --git a/Python/traceback.c b/Python/traceback.c
index 2ece192..565094b 100644
--- a/Python/traceback.c
+++ b/Python/traceback.c
@@ -198,7 +198,7 @@
         }
         strcpy(namebuf, PyBytes_AS_STRING(path));
         Py_DECREF(path);
-        if (strlen(namebuf) != len)
+        if (strlen(namebuf) != (size_t)len)
             continue; /* v contains '\0' */
         if (len > 0 && namebuf[len-1] != SEP)
             namebuf[len++] = SEP;