@@ -1369,9 +1369,9 @@ typedef struct {
1369
1369
} ZlibDecompressor ;
1370
1370
1371
1371
/*[clinic input]
1372
- class zlib.ZlibDecompressor "ZlibDecompressor *" "&ZlibDecompressorType"
1372
+ class zlib._ZlibDecompressor "ZlibDecompressor *" "&ZlibDecompressorType"
1373
1373
[clinic start generated code]*/
1374
- /*[clinic end generated code: output=da39a3ee5e6b4b0d input=0658178ab94645df ]*/
1374
+ /*[clinic end generated code: output=da39a3ee5e6b4b0d input=49151d1d703e6bcc ]*/
1375
1375
1376
1376
static void
1377
1377
ZlibDecompressor_dealloc (PyObject * op )
@@ -1670,7 +1670,7 @@ decompress(ZlibDecompressor *self, uint8_t *data,
1670
1670
1671
1671
/*[clinic input]
1672
1672
@permit_long_docstring_body
1673
- zlib.ZlibDecompressor .decompress
1673
+ zlib._ZlibDecompressor .decompress
1674
1674
1675
1675
data: Py_buffer
1676
1676
max_length: Py_ssize_t=-1
@@ -1692,9 +1692,10 @@ the unused_data attribute.
1692
1692
[clinic start generated code]*/
1693
1693
1694
1694
static PyObject *
1695
- zlib_ZlibDecompressor_decompress_impl (ZlibDecompressor * self ,
1696
- Py_buffer * data , Py_ssize_t max_length )
1697
- /*[clinic end generated code: output=990d32787b775f85 input=fcf9f974de5d02b1]*/
1695
+ zlib__ZlibDecompressor_decompress_impl (ZlibDecompressor * self ,
1696
+ Py_buffer * data ,
1697
+ Py_ssize_t max_length )
1698
+ /*[clinic end generated code: output=ac00dcf73e843e99 input=c9278e791be1152b]*/
1698
1699
1699
1700
{
1700
1701
PyObject * result = NULL ;
@@ -1710,38 +1711,28 @@ zlib_ZlibDecompressor_decompress_impl(ZlibDecompressor *self,
1710
1711
return result ;
1711
1712
}
1712
1713
1713
- PyDoc_STRVAR ( ZlibDecompressor__new____doc__ ,
1714
- "_ZlibDecompressor(wbits=15, zdict=b\'\')\n"
1715
- "--\n"
1716
- "\n"
1717
- "Create a decompressor object for decompressing data incrementally.\n"
1718
- "\n"
1719
- " wbits = 15\n"
1720
- " zdict\n"
1721
- " The predefined compression dictionary. This is a sequence of bytes\n"
1722
- " (such as a bytes object) containing subsequences that are expected\n"
1723
- " to occur frequently in the data that is to be compressed. Those\n"
1724
- " subsequences that are expected to be most common should come at the\n"
1725
- " end of the dictionary. This must be the same dictionary as used by the\n"
1726
- " compressor that produced the input data.\n"
1727
- "\n" );
1714
+ /*[clinic input]
1715
+ @classmethod
1716
+ zlib._ZlibDecompressor.__new__
1717
+
1718
+ wbits: int(c_default='MAX_WBITS') = MAX_WBITS
1719
+ zdict: object(c_default='NULL') = b''
1720
+ The predefined compression dictionary. This is a sequence of bytes
1721
+ (such as a bytes object) containing subsequences that are expected
1722
+ to occur frequently in the data that is to be compressed. Those
1723
+ subsequences that are expected to be most common should come at the
1724
+ end of the dictionary. This must be the same dictionary as used by the
1725
+ compressor that produced the input data.
1726
+
1727
+ Create a decompressor object for decompressing data incrementally.
1728
+ [clinic start generated code]*/
1728
1729
1729
1730
static PyObject *
1730
- ZlibDecompressor__new__ (PyTypeObject * cls ,
1731
- PyObject * args ,
1732
- PyObject * kwargs )
1731
+ zlib__ZlibDecompressor_impl (PyTypeObject * type , int wbits , PyObject * zdict )
1732
+ /*[clinic end generated code: output=1065607df0d33baa input=9ebad0be6de226e2]*/
1733
1733
{
1734
- static char * keywords [] = {"wbits" , "zdict" , NULL };
1735
- static const char * const format = "|iO:_ZlibDecompressor" ;
1736
- int wbits = MAX_WBITS ;
1737
- PyObject * zdict = NULL ;
1738
- zlibstate * state = PyType_GetModuleState (cls );
1739
-
1740
- if (!PyArg_ParseTupleAndKeywords (
1741
- args , kwargs , format , keywords , & wbits , & zdict )) {
1742
- return NULL ;
1743
- }
1744
- ZlibDecompressor * self = PyObject_New (ZlibDecompressor , cls );
1734
+ zlibstate * state = PyType_GetModuleState (type );
1735
+ ZlibDecompressor * self = PyObject_New (ZlibDecompressor , type );
1745
1736
if (self == NULL ) {
1746
1737
return NULL ;
1747
1738
}
@@ -1817,7 +1808,7 @@ static PyMethodDef Decomp_methods[] =
1817
1808
};
1818
1809
1819
1810
static PyMethodDef ZlibDecompressor_methods [] = {
1820
- ZLIB_ZLIBDECOMPRESSOR_DECOMPRESS_METHODDEF
1811
+ ZLIB__ZLIBDECOMPRESSOR_DECOMPRESS_METHODDEF
1821
1812
{NULL }
1822
1813
};
1823
1814
@@ -2052,8 +2043,8 @@ static PyType_Spec Decomptype_spec = {
2052
2043
static PyType_Slot ZlibDecompressor_type_slots [] = {
2053
2044
{Py_tp_dealloc , ZlibDecompressor_dealloc },
2054
2045
{Py_tp_members , ZlibDecompressor_members },
2055
- {Py_tp_new , ZlibDecompressor__new__ },
2056
- {Py_tp_doc , (char * )ZlibDecompressor__new____doc__ },
2046
+ {Py_tp_new , zlib__ZlibDecompressor },
2047
+ {Py_tp_doc , (char * )zlib__ZlibDecompressor__doc__ },
2057
2048
{Py_tp_methods , ZlibDecompressor_methods },
2058
2049
{0 , 0 },
2059
2050
};
0 commit comments