Skip to content

Commit

Permalink
Fix compilation on Windows.
Browse files Browse the repository at this point in the history
  • Loading branch information
serhiy-storchaka committed Aug 20, 2024
1 parent a9396c4 commit 6d9ee48
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions Modules/clinic/_testclinic.c.h

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions Tools/clinic/libclinic/parse_args.py
Original file line number Diff line number Diff line change
Expand Up @@ -657,7 +657,7 @@ def parse_general(self, clang: CLanguage) -> None:
self.flags = "METH_FASTCALL|METH_KEYWORDS"
self.parser_prototype = PARSER_PROTOTYPE_FASTCALL_KEYWORDS
self.declarations = declare_parser(self.func, codegen=self.codegen)
self.declarations += "\nPyObject *argsbuf[%s];" % len(self.converters)
self.declarations += "\nPyObject *argsbuf[%s];" % (len(self.converters) or 1)
if self.varpos:
self.declarations += "\nPyObject * const *fastargs;"
argsname = 'fastargs'
Expand All @@ -675,7 +675,7 @@ def parse_general(self, clang: CLanguage) -> None:
argsname = 'fastargs'
argname_fmt = 'fastargs[%d]'
self.declarations = declare_parser(self.func, codegen=self.codegen)
self.declarations += "\nPyObject *argsbuf[%s];" % len(self.converters)
self.declarations += "\nPyObject *argsbuf[%s];" % (len(self.converters) or 1)
self.declarations += "\nPyObject * const *fastargs;"
self.declarations += "\nPy_ssize_t nargs = PyTuple_GET_SIZE(args);"
if has_optional_kw:
Expand Down

0 comments on commit 6d9ee48

Please sign in to comment.