PyUnicode_AsWideCharString() takes a PyObject*, not a PyUnicodeObject*
All unicode functions uses PyObject* except PyUnicode_AsWideChar(). Fix the
prototype for the new function PyUnicode_AsWideCharString().
diff --git a/Modules/_testcapimodule.c b/Modules/_testcapimodule.c
index 912ba17..473d805 100644
--- a/Modules/_testcapimodule.c
+++ b/Modules/_testcapimodule.c
@@ -1426,7 +1426,7 @@
if (!PyArg_ParseTuple(args, "U", &unicode))
return NULL;
- buffer = PyUnicode_AsWideCharString((PyUnicodeObject*)unicode, &size);
+ buffer = PyUnicode_AsWideCharString(unicode, &size);
if (buffer == NULL)
return NULL;