@@ -3,11 +3,48 @@ preserve
3
3
[clinic start generated code]*/
4
4
5
5
#if defined(Py_BUILD_CORE ) && !defined(Py_BUILD_CORE_MODULE )
6
- # include "pycore_modsupport.h"
7
6
# include "pycore_gc.h" // PyGC_Head
8
7
# include "pycore_runtime.h" // _Py_ID()
9
8
#endif
10
9
10
+ PyAPI_FUNC (int ) _PyArg_CheckPositional (const char * , Py_ssize_t ,
11
+ Py_ssize_t , Py_ssize_t );
12
+ #define _Py_ANY_VARARGS (n ) ((n) == PY_SSIZE_T_MAX)
13
+ #define _PyArg_CheckPositional (funcname , nargs , min , max ) \
14
+ ((!_Py_ANY_VARARGS(max) && (min) <= (nargs) && (nargs) <= (max)) \
15
+ || _PyArg_CheckPositional((funcname), (nargs), (min), (max)))
16
+
17
+ // Export for '_heapq' shared extension
18
+ PyAPI_FUNC (void ) _PyArg_BadArgument (
19
+ const char * fname ,
20
+ const char * displayname ,
21
+ const char * expected ,
22
+ PyObject * arg );
23
+
24
+ // Export for '_curses' shared extension
25
+ PyAPI_FUNC (int ) _PyArg_ParseStack (
26
+ PyObject * const * args ,
27
+ Py_ssize_t nargs ,
28
+ const char * format ,
29
+ ...);
30
+
31
+ // Export for 'math' shared extension
32
+ PyAPI_FUNC (PyObject * const * ) _PyArg_UnpackKeywords (
33
+ PyObject * const * args ,
34
+ Py_ssize_t nargs ,
35
+ PyObject * kwargs ,
36
+ PyObject * kwnames ,
37
+ struct _PyArg_Parser * parser ,
38
+ int minpos ,
39
+ int maxpos ,
40
+ int minkw ,
41
+ PyObject * * buf );
42
+ #define _PyArg_UnpackKeywords (args , nargs , kwargs , kwnames , parser , minpos , maxpos , minkw , buf ) \
43
+ (((minkw) == 0 && (kwargs) == NULL && (kwnames) == NULL && \
44
+ (minpos) <= (nargs) && (nargs) <= (maxpos) && (args) != NULL) ? (args) : \
45
+ _PyArg_UnpackKeywords((args), (nargs), (kwargs), (kwnames), (parser), \
46
+ (minpos), (maxpos), (minkw), (buf)))
47
+
11
48
12
49
PyDoc_STRVAR (_curses_window_addch__doc__ ,
13
50
"addch([y, x,] ch, [attr=_curses.A_NORMAL])\n"
0 commit comments