diff options
author | Tal Einat <taleinat@gmail.com> | 2017-11-03 13:43:13 (GMT) |
---|---|---|
committer | Victor Stinner <victor.stinner@gmail.com> | 2017-11-03 13:43:13 (GMT) |
commit | f8b3f6b178e48773cd7298141cbaf408c6917e41 (patch) | |
tree | 8d19fc8ac85315173c01f8f674abcc168d90459c /Modules | |
parent | 019c99f325287741d1e0eefeef2b75c8e00b884f (diff) | |
download | cpython-f8b3f6b178e48773cd7298141cbaf408c6917e41.zip cpython-f8b3f6b178e48773cd7298141cbaf408c6917e41.tar.gz cpython-f8b3f6b178e48773cd7298141cbaf408c6917e41.tar.bz2 |
[3.6] bpo-31926: fix missing *_METHODDEF statements by argument clinic (GH-4230) (#4253)
When a single .c file contains several functions and/or methods with
the same name, a safety _METHODDEF GH-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..
(cherry picked from commit 4f57409a2f7bdf8fb559cddc7c6533ca2c471c67)
Diffstat (limited to 'Modules')
-rw-r--r-- | Modules/clinic/zlibmodule.c.h | 6 | ||||
-rw-r--r-- | Modules/zlibmodule.c | 4 |
2 files changed, 5 insertions, 5 deletions
diff --git a/Modules/clinic/zlibmodule.c.h b/Modules/clinic/zlibmodule.c.h index fda392a..7339596 100644 --- a/Modules/clinic/zlibmodule.c.h +++ b/Modules/clinic/zlibmodule.c.h @@ -467,4 +467,8 @@ exit: #ifndef ZLIB_COMPRESS_COPY_METHODDEF #define ZLIB_COMPRESS_COPY_METHODDEF #endif /* !defined(ZLIB_COMPRESS_COPY_METHODDEF) */ -/*[clinic end generated code: output=3a4e2bfe750423a3 input=a9049054013a1b77]*/ + +#ifndef ZLIB_DECOMPRESS_COPY_METHODDEF + #define ZLIB_DECOMPRESS_COPY_METHODDEF +#endif /* !defined(ZLIB_DECOMPRESS_COPY_METHODDEF) */ +/*[clinic end generated code: output=497dad1132c962e2 input=a9049054013a1b77]*/ diff --git a/Modules/zlibmodule.c b/Modules/zlibmodule.c index cfe7f88..29f55bd 100644 --- a/Modules/zlibmodule.c +++ b/Modules/zlibmodule.c @@ -1149,9 +1149,7 @@ static PyMethodDef comp_methods[] = { ZLIB_COMPRESS_COMPRESS_METHODDEF ZLIB_COMPRESS_FLUSH_METHODDEF -#ifdef HAVE_ZLIB_COPY ZLIB_COMPRESS_COPY_METHODDEF -#endif {NULL, NULL} }; @@ -1159,9 +1157,7 @@ static PyMethodDef Decomp_methods[] = { ZLIB_DECOMPRESS_DECOMPRESS_METHODDEF ZLIB_DECOMPRESS_FLUSH_METHODDEF -#ifdef HAVE_ZLIB_COPY ZLIB_DECOMPRESS_COPY_METHODDEF -#endif {NULL, NULL} }; |