From: Martin v. Löwis Date: Sun, 11 Jan 2009 09:26:54 +0000 (+0000) Subject: Issue #4279: Fix build of parsermodule under Cygwin. X-Git-Tag: v2.7a1~2326 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b3b7d859b3c282ee3b573899ba831852642bb18d;p=thirdparty%2FPython%2Fcpython.git Issue #4279: Fix build of parsermodule under Cygwin. --- diff --git a/Misc/NEWS b/Misc/NEWS index 969b770e096e..d5f5b21e8130 100644 --- a/Misc/NEWS +++ b/Misc/NEWS @@ -331,6 +331,8 @@ C-API Extension Modules ----------------- +- Issue #4279: Fix build of parsermodule under Cygwin. + - Issue #4051: Prevent conflict of UNICODE macros in cPickle. - Issue #4228: Pack negative values the same way as 2.4 in struct's L format. diff --git a/Parser/printgrammar.c b/Parser/printgrammar.c index ec8f4daa4ef4..ae180e11f2ea 100644 --- a/Parser/printgrammar.c +++ b/Parser/printgrammar.c @@ -16,6 +16,7 @@ printgrammar(grammar *g, FILE *fp) fprintf(fp, "/* Generated by Parser/pgen */\n\n"); fprintf(fp, "#include \"pgenheaders.h\"\n"); fprintf(fp, "#include \"grammar.h\"\n"); + fprintf(fp, "PyAPI_DATA(grammar) _PyParser_Grammar;\n"); printdfas(g, fp); printlabels(g, fp); fprintf(fp, "grammar _PyParser_Grammar = {\n"); diff --git a/Python/graminit.c b/Python/graminit.c index e65a992a6485..ec2f4215f4ca 100644 --- a/Python/graminit.c +++ b/Python/graminit.c @@ -2,6 +2,7 @@ #include "pgenheaders.h" #include "grammar.h" +PyAPI_DATA(grammar) _PyParser_Grammar; static arc arcs_0_0[3] = { {2, 1}, {3, 1},