diff options
author | Jozef Grajciar <jozef.grajciar@gmail.com> | 2021-03-01 11:18:33 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-03-01 11:18:33 (GMT) |
commit | c994ffe69553cbb34f1cea6a4494d6e7657f41b0 (patch) | |
tree | 66506909999bd0a809879b9f6e940195216c7564 /Tools/peg_generator | |
parent | 0242494a156970186cbc4121ccf03aefbddea716 (diff) | |
download | cpython-c994ffe69553cbb34f1cea6a4494d6e7657f41b0.zip cpython-c994ffe69553cbb34f1cea6a4494d6e7657f41b0.tar.gz cpython-c994ffe69553cbb34f1cea6a4494d6e7657f41b0.tar.bz2 |
bpo-11717: fix ssize_t redefinition error when targeting 32bit Windows app (GH-24479)
Diffstat (limited to 'Tools/peg_generator')
-rw-r--r-- | Tools/peg_generator/pegen/c_generator.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Tools/peg_generator/pegen/c_generator.py b/Tools/peg_generator/pegen/c_generator.py index f5ef5d8..929ec4f 100644 --- a/Tools/peg_generator/pegen/c_generator.py +++ b/Tools/peg_generator/pegen/c_generator.py @@ -583,8 +583,8 @@ class CParserGenerator(ParserGenerator, GrammarVisitor): self.print("int _start_mark = p->mark;") self.print("void **_children = PyMem_Malloc(sizeof(void *));") self.out_of_memory_return(f"!_children") - self.print("ssize_t _children_capacity = 1;") - self.print("ssize_t _n = 0;") + self.print("Py_ssize_t _children_capacity = 1;") + self.print("Py_ssize_t _n = 0;") if any(alt.action and "EXTRA" in alt.action for alt in rhs.alts): self._set_up_token_start_metadata_extraction() self.visit( |