Skip to content

Commit 00ada66

Browse files
committed
GNU C extension to allow empty __VA_ARGS__
1 parent 4741dde commit 00ada66

File tree

1 file changed

+4
-4
lines changed
  • graalpython/com.oracle.graal.python.cext/include

1 file changed

+4
-4
lines changed

graalpython/com.oracle.graal.python.cext/include/Python.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -156,11 +156,11 @@
156156
extern int _PyArg_ParseTupleAndKeywords_SizeT(PyObject *argv, PyObject *kwds, const char *format, char** kwdnames, ...);
157157

158158
// we use defines for these so we don't need to call with va_list
159-
#define _PyArg_Parse_SizeT(ARGV, FORMAT, ...) PyArg_ParseTupleAndKeywords(ARGV, PyDict_New(), FORMAT, NULL, __VA_ARGS__)
160-
#define _PyArg_ParseTuple_SizeT(ARGV, FORMAT, ...) PyArg_ParseTupleAndKeywords(ARGV, PyDict_New(), FORMAT, NULL, __VA_ARGS__)
161-
#define _PyArg_ParseTupleAndKeywordsFast_SizeT(ARGS, KWARGS, PARSER, ...) PyArg_ParseTupleAndKeywords(ARGS, KWARGS, (PARSER)->format, (PARSER)->keywords, __VA_ARGS__)
159+
#define _PyArg_Parse_SizeT(ARGV, FORMAT, ...) PyArg_ParseTupleAndKeywords(ARGV, PyDict_New(), FORMAT, NULL, ##__VA_ARGS__)
160+
#define _PyArg_ParseTuple_SizeT(ARGV, FORMAT, ...) PyArg_ParseTupleAndKeywords(ARGV, PyDict_New(), FORMAT, NULL, ##__VA_ARGS__)
161+
#define _PyArg_ParseTupleAndKeywordsFast_SizeT(ARGS, KWARGS, PARSER, ...) PyArg_ParseTupleAndKeywords(ARGS, KWARGS, (PARSER)->format, (PARSER)->keywords, ##__VA_ARGS__)
162162
extern PyObject* PyTruffle_Stack2Tuple(PyObject** args, Py_ssize_t nargs);
163-
#define _PyArg_ParseStack_SizeT(ARGS, NARGS, KWNAMES, PARSER, ...) PyArg_ParseTupleAndKeywords(PyTruffle_Stack2Tuple(ARGS, NARGS), KWNAMES, (PARSER)->format, (PARSER)->keywords, __VA_ARGS__)
163+
#define _PyArg_ParseStack_SizeT(ARGS, NARGS, KWNAMES, PARSER, ...) PyArg_ParseTupleAndKeywords(PyTruffle_Stack2Tuple(ARGS, NARGS), KWNAMES, (PARSER)->format, (PARSER)->keywords, ##__VA_ARGS__)
164164

165165
#ifndef PyArg_Parse
166166
#define PyArg_Parse _PyArg_Parse_SizeT

0 commit comments

Comments
 (0)