8000 [3.6] bpo-31926: fix missing *_METHODDEF statements by argument clinic (GH-4230) by taleinat · Pull Request #4253 · python/cpython · GitHub
[go: up one dir, main page]

Skip to content

[3.6] bpo-31926: fix missing *_METHODDEF statements by argument clinic (GH-4230) #4253

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Nov 3, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
8000
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
Fixed Argument Clinic sometimes causing compilation errors when there was
more than one function and/or method in a .c file with the same name.
6 changes: 5 additions & 1 deletion Modules/clinic/zlibmodule.c.h
Original file line number Diff line number Diff line change
Expand Up @@ -467,4 +467,8 @@ zlib_crc32(PyObject *module, PyObject *args)
#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]*/
4 changes: 0 additions & 4 deletions Modules/zlibmodule.c
Original file line number Diff line number Diff line change
Expand Up @@ -1149,19 +1149,15 @@ static PyMethodDef comp_methods[] =
{
ZLIB_COMPRESS_COMPRESS_METHODDEF
ZLIB_COMPRESS_FLUSH_METHODDEF
#ifdef HAVE_ZLIB_COPY
ZLIB_COMPRESS_COPY_METHODDEF
#endif
{NULL, NULL}
};

static PyMethodDef Decomp_methods[] =
{
ZLIB_DECOMPRESS_DECOMPRESS_METHODDEF
ZLIB_DECOMPRESS_FLUSH_METHODDEF
#ifdef HAVE_ZLIB_COPY
ZLIB_DECOMPRESS_COPY_METHODDEF
#endif
{NULL, NULL}
};

Expand Down
4 changes: 2 additions & 2 deletions Tools/clinic/clinic.py
Original file line number Diff line number Diff line change
Expand Up @@ -928,8 +928,8 @@ def insert_keywords(s):
cpp_if = "#if " + conditional
cpp_endif = "#endif /* " + conditional + " */"

if methoddef_define and f.name not in clinic.ifndef_symbols:
clinic.ifndef_symbols.add(f.name)
if methoddef_define and f.full_name not in clinic.ifndef_symbols:
clinic.ifndef_symbols.add(f.full_name)
methoddef_ifndef = normalize_snippet("""
#ifndef {methoddef_name}
#define {methoddef_name}
Expand Down
0