python-clinic / Modules / zlibmodule_clinic.c

Full commit

"zlib.decompress(data[, max_length=0])\n"
"  data\n"
"      The binary data to decompress.\n"
"  max_length\n"
"      The maximum allowable length of the decompressed data.\n"
"      Unconsumed input data will be stored in\n"
"      the unconsumed_tail attribute.\n"
"Return a string containing the decompressed version of the data.\n"
"After calling this function, some of the input data may still be stored in\n"
"internal buffers for later processing.\n"
"Call the flush() method to clear these buffers.\n");

    {"decompress", (PyCFunction)zlib_decompress, METH_VARARGS | METH_KEYWORDS, zlib_decompress__doc__}

static PyObject *
zlib_decompress_impl(PyObject *self, Py_buffer data, int max_length);

static PyObject *
zlib_decompress(PyObject *self, PyObject *args, PyObject *kwargs)
    PyObject *_return_value;
    Py_buffer data;
    int max_length = 0;
    static char *_keywords[] = {"data", "max_length", NULL};

    if (!PyArg_ParseTupleAndKeywords(args, kwargs,
        "y*|i:decompress", _keywords,
        &data, &max_length))
        return NULL;

    _return_value = zlib_decompress_impl(self, data, max_length);
    return _return_value;