Debian Codegraph @

Include/cpython/modsupport.h

raw
1 #ifndef Py_CPYTHON_MODSUPPORT_H
2 # error "this header file must not be included directly"
3 #endif
4
5 // A data structure that can be used to run initialization code once in a
6 // thread-safe manner. The C++11 equivalent is std::call_once.
7 typedef struct {
8 uint8_t v;
9 } _PyOnceFlag;
10
11 typedef struct _PyArg_Parser {
12 const char *format;
13 const char * const *keywords;
14 const char *fname;
15 const char *custom_msg;
16 _PyOnceFlag once; /* atomic one-time initialization flag */
17 int is_kwtuple_owned; /* does this parser own the kwtuple object? */
18 int pos; /* number of positional-only arguments */
19 int min; /* minimal number of arguments */
20 int max; /* maximal number of positional arguments */
21 PyObject *kwtuple; /* tuple of keyword parameter names */
22 struct _PyArg_Parser *next;
23 } _PyArg_Parser;
24
25 PyAPI_FUNC(int) _PyArg_ParseTupleAndKeywordsFast(PyObject *, PyObject *,
26 struct _PyArg_Parser *, ...);