Issue #19569: Compiler warnings are now emitted if use most of deprecated
functions.
diff --git a/Python/modsupport.c b/Python/modsupport.c
index aabee8f..35b529b 100644
--- a/Python/modsupport.c
+++ b/Python/modsupport.c
@@ -286,8 +286,8 @@
             }
             else {
                 if (n < 0)
-                    n = Py_UNICODE_strlen(u);
-                v = PyUnicode_FromUnicode(u, n);
+                    n = wcslen(u);
+                v = PyUnicode_FromWideChar(u, n);
             }
             return v;
         }