summaryrefslogtreecommitdiffstats
path: root/Modules/clinic/zlibmodule.c.h
Commit message (Collapse)AuthorAgeFilesLines
* gh-90928: Improve static initialization of keywords tuple in AC (#95907)Erlend E. Aasland2022-08-131-221/+61
|
* gh-90928: Statically Initialize the Keywords Tuple in Clinic-Generated Code ↵Eric Snow2022-08-111-11/+347
| | | | | | | | | | | | | | | | (gh-95860) We only statically initialize for core code and builtin modules. Extension modules still create the tuple at runtime. We'll solve that part of interpreter isolation separately. This change includes generated code. The non-generated changes are in: * Tools/clinic/clinic.py * Python/getargs.c * Include/cpython/modsupport.h * Makefile.pre.in (re-generate global strings after running clinic) * very minor tweaks to Modules/_codecsmodule.c and Python/Python-tokenize.c All other changes are generated code (clinic, global strings).
* gh-91320: Argument Clinic uses _PyCFunction_CAST() (#32210)Victor Stinner2022-05-031-17/+17
| | | | Replace "(PyCFunction)(void(*)(void))func" cast with _PyCFunction_CAST(func).
* gh-91583: AC: Fix regression for functions with defining_class (GH-91739)Serhiy Storchaka2022-04-301-63/+98
| | | | | Argument Clinic now generates the same efficient code as before adding the defining_class parameter.
* bpo-38256: Fix binascii.crc32() when inputs are 4+GiB (GH-32000)Gregory P. Smith2022-03-201-3/+8
| | | | | | | When compiled with `USE_ZLIB_CRC32` defined (`configure` sets this on POSIX systems), `binascii.crc32(...)` failed to compute the correct value when the input data was >= 4GiB. Because the zlib crc32 API is limited to a 32-bit length. This lines it up with the `zlib.crc32(...)` implementation that doesn't have that flaw. **Performance:** This also adopts the same GIL releasing for larger inputs logic that `zlib.crc32` has, and causes the Windows build to always use zlib's crc32 instead of our slow C code as zlib is a required build dependency on Windows.
* bpo-43613: Faster implementation of gzip.compress and gzip.decompress (GH-27941)Ruben Vorderman2021-09-021-10/+22
| | | Co-authored-by: Łukasz Langa <lukasz@langa.pl>
* bpo-1635741 port zlib module to multi-phase init (GH-21995)Mohamed Koubaa2020-09-071-95/+141
| | | Port the zlib extension module to multi-phase initialization (PEP 489).
* bpo-40792: Make the result of PyNumber_Index() always having exact type int. ↵Serhiy Storchaka2020-05-281-4/+4
| | | | | | | | | | | | (GH-20443) Previously, the result could have been an instance of a subclass of int. Also revert bpo-26202 and make attributes start, stop and step of the range object having exact type int. Add private function _PyNumber_Index() which preserves the old behavior of PyNumber_Index() for performance to use it in the conversion functions like PyLong_AsLong().
* bpo-37999: No longer use __int__ in implicit integer conversions. (GH-15636)Serhiy Storchaka2020-05-261-62/+34
| | | | Only __index__ should be used to make integer conversions lossless.
* bpo-37034: Display argument name on errors with keyword arguments with ↵Rémi Lapeyre2019-08-291-8/+8
| | | | Argument Clinic. (GH-13593)
* bpo-36127: Argument Clinic: inline parsing code for keyword parameters. ↵Serhiy Storchaka2019-03-141-16/+188
| | | | (GH-12058)
* bpo-35582: Argument Clinic: inline parsing code for positional parameters. ↵Serhiy Storchaka2019-01-111-10/+66
| | | | (GH-11313)
* bpo-23867: Argument Clinic: inline parsing code for a single positional ↵Serhiy Storchaka2018-12-251-2/+6
| | | | parameter. (GH-9689)
* bpo-33012: Fix invalid function cast warnings with gcc 8 in Argument Clinic. ↵Serhiy Storchaka2018-11-271-10/+10
| | | | | | | | (GH-6748) Fix invalid function cast warnings with gcc 8 for method conventions different from METH_NOARGS, METH_O and METH_VARARGS in Argument Clinic generated code.
* bpo-25007: Add copy protocol support to zlib compressors and decompressors ↵Zackery Spytz2018-06-271-1/+83
| | | | (GH-7940)
* bpo-32240: Add the const qualifier to declarations of PyObject* array ↵Serhiy Storchaka2017-12-151-10/+10
| | | | arguments. (#4746)
* bpo-31926: fix missing *_METHODDEF statements by argument clinic (#4230)Tal Einat2017-11-031-1/+5
| | | | | | | | | When a single .c file contains several functions and/or methods with the same name, a safety _METHODDEF #define statement is generated only for one of them. This fixes the bug by using the full name of the function to avoid duplicates rather than just the name.
* bpo-29464: Rename METH_FASTCALL to METH_FASTCALL|METH_KEYWORDS and make (#1955)Serhiy Storchaka2017-07-031-26/+10
| | | | | the bare METH_FASTCALL be used for functions with positional-only parameters.
* bpo-30600: Fix error messages (condition order in Argument Clinic) (#2051)Sylvain2017-06-101-13/+13
| | | | | | | | The function '_PyArg_ParseStack()' and '_PyArg_UnpackStack' were failing (with error "XXX() takes Y argument (Z given)") before the function '_PyArg_NoStackKeywords()' was called. Thus, the latter did not raise its more meaningful error : "XXX() takes no keyword arguments".
* Run Argument Clinic: METH_VARARGS=>METH_FASTCALLVictor Stinner2017-01-171-13/+29
| | | | | Issue #29286. Run Argument Clinic to get the new faster METH_FASTCALL calling convention for functions using only positional arguments.
* Rename _PyArg_ParseStack to _PyArg_ParseStackAndKeywordsVictor Stinner2017-01-171-5/+5
| | | | Issue #29286.
* Issue #27810: Rerun Argument Clinic on all modulesVictor Stinner2016-09-101-16/+16
|
* Issue #16764: Support keyword arguments to zlib.decompress(). Patch bySerhiy Storchaka2016-08-151-9/+13
| | | | Xiang Zhang.
* Issue #27574: Decreased an overhead of parsing keyword arguments in functionsSerhiy Storchaka2016-08-141-7/+10
| | | | implemented with using Argument Clinic.
* Issue #27130: Merge zlib 64-bit fixes from 3.5Martin Panter2016-07-231-10/+10
|\
| * Issue #27130: Fix handling of buffers exceeding UINT_MAX in “zlib” moduleMartin Panter2016-07-231-10/+10
| | | | | | | | Patch by Xiang Zhang.
* | - Issue #27332: Fixed the type of the first argument of module-level functionsSerhiy Storchaka2016-07-071-13/+13
|\ \ | |/ | | | | generated by Argument Clinic. Patch by Petr Viktorin.
| * Issue #27332: Fixed the type of the first argument of module-level functionsSerhiy Storchaka2016-07-071-13/+13
| | | | | | | | generated by Argument Clinic. Patch by Petr Viktorin.
* | Issue #26243: Only the level argument to zlib.compress() is keyword argumentSerhiy Storchaka2016-06-251-3/+3
| | | | | | | | now. The first argument is positional-only.
* | Issue #26305: Argument Clinic now uses braces in C code as required by PEP 7.Serhiy Storchaka2016-06-091-18/+35
| |
* | Issue #5784: Merge zlib from 3.5Martin Panter2016-05-271-4/+7
|\ \ | |/
| * Issue #5784: Expand documentation and tests for zlib wbits parameterMartin Panter2016-05-271-4/+7
| | | | | | | | Based on documentation by AM Kuchling.
* | Issue 26243: Forgot to update zlib doc strings in Argument ClinicMartin Panter2016-02-101-2/+2
| |
* | Issue #26243: zlib.compress() keyword argument support by Aviv PalivodaMartin Panter2016-02-101-13/+14
|/
* Issue #26244: Clarify default zlib compression level in documentationMartin Panter2016-02-031-3/+4
| | | | Based on patch by Aviv Palivoda.
* Issue #25626: Change zlib to accept Py_ssize_t and cap to UINT_MAXMartin Panter2015-11-201-4/+4
| | | | | | | | | | | | | | The underlying zlib library stores sizes in “unsigned int”. The corresponding Python parameters are all sizes of buffers filled in by zlib, so it is okay to reduce higher values to the UINT_MAX internal cap. OverflowError is still raised for sizes that do not fit in Py_ssize_t. Sizes are now limited to Py_ssize_t rather than unsigned long, because Python byte strings cannot be larger than Py_ssize_t. Previously this could result in a SystemError on 32-bit platforms. This resolves a regression in the gzip module when reading more than UINT_MAX or LONG_MAX bytes in one call, introduced by revision 62723172412c.
* Issue #24007: Argument Clinic now writes the format of PyArg_Parse*() at theSerhiy Storchaka2015-04-231-22/+11
| | | | same line as function name.
* Issue #23944: Argument Clinic now wraps long impl prototypes at column 78.Larry Hastings2015-04-141-4/+7
|
* Issue #23492: Argument Clinic now generates argument parsing code withSerhiy Storchaka2015-04-031-4/+4
| | | | PyArg_Parse instead of PyArg_ParseTuple if possible.
* Issue #23500: Argument Clinic is now smarter about generating the "#ifndef"Larry Hastings2015-04-031-9/+5
| | | | | | (empty) definition of the methoddef macro: it's only generated once, even if Argument Clinic processes the same symbol multiple times, and it's emitted at the end of all processing rather than immediately after the first use.
* Issue #20530: Argument Clinic's signature format has been revised again.Larry Hastings2014-02-091-13/+39
| | | | | | | The new syntax is highly human readable while still preventing false positives. The syntax also extends Python syntax to denote "self" and positional-only parameters, allowing inspect.Signature objects to be totally accurate for all supported builtins in Python 3.4.
* Issue #20489: Explicitly qualified expressions for default values in methods.Serhiy Storchaka2014-02-051-3/+3
|
* #Issue 20456: Several improvements and bugfixes for Argument Clinic,Larry Hastings2014-02-011-1/+17
| | | | | including correctly generating code for Clinic blocks inside C preprocessor conditional blocks.
* Issue #20326: Argument Clinic now uses a simple, unique signature toLarry Hastings2014-01-281-13/+13
| | | | | | | | | | annotate text signatures in docstrings, resulting in fewer false positives. "self" parameters are also explicitly marked, allowing inspect.Signature() to authoritatively detect (and skip) said parameters. Issue #20326: Argument Clinic now generates separate checksums for the input and output sections of the block, allowing external tools to verify that the input has not changed (and thus the output is not out-of-date).
* Issue #20193: The zlib module now uses Argument Clinic.Serhiy Storchaka2014-01-261-0/+411