mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-06-27 23:08:31 +00:00
Revert "Backport METH_FASTCALL from Python 3.7 (#328)"
This reverts commit cf73bbd678
.
This commit is contained in:
parent
e7611a8476
commit
2ea1dc405c
102 changed files with 3299 additions and 2894 deletions
36
third_party/python/Modules/clinic/zlibmodule.inc
vendored
36
third_party/python/Modules/clinic/zlibmodule.inc
vendored
|
@ -15,7 +15,7 @@ PyDoc_STRVAR(zlib_compress__doc__,
|
|||
" Compression level, in 0-9 or -1.");
|
||||
|
||||
#define ZLIB_COMPRESS_METHODDEF \
|
||||
{"compress", (PyCFunction)zlib_compress, METH_FASTCALL|METH_KEYWORDS, zlib_compress__doc__},
|
||||
{"compress", (PyCFunction)zlib_compress, METH_FASTCALL, zlib_compress__doc__},
|
||||
|
||||
static PyObject *
|
||||
zlib_compress_impl(PyObject *module, Py_buffer *data, int level);
|
||||
|
@ -58,7 +58,7 @@ PyDoc_STRVAR(zlib_decompress__doc__,
|
|||
" The initial output buffer size.");
|
||||
|
||||
#define ZLIB_DECOMPRESS_METHODDEF \
|
||||
{"decompress", (PyCFunction)zlib_decompress, METH_FASTCALL|METH_KEYWORDS, zlib_decompress__doc__},
|
||||
{"decompress", (PyCFunction)zlib_decompress, METH_FASTCALL, zlib_decompress__doc__},
|
||||
|
||||
static PyObject *
|
||||
zlib_decompress_impl(PyObject *module, Py_buffer *data, int wbits,
|
||||
|
@ -121,7 +121,7 @@ PyDoc_STRVAR(zlib_compressobj__doc__,
|
|||
" containing subsequences that are likely to occur in the input data.");
|
||||
|
||||
#define ZLIB_COMPRESSOBJ_METHODDEF \
|
||||
{"compressobj", (PyCFunction)zlib_compressobj, METH_FASTCALL|METH_KEYWORDS, zlib_compressobj__doc__},
|
||||
{"compressobj", (PyCFunction)zlib_compressobj, METH_FASTCALL, zlib_compressobj__doc__},
|
||||
|
||||
static PyObject *
|
||||
zlib_compressobj_impl(PyObject *module, int level, int method, int wbits,
|
||||
|
@ -168,7 +168,7 @@ PyDoc_STRVAR(zlib_decompressobj__doc__,
|
|||
" dictionary as used by the compressor that produced the input data.");
|
||||
|
||||
#define ZLIB_DECOMPRESSOBJ_METHODDEF \
|
||||
{"decompressobj", (PyCFunction)zlib_decompressobj, METH_FASTCALL|METH_KEYWORDS, zlib_decompressobj__doc__},
|
||||
{"decompressobj", (PyCFunction)zlib_decompressobj, METH_FASTCALL, zlib_decompressobj__doc__},
|
||||
|
||||
static PyObject *
|
||||
zlib_decompressobj_impl(PyObject *module, int wbits, PyObject *zdict);
|
||||
|
@ -249,7 +249,7 @@ PyDoc_STRVAR(zlib_Decompress_decompress__doc__,
|
|||
"Call the flush() method to clear these buffers.");
|
||||
|
||||
#define ZLIB_DECOMPRESS_DECOMPRESS_METHODDEF \
|
||||
{"decompress", (PyCFunction)zlib_Decompress_decompress, METH_FASTCALL|METH_KEYWORDS, zlib_Decompress_decompress__doc__},
|
||||
{"decompress", (PyCFunction)zlib_Decompress_decompress, METH_FASTCALL, zlib_Decompress_decompress__doc__},
|
||||
|
||||
static PyObject *
|
||||
zlib_Decompress_decompress_impl(compobject *self, Py_buffer *data,
|
||||
|
@ -298,7 +298,7 @@ static PyObject *
|
|||
zlib_Compress_flush_impl(compobject *self, int mode);
|
||||
|
||||
static PyObject *
|
||||
zlib_Compress_flush(compobject *self, PyObject **args, Py_ssize_t nargs)
|
||||
zlib_Compress_flush(compobject *self, PyObject **args, Py_ssize_t nargs, PyObject *kwnames)
|
||||
{
|
||||
PyObject *return_value = NULL;
|
||||
int mode = Z_FINISH;
|
||||
|
@ -307,6 +307,10 @@ zlib_Compress_flush(compobject *self, PyObject **args, Py_ssize_t nargs)
|
|||
&mode)) {
|
||||
goto exit;
|
||||
}
|
||||
|
||||
if (!_PyArg_NoStackKeywords("flush", kwnames)) {
|
||||
goto exit;
|
||||
}
|
||||
return_value = zlib_Compress_flush_impl(self, mode);
|
||||
|
||||
exit:
|
||||
|
@ -373,7 +377,7 @@ static PyObject *
|
|||
zlib_Decompress_flush_impl(compobject *self, Py_ssize_t length);
|
||||
|
||||
static PyObject *
|
||||
zlib_Decompress_flush(compobject *self, PyObject **args, Py_ssize_t nargs)
|
||||
zlib_Decompress_flush(compobject *self, PyObject **args, Py_ssize_t nargs, PyObject *kwnames)
|
||||
{
|
||||
PyObject *return_value = NULL;
|
||||
Py_ssize_t length = DEF_BUF_SIZE;
|
||||
|
@ -382,6 +386,10 @@ zlib_Decompress_flush(compobject *self, PyObject **args, Py_ssize_t nargs)
|
|||
ssize_t_converter, &length)) {
|
||||
goto exit;
|
||||
}
|
||||
|
||||
if (!_PyArg_NoStackKeywords("flush", kwnames)) {
|
||||
goto exit;
|
||||
}
|
||||
return_value = zlib_Decompress_flush_impl(self, length);
|
||||
|
||||
exit:
|
||||
|
@ -406,7 +414,7 @@ static PyObject *
|
|||
zlib_adler32_impl(PyObject *module, Py_buffer *data, unsigned int value);
|
||||
|
||||
static PyObject *
|
||||
zlib_adler32(PyObject *module, PyObject **args, Py_ssize_t nargs)
|
||||
zlib_adler32(PyObject *module, PyObject **args, Py_ssize_t nargs, PyObject *kwnames)
|
||||
{
|
||||
PyObject *return_value = NULL;
|
||||
Py_buffer data = {NULL, NULL};
|
||||
|
@ -416,6 +424,10 @@ zlib_adler32(PyObject *module, PyObject **args, Py_ssize_t nargs)
|
|||
&data, &value)) {
|
||||
goto exit;
|
||||
}
|
||||
|
||||
if (!_PyArg_NoStackKeywords("adler32", kwnames)) {
|
||||
goto exit;
|
||||
}
|
||||
return_value = zlib_adler32_impl(module, &data, value);
|
||||
|
||||
exit:
|
||||
|
@ -445,7 +457,7 @@ static PyObject *
|
|||
zlib_crc32_impl(PyObject *module, Py_buffer *data, unsigned int value);
|
||||
|
||||
static PyObject *
|
||||
zlib_crc32(PyObject *module, PyObject **args, Py_ssize_t nargs)
|
||||
zlib_crc32(PyObject *module, PyObject **args, Py_ssize_t nargs, PyObject *kwnames)
|
||||
{
|
||||
PyObject *return_value = NULL;
|
||||
Py_buffer data = {NULL, NULL};
|
||||
|
@ -455,6 +467,10 @@ zlib_crc32(PyObject *module, PyObject **args, Py_ssize_t nargs)
|
|||
&data, &value)) {
|
||||
goto exit;
|
||||
}
|
||||
|
||||
if (!_PyArg_NoStackKeywords("crc32", kwnames)) {
|
||||
goto exit;
|
||||
}
|
||||
return_value = zlib_crc32_impl(module, &data, value);
|
||||
|
||||
exit:
|
||||
|
@ -469,4 +485,4 @@ exit:
|
|||
#ifndef ZLIB_COMPRESS_COPY_METHODDEF
|
||||
#define ZLIB_COMPRESS_COPY_METHODDEF
|
||||
#endif /* !defined(ZLIB_COMPRESS_COPY_METHODDEF) */
|
||||
/*[clinic end generated code: output=9fb104ee528088ee input=a9049054013a1b77]*/
|
||||
/*[clinic end generated code: output=c6cb10ed66f226b2 input=a9049054013a1b77]*/
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue