]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
Issue #4279: Fix build of parsermodule under Cygwin.
authorMartin v. Löwis <martin@v.loewis.de>
Sun, 11 Jan 2009 09:26:54 +0000 (09:26 +0000)
committerMartin v. Löwis <martin@v.loewis.de>
Sun, 11 Jan 2009 09:26:54 +0000 (09:26 +0000)
Misc/NEWS
Parser/printgrammar.c
Python/graminit.c

index 969b770e096e21ac85aabd47fcfa5a9a1cc0b4d8..d5f5b21e81303547500c4686cc21410a151645d5 100644 (file)
--- 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.
index ec8f4daa4ef45e40e32e98242fdb9c31805434d5..ae180e11f2ea89bf67aed6214e13bbc63f6de5f2 100644 (file)
@@ -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");
index e65a992a648585fc43a64985f0d73e27c6eee7bb..ec2f4215f4caa091bbe18493e3caf291d03af439 100644 (file)
@@ -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},