Backport METH_FASTCALL from Python 3.7 (#328)

This commit is contained in:
Gautham 2022-05-12 14:57:16 +05:30 committed by GitHub
parent 70c97f598b
commit cf73bbd678
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
102 changed files with 2896 additions and 3301 deletions

View file

@ -364,7 +364,7 @@ PyFile_NewStdPrinter(int fd)
}
static PyObject *
stdprinter_write(PyStdPrinter_Object *self, PyObject **args, Py_ssize_t nargs, PyObject *kwnames)
stdprinter_write(PyStdPrinter_Object *self, PyObject **args, Py_ssize_t nargs)
{
PyObject *unicode;
PyObject *bytes = NULL;
@ -383,9 +383,6 @@ stdprinter_write(PyStdPrinter_Object *self, PyObject **args, Py_ssize_t nargs, P
if (!_PyArg_UnpackStack(args, nargs, "write", 1, 1, &unicode))
return NULL;
if(!_PyArg_NoStackKeywords("write", kwnames))
return NULL;
/* encode Unicode to UTF-8 */
str = PyUnicode_AsUTF8AndSize(unicode, &n);
if (str == NULL) {