ZTWHHH commited on
Commit
42a41c2
·
verified ·
1 Parent(s): a05d346

Add files using upload-large-folder tool

Browse files
This view is limited to 50 files because it contains too many changes.   See raw diff
Files changed (50) hide show
  1. evalkit_internvl/include/ncurses.h +0 -0
  2. evalkit_internvl/include/python3.10/Python.h +148 -0
  3. evalkit_internvl/include/python3.10/bltinmodule.h +14 -0
  4. evalkit_internvl/include/python3.10/boolobject.h +43 -0
  5. evalkit_internvl/include/python3.10/bytesobject.h +69 -0
  6. evalkit_internvl/include/python3.10/cellobject.h +29 -0
  7. evalkit_internvl/include/python3.10/ceval.h +158 -0
  8. evalkit_internvl/include/python3.10/classobject.h +57 -0
  9. evalkit_internvl/include/python3.10/codecs.h +248 -0
  10. evalkit_internvl/include/python3.10/compile.h +25 -0
  11. evalkit_internvl/include/python3.10/complexobject.h +69 -0
  12. evalkit_internvl/include/python3.10/context.h +81 -0
  13. evalkit_internvl/include/python3.10/cpython/ceval.h +30 -0
  14. evalkit_internvl/include/python3.10/cpython/interpreteridobject.h +11 -0
  15. evalkit_internvl/include/python3.10/cpython/pydebug.h +38 -0
  16. evalkit_internvl/include/python3.10/cpython/pyfpe.h +15 -0
  17. evalkit_internvl/include/python3.10/cpython/pymem.h +98 -0
  18. evalkit_internvl/include/python3.10/cpython/sysmodule.h +16 -0
  19. evalkit_internvl/include/python3.10/cpython/unicodeobject.h +1169 -0
  20. evalkit_internvl/include/python3.10/datetime.h +267 -0
  21. evalkit_internvl/include/python3.10/dictobject.h +97 -0
  22. evalkit_internvl/include/python3.10/dynamic_annotations.h +499 -0
  23. evalkit_internvl/include/python3.10/errcode.h +38 -0
  24. evalkit_internvl/include/python3.10/exports.h +30 -0
  25. evalkit_internvl/include/python3.10/fileobject.h +49 -0
  26. evalkit_internvl/include/python3.10/fileutils.h +26 -0
  27. evalkit_internvl/include/python3.10/floatobject.h +118 -0
  28. evalkit_internvl/include/python3.10/frameobject.h +20 -0
  29. evalkit_internvl/include/python3.10/funcobject.h +110 -0
  30. evalkit_internvl/include/python3.10/genobject.h +100 -0
  31. evalkit_internvl/include/python3.10/import.h +98 -0
  32. evalkit_internvl/include/python3.10/interpreteridobject.h +17 -0
  33. evalkit_internvl/include/python3.10/intrcheck.h +30 -0
  34. evalkit_internvl/include/python3.10/iterobject.h +27 -0
  35. evalkit_internvl/include/python3.10/listobject.h +52 -0
  36. evalkit_internvl/include/python3.10/longintrepr.h +99 -0
  37. evalkit_internvl/include/python3.10/longobject.h +220 -0
  38. evalkit_internvl/include/python3.10/marshal.h +28 -0
  39. evalkit_internvl/include/python3.10/memoryobject.h +72 -0
  40. evalkit_internvl/include/python3.10/methodobject.h +116 -0
  41. evalkit_internvl/include/python3.10/modsupport.h +263 -0
  42. evalkit_internvl/include/python3.10/moduleobject.h +96 -0
  43. evalkit_internvl/include/python3.10/namespaceobject.h +19 -0
  44. evalkit_internvl/include/python3.10/object.h +749 -0
  45. evalkit_internvl/include/python3.10/objimpl.h +215 -0
  46. evalkit_internvl/include/python3.10/osdefs.h +51 -0
  47. evalkit_internvl/include/python3.10/osmodule.h +17 -0
  48. evalkit_internvl/include/python3.10/py_curses.h +99 -0
  49. evalkit_internvl/include/python3.10/pyconfig.h +1703 -0
  50. evalkit_internvl/include/python3.10/pydtrace.h +59 -0
evalkit_internvl/include/ncurses.h ADDED
The diff for this file is too large to render. See raw diff
 
evalkit_internvl/include/python3.10/Python.h ADDED
@@ -0,0 +1,148 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ #ifndef Py_PYTHON_H
2
+ #define Py_PYTHON_H
3
+ /* Since this is a "meta-include" file, no #ifdef __cplusplus / extern "C" { */
4
+
5
+ /* Include nearly all Python header files */
6
+
7
+ #include "patchlevel.h"
8
+ #include "pyconfig.h"
9
+ #include "pymacconfig.h"
10
+
11
+ #include <limits.h>
12
+
13
+ #ifndef UCHAR_MAX
14
+ #error "Something's broken. UCHAR_MAX should be defined in limits.h."
15
+ #endif
16
+
17
+ #if UCHAR_MAX != 255
18
+ #error "Python's source code assumes C's unsigned char is an 8-bit type."
19
+ #endif
20
+
21
+ #if defined(__sgi) && !defined(_SGI_MP_SOURCE)
22
+ #define _SGI_MP_SOURCE
23
+ #endif
24
+
25
+ #include <stdio.h>
26
+ #ifndef NULL
27
+ # error "Python.h requires that stdio.h define NULL."
28
+ #endif
29
+
30
+ #include <string.h>
31
+ #ifdef HAVE_ERRNO_H
32
+ #include <errno.h>
33
+ #endif
34
+ #include <stdlib.h>
35
+ #ifndef MS_WINDOWS
36
+ #include <unistd.h>
37
+ #endif
38
+
39
+ /* For size_t? */
40
+ #ifdef HAVE_STDDEF_H
41
+ #include <stddef.h>
42
+ #endif
43
+
44
+ /* CAUTION: Build setups should ensure that NDEBUG is defined on the
45
+ * compiler command line when building Python in release mode; else
46
+ * assert() calls won't be removed.
47
+ */
48
+ #include <assert.h>
49
+
50
+ #include "pyport.h"
51
+ #include "pymacro.h"
52
+
53
+ /* A convenient way for code to know if sanitizers are enabled. */
54
+ #if defined(__has_feature)
55
+ # if __has_feature(memory_sanitizer)
56
+ # if !defined(_Py_MEMORY_SANITIZER)
57
+ # define _Py_MEMORY_SANITIZER
58
+ # endif
59
+ # endif
60
+ # if __has_feature(address_sanitizer)
61
+ # if !defined(_Py_ADDRESS_SANITIZER)
62
+ # define _Py_ADDRESS_SANITIZER
63
+ # endif
64
+ # endif
65
+ #elif defined(__GNUC__)
66
+ # if defined(__SANITIZE_ADDRESS__)
67
+ # define _Py_ADDRESS_SANITIZER
68
+ # endif
69
+ #endif
70
+
71
+ #include "pymath.h"
72
+ #include "pymem.h"
73
+
74
+ #include "object.h"
75
+ #include "objimpl.h"
76
+ #include "typeslots.h"
77
+ #include "pyhash.h"
78
+
79
+ #include "cpython/pydebug.h"
80
+
81
+ #include "bytearrayobject.h"
82
+ #include "bytesobject.h"
83
+ #include "unicodeobject.h"
84
+ #include "longobject.h"
85
+ #include "longintrepr.h"
86
+ #include "boolobject.h"
87
+ #include "floatobject.h"
88
+ #include "complexobject.h"
89
+ #include "rangeobject.h"
90
+ #include "memoryobject.h"
91
+ #include "tupleobject.h"
92
+ #include "listobject.h"
93
+ #include "dictobject.h"
94
+ #include "cpython/odictobject.h"
95
+ #include "enumobject.h"
96
+ #include "setobject.h"
97
+ #include "methodobject.h"
98
+ #include "moduleobject.h"
99
+ #include "funcobject.h"
100
+ #include "classobject.h"
101
+ #include "fileobject.h"
102
+ #include "pycapsule.h"
103
+ #include "code.h"
104
+ #include "pyframe.h"
105
+ #include "traceback.h"
106
+ #include "sliceobject.h"
107
+ #include "cellobject.h"
108
+ #include "iterobject.h"
109
+ #include "cpython/initconfig.h"
110
+ #include "genobject.h"
111
+ #include "descrobject.h"
112
+ #include "genericaliasobject.h"
113
+ #include "warnings.h"
114
+ #include "weakrefobject.h"
115
+ #include "structseq.h"
116
+ #include "namespaceobject.h"
117
+ #include "cpython/picklebufobject.h"
118
+ #include "cpython/pytime.h"
119
+
120
+ #include "codecs.h"
121
+ #include "pyerrors.h"
122
+ #include "pythread.h"
123
+ #include "pystate.h"
124
+ #include "context.h"
125
+
126
+ #include "modsupport.h"
127
+ #include "compile.h"
128
+ #include "pythonrun.h"
129
+ #include "pylifecycle.h"
130
+ #include "ceval.h"
131
+ #include "sysmodule.h"
132
+ #include "osmodule.h"
133
+ #include "intrcheck.h"
134
+ #include "import.h"
135
+
136
+ #include "abstract.h"
137
+ #include "bltinmodule.h"
138
+
139
+ #include "eval.h"
140
+
141
+ #include "cpython/pyctype.h"
142
+ #include "pystrtod.h"
143
+ #include "pystrcmp.h"
144
+ #include "fileutils.h"
145
+ #include "cpython/pyfpe.h"
146
+ #include "tracemalloc.h"
147
+
148
+ #endif /* !Py_PYTHON_H */
evalkit_internvl/include/python3.10/bltinmodule.h ADDED
@@ -0,0 +1,14 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ #ifndef Py_BLTINMODULE_H
2
+ #define Py_BLTINMODULE_H
3
+ #ifdef __cplusplus
4
+ extern "C" {
5
+ #endif
6
+
7
+ PyAPI_DATA(PyTypeObject) PyFilter_Type;
8
+ PyAPI_DATA(PyTypeObject) PyMap_Type;
9
+ PyAPI_DATA(PyTypeObject) PyZip_Type;
10
+
11
+ #ifdef __cplusplus
12
+ }
13
+ #endif
14
+ #endif /* !Py_BLTINMODULE_H */
evalkit_internvl/include/python3.10/boolobject.h ADDED
@@ -0,0 +1,43 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /* Boolean object interface */
2
+
3
+ #ifndef Py_BOOLOBJECT_H
4
+ #define Py_BOOLOBJECT_H
5
+ #ifdef __cplusplus
6
+ extern "C" {
7
+ #endif
8
+
9
+
10
+ PyAPI_DATA(PyTypeObject) PyBool_Type;
11
+
12
+ #define PyBool_Check(x) Py_IS_TYPE(x, &PyBool_Type)
13
+
14
+ /* Py_False and Py_True are the only two bools in existence.
15
+ Don't forget to apply Py_INCREF() when returning either!!! */
16
+
17
+ /* Don't use these directly */
18
+ PyAPI_DATA(struct _longobject) _Py_FalseStruct;
19
+ PyAPI_DATA(struct _longobject) _Py_TrueStruct;
20
+
21
+ /* Use these macros */
22
+ #define Py_False ((PyObject *) &_Py_FalseStruct)
23
+ #define Py_True ((PyObject *) &_Py_TrueStruct)
24
+
25
+ // Test if an object is the True singleton, the same as "x is True" in Python.
26
+ PyAPI_FUNC(int) Py_IsTrue(PyObject *x);
27
+ #define Py_IsTrue(x) Py_Is((x), Py_True)
28
+
29
+ // Test if an object is the False singleton, the same as "x is False" in Python.
30
+ PyAPI_FUNC(int) Py_IsFalse(PyObject *x);
31
+ #define Py_IsFalse(x) Py_Is((x), Py_False)
32
+
33
+ /* Macros for returning Py_True or Py_False, respectively */
34
+ #define Py_RETURN_TRUE return Py_NewRef(Py_True)
35
+ #define Py_RETURN_FALSE return Py_NewRef(Py_False)
36
+
37
+ /* Function to return a bool from a C long */
38
+ PyAPI_FUNC(PyObject *) PyBool_FromLong(long);
39
+
40
+ #ifdef __cplusplus
41
+ }
42
+ #endif
43
+ #endif /* !Py_BOOLOBJECT_H */
evalkit_internvl/include/python3.10/bytesobject.h ADDED
@@ -0,0 +1,69 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+
2
+ /* Bytes object interface */
3
+
4
+ #ifndef Py_BYTESOBJECT_H
5
+ #define Py_BYTESOBJECT_H
6
+ #ifdef __cplusplus
7
+ extern "C" {
8
+ #endif
9
+
10
+ #include <stdarg.h>
11
+
12
+ /*
13
+ Type PyBytesObject represents a byte string. An extra zero byte is
14
+ reserved at the end to ensure it is zero-terminated, but a size is
15
+ present so strings with null bytes in them can be represented. This
16
+ is an immutable object type.
17
+
18
+ There are functions to create new bytes objects, to test
19
+ an object for bytes-ness, and to get the
20
+ byte string value. The latter function returns a null pointer
21
+ if the object is not of the proper type.
22
+ There is a variant that takes an explicit size as well as a
23
+ variant that assumes a zero-terminated string. Note that none of the
24
+ functions should be applied to NULL pointer.
25
+ */
26
+
27
+ PyAPI_DATA(PyTypeObject) PyBytes_Type;
28
+ PyAPI_DATA(PyTypeObject) PyBytesIter_Type;
29
+
30
+ #define PyBytes_Check(op) \
31
+ PyType_FastSubclass(Py_TYPE(op), Py_TPFLAGS_BYTES_SUBCLASS)
32
+ #define PyBytes_CheckExact(op) Py_IS_TYPE(op, &PyBytes_Type)
33
+
34
+ PyAPI_FUNC(PyObject *) PyBytes_FromStringAndSize(const char *, Py_ssize_t);
35
+ PyAPI_FUNC(PyObject *) PyBytes_FromString(const char *);
36
+ PyAPI_FUNC(PyObject *) PyBytes_FromObject(PyObject *);
37
+ PyAPI_FUNC(PyObject *) PyBytes_FromFormatV(const char*, va_list)
38
+ Py_GCC_ATTRIBUTE((format(printf, 1, 0)));
39
+ PyAPI_FUNC(PyObject *) PyBytes_FromFormat(const char*, ...)
40
+ Py_GCC_ATTRIBUTE((format(printf, 1, 2)));
41
+ PyAPI_FUNC(Py_ssize_t) PyBytes_Size(PyObject *);
42
+ PyAPI_FUNC(char *) PyBytes_AsString(PyObject *);
43
+ PyAPI_FUNC(PyObject *) PyBytes_Repr(PyObject *, int);
44
+ PyAPI_FUNC(void) PyBytes_Concat(PyObject **, PyObject *);
45
+ PyAPI_FUNC(void) PyBytes_ConcatAndDel(PyObject **, PyObject *);
46
+ PyAPI_FUNC(PyObject *) PyBytes_DecodeEscape(const char *, Py_ssize_t,
47
+ const char *, Py_ssize_t,
48
+ const char *);
49
+
50
+ /* Provides access to the internal data buffer and size of a bytes object.
51
+ Passing NULL as len parameter will force the string buffer to be
52
+ 0-terminated (passing a string with embedded NUL characters will
53
+ cause an exception). */
54
+ PyAPI_FUNC(int) PyBytes_AsStringAndSize(
55
+ PyObject *obj, /* bytes object */
56
+ char **s, /* pointer to buffer variable */
57
+ Py_ssize_t *len /* pointer to length variable or NULL */
58
+ );
59
+
60
+ #ifndef Py_LIMITED_API
61
+ # define Py_CPYTHON_BYTESOBJECT_H
62
+ # include "cpython/bytesobject.h"
63
+ # undef Py_CPYTHON_BYTESOBJECT_H
64
+ #endif
65
+
66
+ #ifdef __cplusplus
67
+ }
68
+ #endif
69
+ #endif /* !Py_BYTESOBJECT_H */
evalkit_internvl/include/python3.10/cellobject.h ADDED
@@ -0,0 +1,29 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /* Cell object interface */
2
+ #ifndef Py_LIMITED_API
3
+ #ifndef Py_CELLOBJECT_H
4
+ #define Py_CELLOBJECT_H
5
+ #ifdef __cplusplus
6
+ extern "C" {
7
+ #endif
8
+
9
+ typedef struct {
10
+ PyObject_HEAD
11
+ PyObject *ob_ref; /* Content of the cell or NULL when empty */
12
+ } PyCellObject;
13
+
14
+ PyAPI_DATA(PyTypeObject) PyCell_Type;
15
+
16
+ #define PyCell_Check(op) Py_IS_TYPE(op, &PyCell_Type)
17
+
18
+ PyAPI_FUNC(PyObject *) PyCell_New(PyObject *);
19
+ PyAPI_FUNC(PyObject *) PyCell_Get(PyObject *);
20
+ PyAPI_FUNC(int) PyCell_Set(PyObject *, PyObject *);
21
+
22
+ #define PyCell_GET(op) (((PyCellObject *)(op))->ob_ref)
23
+ #define PyCell_SET(op, v) ((void)(((PyCellObject *)(op))->ob_ref = v))
24
+
25
+ #ifdef __cplusplus
26
+ }
27
+ #endif
28
+ #endif /* !Py_TUPLEOBJECT_H */
29
+ #endif /* Py_LIMITED_API */
evalkit_internvl/include/python3.10/ceval.h ADDED
@@ -0,0 +1,158 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ #ifndef Py_CEVAL_H
2
+ #define Py_CEVAL_H
3
+ #ifdef __cplusplus
4
+ extern "C" {
5
+ #endif
6
+
7
+
8
+ /* Interface to random parts in ceval.c */
9
+
10
+ /* PyEval_CallObjectWithKeywords(), PyEval_CallObject(), PyEval_CallFunction
11
+ * and PyEval_CallMethod are deprecated. Since they are officially part of the
12
+ * stable ABI (PEP 384), they must be kept for backward compatibility.
13
+ * PyObject_Call(), PyObject_CallFunction() and PyObject_CallMethod() are
14
+ * recommended to call a callable object.
15
+ */
16
+
17
+ Py_DEPRECATED(3.9) PyAPI_FUNC(PyObject *) PyEval_CallObjectWithKeywords(
18
+ PyObject *callable,
19
+ PyObject *args,
20
+ PyObject *kwargs);
21
+
22
+ /* Deprecated since PyEval_CallObjectWithKeywords is deprecated */
23
+ #define PyEval_CallObject(callable, arg) \
24
+ PyEval_CallObjectWithKeywords(callable, arg, (PyObject *)NULL)
25
+
26
+ Py_DEPRECATED(3.9) PyAPI_FUNC(PyObject *) PyEval_CallFunction(
27
+ PyObject *callable, const char *format, ...);
28
+ Py_DEPRECATED(3.9) PyAPI_FUNC(PyObject *) PyEval_CallMethod(
29
+ PyObject *obj, const char *name, const char *format, ...);
30
+
31
+ PyAPI_FUNC(PyObject *) PyEval_GetBuiltins(void);
32
+ PyAPI_FUNC(PyObject *) PyEval_GetGlobals(void);
33
+ PyAPI_FUNC(PyObject *) PyEval_GetLocals(void);
34
+ PyAPI_FUNC(PyFrameObject *) PyEval_GetFrame(void);
35
+
36
+ PyAPI_FUNC(int) Py_AddPendingCall(int (*func)(void *), void *arg);
37
+ PyAPI_FUNC(int) Py_MakePendingCalls(void);
38
+
39
+ /* Protection against deeply nested recursive calls
40
+
41
+ In Python 3.0, this protection has two levels:
42
+ * normal anti-recursion protection is triggered when the recursion level
43
+ exceeds the current recursion limit. It raises a RecursionError, and sets
44
+ the "overflowed" flag in the thread state structure. This flag
45
+ temporarily *disables* the normal protection; this allows cleanup code
46
+ to potentially outgrow the recursion limit while processing the
47
+ RecursionError.
48
+ * "last chance" anti-recursion protection is triggered when the recursion
49
+ level exceeds "current recursion limit + 50". By construction, this
50
+ protection can only be triggered when the "overflowed" flag is set. It
51
+ means the cleanup code has itself gone into an infinite loop, or the
52
+ RecursionError has been mistakingly ignored. When this protection is
53
+ triggered, the interpreter aborts with a Fatal Error.
54
+
55
+ In addition, the "overflowed" flag is automatically reset when the
56
+ recursion level drops below "current recursion limit - 50". This heuristic
57
+ is meant to ensure that the normal anti-recursion protection doesn't get
58
+ disabled too long.
59
+
60
+ Please note: this scheme has its own limitations. See:
61
+ http://mail.python.org/pipermail/python-dev/2008-August/082106.html
62
+ for some observations.
63
+ */
64
+ PyAPI_FUNC(void) Py_SetRecursionLimit(int);
65
+ PyAPI_FUNC(int) Py_GetRecursionLimit(void);
66
+
67
+ PyAPI_FUNC(int) Py_EnterRecursiveCall(const char *where);
68
+ PyAPI_FUNC(void) Py_LeaveRecursiveCall(void);
69
+
70
+ PyAPI_FUNC(const char *) PyEval_GetFuncName(PyObject *);
71
+ PyAPI_FUNC(const char *) PyEval_GetFuncDesc(PyObject *);
72
+
73
+ PyAPI_FUNC(PyObject *) PyEval_EvalFrame(PyFrameObject *);
74
+ PyAPI_FUNC(PyObject *) PyEval_EvalFrameEx(PyFrameObject *f, int exc);
75
+
76
+ /* Interface for threads.
77
+
78
+ A module that plans to do a blocking system call (or something else
79
+ that lasts a long time and doesn't touch Python data) can allow other
80
+ threads to run as follows:
81
+
82
+ ...preparations here...
83
+ Py_BEGIN_ALLOW_THREADS
84
+ ...blocking system call here...
85
+ Py_END_ALLOW_THREADS
86
+ ...interpret result here...
87
+
88
+ The Py_BEGIN_ALLOW_THREADS/Py_END_ALLOW_THREADS pair expands to a
89
+ {}-surrounded block.
90
+ To leave the block in the middle (e.g., with return), you must insert
91
+ a line containing Py_BLOCK_THREADS before the return, e.g.
92
+
93
+ if (...premature_exit...) {
94
+ Py_BLOCK_THREADS
95
+ PyErr_SetFromErrno(PyExc_OSError);
96
+ return NULL;
97
+ }
98
+
99
+ An alternative is:
100
+
101
+ Py_BLOCK_THREADS
102
+ if (...premature_exit...) {
103
+ PyErr_SetFromErrno(PyExc_OSError);
104
+ return NULL;
105
+ }
106
+ Py_UNBLOCK_THREADS
107
+
108
+ For convenience, that the value of 'errno' is restored across
109
+ Py_END_ALLOW_THREADS and Py_BLOCK_THREADS.
110
+
111
+ WARNING: NEVER NEST CALLS TO Py_BEGIN_ALLOW_THREADS AND
112
+ Py_END_ALLOW_THREADS!!!
113
+
114
+ Note that not yet all candidates have been converted to use this
115
+ mechanism!
116
+ */
117
+
118
+ PyAPI_FUNC(PyThreadState *) PyEval_SaveThread(void);
119
+ PyAPI_FUNC(void) PyEval_RestoreThread(PyThreadState *);
120
+
121
+ Py_DEPRECATED(3.9) PyAPI_FUNC(int) PyEval_ThreadsInitialized(void);
122
+ Py_DEPRECATED(3.9) PyAPI_FUNC(void) PyEval_InitThreads(void);
123
+ /* PyEval_AcquireLock() and PyEval_ReleaseLock() are part of stable ABI.
124
+ * They will be removed from this header file in the future version.
125
+ * But they will be remained in ABI until Python 4.0.
126
+ */
127
+ Py_DEPRECATED(3.2) PyAPI_FUNC(void) PyEval_AcquireLock(void);
128
+ Py_DEPRECATED(3.2) PyAPI_FUNC(void) PyEval_ReleaseLock(void);
129
+ PyAPI_FUNC(void) PyEval_AcquireThread(PyThreadState *tstate);
130
+ PyAPI_FUNC(void) PyEval_ReleaseThread(PyThreadState *tstate);
131
+
132
+ #define Py_BEGIN_ALLOW_THREADS { \
133
+ PyThreadState *_save; \
134
+ _save = PyEval_SaveThread();
135
+ #define Py_BLOCK_THREADS PyEval_RestoreThread(_save);
136
+ #define Py_UNBLOCK_THREADS _save = PyEval_SaveThread();
137
+ #define Py_END_ALLOW_THREADS PyEval_RestoreThread(_save); \
138
+ }
139
+
140
+ /* Masks and values used by FORMAT_VALUE opcode. */
141
+ #define FVC_MASK 0x3
142
+ #define FVC_NONE 0x0
143
+ #define FVC_STR 0x1
144
+ #define FVC_REPR 0x2
145
+ #define FVC_ASCII 0x3
146
+ #define FVS_MASK 0x4
147
+ #define FVS_HAVE_SPEC 0x4
148
+
149
+ #ifndef Py_LIMITED_API
150
+ # define Py_CPYTHON_CEVAL_H
151
+ # include "cpython/ceval.h"
152
+ # undef Py_CPYTHON_CEVAL_H
153
+ #endif
154
+
155
+ #ifdef __cplusplus
156
+ }
157
+ #endif
158
+ #endif /* !Py_CEVAL_H */
evalkit_internvl/include/python3.10/classobject.h ADDED
@@ -0,0 +1,57 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /* Former class object interface -- now only bound methods are here */
2
+
3
+ /* Revealing some structures (not for general use) */
4
+
5
+ #ifndef Py_LIMITED_API
6
+ #ifndef Py_CLASSOBJECT_H
7
+ #define Py_CLASSOBJECT_H
8
+ #ifdef __cplusplus
9
+ extern "C" {
10
+ #endif
11
+
12
+ typedef struct {
13
+ PyObject_HEAD
14
+ PyObject *im_func; /* The callable object implementing the method */
15
+ PyObject *im_self; /* The instance it is bound to */
16
+ PyObject *im_weakreflist; /* List of weak references */
17
+ vectorcallfunc vectorcall;
18
+ } PyMethodObject;
19
+
20
+ PyAPI_DATA(PyTypeObject) PyMethod_Type;
21
+
22
+ #define PyMethod_Check(op) Py_IS_TYPE(op, &PyMethod_Type)
23
+
24
+ PyAPI_FUNC(PyObject *) PyMethod_New(PyObject *, PyObject *);
25
+
26
+ PyAPI_FUNC(PyObject *) PyMethod_Function(PyObject *);
27
+ PyAPI_FUNC(PyObject *) PyMethod_Self(PyObject *);
28
+
29
+ /* Macros for direct access to these values. Type checks are *not*
30
+ done, so use with care. */
31
+ #define PyMethod_GET_FUNCTION(meth) \
32
+ (((PyMethodObject *)meth) -> im_func)
33
+ #define PyMethod_GET_SELF(meth) \
34
+ (((PyMethodObject *)meth) -> im_self)
35
+
36
+ typedef struct {
37
+ PyObject_HEAD
38
+ PyObject *func;
39
+ } PyInstanceMethodObject;
40
+
41
+ PyAPI_DATA(PyTypeObject) PyInstanceMethod_Type;
42
+
43
+ #define PyInstanceMethod_Check(op) Py_IS_TYPE(op, &PyInstanceMethod_Type)
44
+
45
+ PyAPI_FUNC(PyObject *) PyInstanceMethod_New(PyObject *);
46
+ PyAPI_FUNC(PyObject *) PyInstanceMethod_Function(PyObject *);
47
+
48
+ /* Macros for direct access to these values. Type checks are *not*
49
+ done, so use with care. */
50
+ #define PyInstanceMethod_GET_FUNCTION(meth) \
51
+ (((PyInstanceMethodObject *)meth) -> func)
52
+
53
+ #ifdef __cplusplus
54
+ }
55
+ #endif
56
+ #endif /* !Py_CLASSOBJECT_H */
57
+ #endif /* Py_LIMITED_API */
evalkit_internvl/include/python3.10/codecs.h ADDED
@@ -0,0 +1,248 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ #ifndef Py_CODECREGISTRY_H
2
+ #define Py_CODECREGISTRY_H
3
+ #ifdef __cplusplus
4
+ extern "C" {
5
+ #endif
6
+
7
+ /* ------------------------------------------------------------------------
8
+
9
+ Python Codec Registry and support functions
10
+
11
+
12
+ Written by Marc-Andre Lemburg (mal@lemburg.com).
13
+
14
+ Copyright (c) Corporation for National Research Initiatives.
15
+
16
+ ------------------------------------------------------------------------ */
17
+
18
+ /* Register a new codec search function.
19
+
20
+ As side effect, this tries to load the encodings package, if not
21
+ yet done, to make sure that it is always first in the list of
22
+ search functions.
23
+
24
+ The search_function's refcount is incremented by this function. */
25
+
26
+ PyAPI_FUNC(int) PyCodec_Register(
27
+ PyObject *search_function
28
+ );
29
+
30
+ /* Unregister a codec search function and clear the registry's cache.
31
+ If the search function is not registered, do nothing.
32
+ Return 0 on success. Raise an exception and return -1 on error. */
33
+
34
+ PyAPI_FUNC(int) PyCodec_Unregister(
35
+ PyObject *search_function
36
+ );
37
+
38
+ /* Codec registry lookup API.
39
+
40
+ Looks up the given encoding and returns a CodecInfo object with
41
+ function attributes which implement the different aspects of
42
+ processing the encoding.
43
+
44
+ The encoding string is looked up converted to all lower-case
45
+ characters. This makes encodings looked up through this mechanism
46
+ effectively case-insensitive.
47
+
48
+ If no codec is found, a KeyError is set and NULL returned.
49
+
50
+ As side effect, this tries to load the encodings package, if not
51
+ yet done. This is part of the lazy load strategy for the encodings
52
+ package.
53
+
54
+ */
55
+
56
+ #ifndef Py_LIMITED_API
57
+ PyAPI_FUNC(PyObject *) _PyCodec_Lookup(
58
+ const char *encoding
59
+ );
60
+
61
+ PyAPI_FUNC(int) _PyCodec_Forget(
62
+ const char *encoding
63
+ );
64
+ #endif
65
+
66
+ /* Codec registry encoding check API.
67
+
68
+ Returns 1/0 depending on whether there is a registered codec for
69
+ the given encoding.
70
+
71
+ */
72
+
73
+ PyAPI_FUNC(int) PyCodec_KnownEncoding(
74
+ const char *encoding
75
+ );
76
+
77
+ /* Generic codec based encoding API.
78
+
79
+ object is passed through the encoder function found for the given
80
+ encoding using the error handling method defined by errors. errors
81
+ may be NULL to use the default method defined for the codec.
82
+
83
+ Raises a LookupError in case no encoder can be found.
84
+
85
+ */
86
+
87
+ PyAPI_FUNC(PyObject *) PyCodec_Encode(
88
+ PyObject *object,
89
+ const char *encoding,
90
+ const char *errors
91
+ );
92
+
93
+ /* Generic codec based decoding API.
94
+
95
+ object is passed through the decoder function found for the given
96
+ encoding using the error handling method defined by errors. errors
97
+ may be NULL to use the default method defined for the codec.
98
+
99
+ Raises a LookupError in case no encoder can be found.
100
+
101
+ */
102
+
103
+ PyAPI_FUNC(PyObject *) PyCodec_Decode(
104
+ PyObject *object,
105
+ const char *encoding,
106
+ const char *errors
107
+ );
108
+
109
+ #ifndef Py_LIMITED_API
110
+ /* Text codec specific encoding and decoding API.
111
+
112
+ Checks the encoding against a list of codecs which do not
113
+ implement a str<->bytes encoding before attempting the
114
+ operation.
115
+
116
+ Please note that these APIs are internal and should not
117
+ be used in Python C extensions.
118
+
119
+ XXX (ncoghlan): should we make these, or something like them, public
120
+ in Python 3.5+?
121
+
122
+ */
123
+ PyAPI_FUNC(PyObject *) _PyCodec_LookupTextEncoding(
124
+ const char *encoding,
125
+ const char *alternate_command
126
+ );
127
+
128
+ PyAPI_FUNC(PyObject *) _PyCodec_EncodeText(
129
+ PyObject *object,
130
+ const char *encoding,
131
+ const char *errors
132
+ );
133
+
134
+ PyAPI_FUNC(PyObject *) _PyCodec_DecodeText(
135
+ PyObject *object,
136
+ const char *encoding,
137
+ const char *errors
138
+ );
139
+
140
+ /* These two aren't actually text encoding specific, but _io.TextIOWrapper
141
+ * is the only current API consumer.
142
+ */
143
+ PyAPI_FUNC(PyObject *) _PyCodecInfo_GetIncrementalDecoder(
144
+ PyObject *codec_info,
145
+ const char *errors
146
+ );
147
+
148
+ PyAPI_FUNC(PyObject *) _PyCodecInfo_GetIncrementalEncoder(
149
+ PyObject *codec_info,
150
+ const char *errors
151
+ );
152
+ #endif
153
+
154
+
155
+
156
+ /* --- Codec Lookup APIs --------------------------------------------------
157
+
158
+ All APIs return a codec object with incremented refcount and are
159
+ based on _PyCodec_Lookup(). The same comments w/r to the encoding
160
+ name also apply to these APIs.
161
+
162
+ */
163
+
164
+ /* Get an encoder function for the given encoding. */
165
+
166
+ PyAPI_FUNC(PyObject *) PyCodec_Encoder(
167
+ const char *encoding
168
+ );
169
+
170
+ /* Get a decoder function for the given encoding. */
171
+
172
+ PyAPI_FUNC(PyObject *) PyCodec_Decoder(
173
+ const char *encoding
174
+ );
175
+
176
+ /* Get an IncrementalEncoder object for the given encoding. */
177
+
178
+ PyAPI_FUNC(PyObject *) PyCodec_IncrementalEncoder(
179
+ const char *encoding,
180
+ const char *errors
181
+ );
182
+
183
+ /* Get an IncrementalDecoder object function for the given encoding. */
184
+
185
+ PyAPI_FUNC(PyObject *) PyCodec_IncrementalDecoder(
186
+ const char *encoding,
187
+ const char *errors
188
+ );
189
+
190
+ /* Get a StreamReader factory function for the given encoding. */
191
+
192
+ PyAPI_FUNC(PyObject *) PyCodec_StreamReader(
193
+ const char *encoding,
194
+ PyObject *stream,
195
+ const char *errors
196
+ );
197
+
198
+ /* Get a StreamWriter factory function for the given encoding. */
199
+
200
+ PyAPI_FUNC(PyObject *) PyCodec_StreamWriter(
201
+ const char *encoding,
202
+ PyObject *stream,
203
+ const char *errors
204
+ );
205
+
206
+ /* Unicode encoding error handling callback registry API */
207
+
208
+ /* Register the error handling callback function error under the given
209
+ name. This function will be called by the codec when it encounters
210
+ unencodable characters/undecodable bytes and doesn't know the
211
+ callback name, when name is specified as the error parameter
212
+ in the call to the encode/decode function.
213
+ Return 0 on success, -1 on error */
214
+ PyAPI_FUNC(int) PyCodec_RegisterError(const char *name, PyObject *error);
215
+
216
+ /* Lookup the error handling callback function registered under the given
217
+ name. As a special case NULL can be passed, in which case
218
+ the error handling callback for "strict" will be returned. */
219
+ PyAPI_FUNC(PyObject *) PyCodec_LookupError(const char *name);
220
+
221
+ /* raise exc as an exception */
222
+ PyAPI_FUNC(PyObject *) PyCodec_StrictErrors(PyObject *exc);
223
+
224
+ /* ignore the unicode error, skipping the faulty input */
225
+ PyAPI_FUNC(PyObject *) PyCodec_IgnoreErrors(PyObject *exc);
226
+
227
+ /* replace the unicode encode error with ? or U+FFFD */
228
+ PyAPI_FUNC(PyObject *) PyCodec_ReplaceErrors(PyObject *exc);
229
+
230
+ /* replace the unicode encode error with XML character references */
231
+ PyAPI_FUNC(PyObject *) PyCodec_XMLCharRefReplaceErrors(PyObject *exc);
232
+
233
+ /* replace the unicode encode error with backslash escapes (\x, \u and \U) */
234
+ PyAPI_FUNC(PyObject *) PyCodec_BackslashReplaceErrors(PyObject *exc);
235
+
236
+ #if !defined(Py_LIMITED_API) || Py_LIMITED_API+0 >= 0x03050000
237
+ /* replace the unicode encode error with backslash escapes (\N, \x, \u and \U) */
238
+ PyAPI_FUNC(PyObject *) PyCodec_NameReplaceErrors(PyObject *exc);
239
+ #endif
240
+
241
+ #ifndef Py_LIMITED_API
242
+ PyAPI_DATA(const char *) Py_hexdigits;
243
+ #endif
244
+
245
+ #ifdef __cplusplus
246
+ }
247
+ #endif
248
+ #endif /* !Py_CODECREGISTRY_H */
evalkit_internvl/include/python3.10/compile.h ADDED
@@ -0,0 +1,25 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ #ifndef Py_COMPILE_H
2
+ #define Py_COMPILE_H
3
+ #ifdef __cplusplus
4
+ extern "C" {
5
+ #endif
6
+
7
+ /* These definitions must match corresponding definitions in graminit.h. */
8
+ #define Py_single_input 256
9
+ #define Py_file_input 257
10
+ #define Py_eval_input 258
11
+ #define Py_func_type_input 345
12
+
13
+ /* This doesn't need to match anything */
14
+ #define Py_fstring_input 800
15
+
16
+ #ifndef Py_LIMITED_API
17
+ # define Py_CPYTHON_COMPILE_H
18
+ # include "cpython/compile.h"
19
+ # undef Py_CPYTHON_COMPILE_H
20
+ #endif
21
+
22
+ #ifdef __cplusplus
23
+ }
24
+ #endif
25
+ #endif /* !Py_COMPILE_H */
evalkit_internvl/include/python3.10/complexobject.h ADDED
@@ -0,0 +1,69 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /* Complex number structure */
2
+
3
+ #ifndef Py_COMPLEXOBJECT_H
4
+ #define Py_COMPLEXOBJECT_H
5
+ #ifdef __cplusplus
6
+ extern "C" {
7
+ #endif
8
+
9
+ #ifndef Py_LIMITED_API
10
+ typedef struct {
11
+ double real;
12
+ double imag;
13
+ } Py_complex;
14
+
15
+ /* Operations on complex numbers from complexmodule.c */
16
+
17
+ PyAPI_FUNC(Py_complex) _Py_c_sum(Py_complex, Py_complex);
18
+ PyAPI_FUNC(Py_complex) _Py_c_diff(Py_complex, Py_complex);
19
+ PyAPI_FUNC(Py_complex) _Py_c_neg(Py_complex);
20
+ PyAPI_FUNC(Py_complex) _Py_c_prod(Py_complex, Py_complex);
21
+ PyAPI_FUNC(Py_complex) _Py_c_quot(Py_complex, Py_complex);
22
+ PyAPI_FUNC(Py_complex) _Py_c_pow(Py_complex, Py_complex);
23
+ PyAPI_FUNC(double) _Py_c_abs(Py_complex);
24
+ #endif
25
+
26
+ /* Complex object interface */
27
+
28
+ /*
29
+ PyComplexObject represents a complex number with double-precision
30
+ real and imaginary parts.
31
+ */
32
+ #ifndef Py_LIMITED_API
33
+ typedef struct {
34
+ PyObject_HEAD
35
+ Py_complex cval;
36
+ } PyComplexObject;
37
+ #endif
38
+
39
+ PyAPI_DATA(PyTypeObject) PyComplex_Type;
40
+
41
+ #define PyComplex_Check(op) PyObject_TypeCheck(op, &PyComplex_Type)
42
+ #define PyComplex_CheckExact(op) Py_IS_TYPE(op, &PyComplex_Type)
43
+
44
+ #ifndef Py_LIMITED_API
45
+ PyAPI_FUNC(PyObject *) PyComplex_FromCComplex(Py_complex);
46
+ #endif
47
+ PyAPI_FUNC(PyObject *) PyComplex_FromDoubles(double real, double imag);
48
+
49
+ PyAPI_FUNC(double) PyComplex_RealAsDouble(PyObject *op);
50
+ PyAPI_FUNC(double) PyComplex_ImagAsDouble(PyObject *op);
51
+ #ifndef Py_LIMITED_API
52
+ PyAPI_FUNC(Py_complex) PyComplex_AsCComplex(PyObject *op);
53
+ #endif
54
+
55
+ /* Format the object based on the format_spec, as defined in PEP 3101
56
+ (Advanced String Formatting). */
57
+ #ifndef Py_LIMITED_API
58
+ PyAPI_FUNC(int) _PyComplex_FormatAdvancedWriter(
59
+ _PyUnicodeWriter *writer,
60
+ PyObject *obj,
61
+ PyObject *format_spec,
62
+ Py_ssize_t start,
63
+ Py_ssize_t end);
64
+ #endif
65
+
66
+ #ifdef __cplusplus
67
+ }
68
+ #endif
69
+ #endif /* !Py_COMPLEXOBJECT_H */
evalkit_internvl/include/python3.10/context.h ADDED
@@ -0,0 +1,81 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ #ifndef Py_CONTEXT_H
2
+ #define Py_CONTEXT_H
3
+ #ifdef __cplusplus
4
+ extern "C" {
5
+ #endif
6
+
7
+ #ifndef Py_LIMITED_API
8
+
9
+
10
+ PyAPI_DATA(PyTypeObject) PyContext_Type;
11
+ typedef struct _pycontextobject PyContext;
12
+
13
+ PyAPI_DATA(PyTypeObject) PyContextVar_Type;
14
+ typedef struct _pycontextvarobject PyContextVar;
15
+
16
+ PyAPI_DATA(PyTypeObject) PyContextToken_Type;
17
+ typedef struct _pycontexttokenobject PyContextToken;
18
+
19
+
20
+ #define PyContext_CheckExact(o) Py_IS_TYPE(o, &PyContext_Type)
21
+ #define PyContextVar_CheckExact(o) Py_IS_TYPE(o, &PyContextVar_Type)
22
+ #define PyContextToken_CheckExact(o) Py_IS_TYPE(o, &PyContextToken_Type)
23
+
24
+
25
+ PyAPI_FUNC(PyObject *) PyContext_New(void);
26
+ PyAPI_FUNC(PyObject *) PyContext_Copy(PyObject *);
27
+ PyAPI_FUNC(PyObject *) PyContext_CopyCurrent(void);
28
+
29
+ PyAPI_FUNC(int) PyContext_Enter(PyObject *);
30
+ PyAPI_FUNC(int) PyContext_Exit(PyObject *);
31
+
32
+
33
+ /* Create a new context variable.
34
+
35
+ default_value can be NULL.
36
+ */
37
+ PyAPI_FUNC(PyObject *) PyContextVar_New(
38
+ const char *name, PyObject *default_value);
39
+
40
+
41
+ /* Get a value for the variable.
42
+
43
+ Returns -1 if an error occurred during lookup.
44
+
45
+ Returns 0 if value either was or was not found.
46
+
47
+ If value was found, *value will point to it.
48
+ If not, it will point to:
49
+
50
+ - default_value, if not NULL;
51
+ - the default value of "var", if not NULL;
52
+ - NULL.
53
+
54
+ '*value' will be a new ref, if not NULL.
55
+ */
56
+ PyAPI_FUNC(int) PyContextVar_Get(
57
+ PyObject *var, PyObject *default_value, PyObject **value);
58
+
59
+
60
+ /* Set a new value for the variable.
61
+ Returns NULL if an error occurs.
62
+ */
63
+ PyAPI_FUNC(PyObject *) PyContextVar_Set(PyObject *var, PyObject *value);
64
+
65
+
66
+ /* Reset a variable to its previous value.
67
+ Returns 0 on success, -1 on error.
68
+ */
69
+ PyAPI_FUNC(int) PyContextVar_Reset(PyObject *var, PyObject *token);
70
+
71
+
72
+ /* This method is exposed only for CPython tests. Don not use it. */
73
+ PyAPI_FUNC(PyObject *) _PyContext_NewHamtForTests(void);
74
+
75
+
76
+ #endif /* !Py_LIMITED_API */
77
+
78
+ #ifdef __cplusplus
79
+ }
80
+ #endif
81
+ #endif /* !Py_CONTEXT_H */
evalkit_internvl/include/python3.10/cpython/ceval.h ADDED
@@ -0,0 +1,30 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ #ifndef Py_CPYTHON_CEVAL_H
2
+ # error "this header file must not be included directly"
3
+ #endif
4
+
5
+ PyAPI_FUNC(void) PyEval_SetProfile(Py_tracefunc, PyObject *);
6
+ PyAPI_DATA(int) _PyEval_SetProfile(PyThreadState *tstate, Py_tracefunc func, PyObject *arg);
7
+ PyAPI_FUNC(void) PyEval_SetTrace(Py_tracefunc, PyObject *);
8
+ PyAPI_FUNC(int) _PyEval_SetTrace(PyThreadState *tstate, Py_tracefunc func, PyObject *arg);
9
+ PyAPI_FUNC(int) _PyEval_GetCoroutineOriginTrackingDepth(void);
10
+ PyAPI_FUNC(int) _PyEval_SetAsyncGenFirstiter(PyObject *);
11
+ PyAPI_FUNC(PyObject *) _PyEval_GetAsyncGenFirstiter(void);
12
+ PyAPI_FUNC(int) _PyEval_SetAsyncGenFinalizer(PyObject *);
13
+ PyAPI_FUNC(PyObject *) _PyEval_GetAsyncGenFinalizer(void);
14
+
15
+ /* Helper to look up a builtin object */
16
+ PyAPI_FUNC(PyObject *) _PyEval_GetBuiltinId(_Py_Identifier *);
17
+ /* Look at the current frame's (if any) code's co_flags, and turn on
18
+ the corresponding compiler flags in cf->cf_flags. Return 1 if any
19
+ flag was set, else return 0. */
20
+ PyAPI_FUNC(int) PyEval_MergeCompilerFlags(PyCompilerFlags *cf);
21
+
22
+ PyAPI_FUNC(PyObject *) _PyEval_EvalFrameDefault(PyThreadState *tstate, PyFrameObject *f, int exc);
23
+
24
+ PyAPI_FUNC(void) _PyEval_SetSwitchInterval(unsigned long microseconds);
25
+ PyAPI_FUNC(unsigned long) _PyEval_GetSwitchInterval(void);
26
+
27
+ PyAPI_FUNC(Py_ssize_t) _PyEval_RequestCodeExtraIndex(freefunc);
28
+
29
+ PyAPI_FUNC(int) _PyEval_SliceIndex(PyObject *, Py_ssize_t *);
30
+ PyAPI_FUNC(int) _PyEval_SliceIndexNotNone(PyObject *, Py_ssize_t *);
evalkit_internvl/include/python3.10/cpython/interpreteridobject.h ADDED
@@ -0,0 +1,11 @@
 
 
 
 
 
 
 
 
 
 
 
 
1
+ #ifndef Py_CPYTHON_INTERPRETERIDOBJECT_H
2
+ # error "this header file must not be included directly"
3
+ #endif
4
+
5
+ /* Interpreter ID Object */
6
+
7
+ PyAPI_DATA(PyTypeObject) _PyInterpreterID_Type;
8
+
9
+ PyAPI_FUNC(PyObject *) _PyInterpreterID_New(int64_t);
10
+ PyAPI_FUNC(PyObject *) _PyInterpreterState_GetIDObject(PyInterpreterState *);
11
+ PyAPI_FUNC(PyInterpreterState *) _PyInterpreterID_LookUp(PyObject *);
evalkit_internvl/include/python3.10/cpython/pydebug.h ADDED
@@ -0,0 +1,38 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ #ifndef Py_LIMITED_API
2
+ #ifndef Py_PYDEBUG_H
3
+ #define Py_PYDEBUG_H
4
+ #ifdef __cplusplus
5
+ extern "C" {
6
+ #endif
7
+
8
+ PyAPI_DATA(int) Py_DebugFlag;
9
+ PyAPI_DATA(int) Py_VerboseFlag;
10
+ PyAPI_DATA(int) Py_QuietFlag;
11
+ PyAPI_DATA(int) Py_InteractiveFlag;
12
+ PyAPI_DATA(int) Py_InspectFlag;
13
+ PyAPI_DATA(int) Py_OptimizeFlag;
14
+ PyAPI_DATA(int) Py_NoSiteFlag;
15
+ PyAPI_DATA(int) Py_BytesWarningFlag;
16
+ PyAPI_DATA(int) Py_FrozenFlag;
17
+ PyAPI_DATA(int) Py_IgnoreEnvironmentFlag;
18
+ PyAPI_DATA(int) Py_DontWriteBytecodeFlag;
19
+ PyAPI_DATA(int) Py_NoUserSiteDirectory;
20
+ PyAPI_DATA(int) Py_UnbufferedStdioFlag;
21
+ PyAPI_DATA(int) Py_HashRandomizationFlag;
22
+ PyAPI_DATA(int) Py_IsolatedFlag;
23
+
24
+ #ifdef MS_WINDOWS
25
+ PyAPI_DATA(int) Py_LegacyWindowsFSEncodingFlag;
26
+ PyAPI_DATA(int) Py_LegacyWindowsStdioFlag;
27
+ #endif
28
+
29
+ /* this is a wrapper around getenv() that pays attention to
30
+ Py_IgnoreEnvironmentFlag. It should be used for getting variables like
31
+ PYTHONPATH and PYTHONHOME from the environment */
32
+ #define Py_GETENV(s) (Py_IgnoreEnvironmentFlag ? NULL : getenv(s))
33
+
34
+ #ifdef __cplusplus
35
+ }
36
+ #endif
37
+ #endif /* !Py_PYDEBUG_H */
38
+ #endif /* Py_LIMITED_API */
evalkit_internvl/include/python3.10/cpython/pyfpe.h ADDED
@@ -0,0 +1,15 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ #ifndef Py_PYFPE_H
2
+ #define Py_PYFPE_H
3
+ /* Header excluded from the stable API */
4
+ #ifndef Py_LIMITED_API
5
+
6
+ /* These macros used to do something when Python was built with --with-fpectl,
7
+ * but support for that was dropped in 3.7. We continue to define them though,
8
+ * to avoid breaking API users.
9
+ */
10
+
11
+ #define PyFPE_START_PROTECT(err_string, leave_stmt)
12
+ #define PyFPE_END_PROTECT(v)
13
+
14
+ #endif /* !defined(Py_LIMITED_API) */
15
+ #endif /* !Py_PYFPE_H */
evalkit_internvl/include/python3.10/cpython/pymem.h ADDED
@@ -0,0 +1,98 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ #ifndef Py_CPYTHON_PYMEM_H
2
+ # error "this header file must not be included directly"
3
+ #endif
4
+
5
+ PyAPI_FUNC(void *) PyMem_RawMalloc(size_t size);
6
+ PyAPI_FUNC(void *) PyMem_RawCalloc(size_t nelem, size_t elsize);
7
+ PyAPI_FUNC(void *) PyMem_RawRealloc(void *ptr, size_t new_size);
8
+ PyAPI_FUNC(void) PyMem_RawFree(void *ptr);
9
+
10
+ /* Try to get the allocators name set by _PyMem_SetupAllocators(). */
11
+ PyAPI_FUNC(const char*) _PyMem_GetCurrentAllocatorName(void);
12
+
13
+ /* strdup() using PyMem_RawMalloc() */
14
+ PyAPI_FUNC(char *) _PyMem_RawStrdup(const char *str);
15
+
16
+ /* strdup() using PyMem_Malloc() */
17
+ PyAPI_FUNC(char *) _PyMem_Strdup(const char *str);
18
+
19
+ /* wcsdup() using PyMem_RawMalloc() */
20
+ PyAPI_FUNC(wchar_t*) _PyMem_RawWcsdup(const wchar_t *str);
21
+
22
+
23
+ typedef enum {
24
+ /* PyMem_RawMalloc(), PyMem_RawRealloc() and PyMem_RawFree() */
25
+ PYMEM_DOMAIN_RAW,
26
+
27
+ /* PyMem_Malloc(), PyMem_Realloc() and PyMem_Free() */
28
+ PYMEM_DOMAIN_MEM,
29
+
30
+ /* PyObject_Malloc(), PyObject_Realloc() and PyObject_Free() */
31
+ PYMEM_DOMAIN_OBJ
32
+ } PyMemAllocatorDomain;
33
+
34
+ typedef enum {
35
+ PYMEM_ALLOCATOR_NOT_SET = 0,
36
+ PYMEM_ALLOCATOR_DEFAULT = 1,
37
+ PYMEM_ALLOCATOR_DEBUG = 2,
38
+ PYMEM_ALLOCATOR_MALLOC = 3,
39
+ PYMEM_ALLOCATOR_MALLOC_DEBUG = 4,
40
+ #ifdef WITH_PYMALLOC
41
+ PYMEM_ALLOCATOR_PYMALLOC = 5,
42
+ PYMEM_ALLOCATOR_PYMALLOC_DEBUG = 6,
43
+ #endif
44
+ } PyMemAllocatorName;
45
+
46
+
47
+ typedef struct {
48
+ /* user context passed as the first argument to the 4 functions */
49
+ void *ctx;
50
+
51
+ /* allocate a memory block */
52
+ void* (*malloc) (void *ctx, size_t size);
53
+
54
+ /* allocate a memory block initialized by zeros */
55
+ void* (*calloc) (void *ctx, size_t nelem, size_t elsize);
56
+
57
+ /* allocate or resize a memory block */
58
+ void* (*realloc) (void *ctx, void *ptr, size_t new_size);
59
+
60
+ /* release a memory block */
61
+ void (*free) (void *ctx, void *ptr);
62
+ } PyMemAllocatorEx;
63
+
64
+ /* Get the memory block allocator of the specified domain. */
65
+ PyAPI_FUNC(void) PyMem_GetAllocator(PyMemAllocatorDomain domain,
66
+ PyMemAllocatorEx *allocator);
67
+
68
+ /* Set the memory block allocator of the specified domain.
69
+
70
+ The new allocator must return a distinct non-NULL pointer when requesting
71
+ zero bytes.
72
+
73
+ For the PYMEM_DOMAIN_RAW domain, the allocator must be thread-safe: the GIL
74
+ is not held when the allocator is called.
75
+
76
+ If the new allocator is not a hook (don't call the previous allocator), the
77
+ PyMem_SetupDebugHooks() function must be called to reinstall the debug hooks
78
+ on top on the new allocator. */
79
+ PyAPI_FUNC(void) PyMem_SetAllocator(PyMemAllocatorDomain domain,
80
+ PyMemAllocatorEx *allocator);
81
+
82
+ /* Setup hooks to detect bugs in the following Python memory allocator
83
+ functions:
84
+
85
+ - PyMem_RawMalloc(), PyMem_RawRealloc(), PyMem_RawFree()
86
+ - PyMem_Malloc(), PyMem_Realloc(), PyMem_Free()
87
+ - PyObject_Malloc(), PyObject_Realloc() and PyObject_Free()
88
+
89
+ Newly allocated memory is filled with the byte 0xCB, freed memory is filled
90
+ with the byte 0xDB. Additional checks:
91
+
92
+ - detect API violations, ex: PyObject_Free() called on a buffer allocated
93
+ by PyMem_Malloc()
94
+ - detect write before the start of the buffer (buffer underflow)
95
+ - detect write after the end of the buffer (buffer overflow)
96
+
97
+ The function does nothing if Python is not compiled is debug mode. */
98
+ PyAPI_FUNC(void) PyMem_SetupDebugHooks(void);
evalkit_internvl/include/python3.10/cpython/sysmodule.h ADDED
@@ -0,0 +1,16 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ #ifndef Py_CPYTHON_SYSMODULE_H
2
+ # error "this header file must not be included directly"
3
+ #endif
4
+
5
+ PyAPI_FUNC(PyObject *) _PySys_GetObjectId(_Py_Identifier *key);
6
+ PyAPI_FUNC(int) _PySys_SetObjectId(_Py_Identifier *key, PyObject *);
7
+
8
+ PyAPI_FUNC(size_t) _PySys_GetSizeOf(PyObject *);
9
+
10
+ typedef int(*Py_AuditHookFunction)(const char *, PyObject *, void *);
11
+
12
+ PyAPI_FUNC(int) PySys_Audit(
13
+ const char *event,
14
+ const char *argFormat,
15
+ ...);
16
+ PyAPI_FUNC(int) PySys_AddAuditHook(Py_AuditHookFunction, void*);
evalkit_internvl/include/python3.10/cpython/unicodeobject.h ADDED
@@ -0,0 +1,1169 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ #ifndef Py_CPYTHON_UNICODEOBJECT_H
2
+ # error "this header file must not be included directly"
3
+ #endif
4
+
5
+ /* Py_UNICODE was the native Unicode storage format (code unit) used by
6
+ Python and represents a single Unicode element in the Unicode type.
7
+ With PEP 393, Py_UNICODE is deprecated and replaced with a
8
+ typedef to wchar_t. */
9
+ #define PY_UNICODE_TYPE wchar_t
10
+ /* Py_DEPRECATED(3.3) */ typedef wchar_t Py_UNICODE;
11
+
12
+ /* --- Internal Unicode Operations ---------------------------------------- */
13
+
14
+ #ifndef USE_UNICODE_WCHAR_CACHE
15
+ # define USE_UNICODE_WCHAR_CACHE 1
16
+ #endif /* USE_UNICODE_WCHAR_CACHE */
17
+
18
+ /* Since splitting on whitespace is an important use case, and
19
+ whitespace in most situations is solely ASCII whitespace, we
20
+ optimize for the common case by using a quick look-up table
21
+ _Py_ascii_whitespace (see below) with an inlined check.
22
+
23
+ */
24
+ #define Py_UNICODE_ISSPACE(ch) \
25
+ ((Py_UCS4)(ch) < 128U ? _Py_ascii_whitespace[(ch)] : _PyUnicode_IsWhitespace(ch))
26
+
27
+ #define Py_UNICODE_ISLOWER(ch) _PyUnicode_IsLowercase(ch)
28
+ #define Py_UNICODE_ISUPPER(ch) _PyUnicode_IsUppercase(ch)
29
+ #define Py_UNICODE_ISTITLE(ch) _PyUnicode_IsTitlecase(ch)
30
+ #define Py_UNICODE_ISLINEBREAK(ch) _PyUnicode_IsLinebreak(ch)
31
+
32
+ #define Py_UNICODE_TOLOWER(ch) _PyUnicode_ToLowercase(ch)
33
+ #define Py_UNICODE_TOUPPER(ch) _PyUnicode_ToUppercase(ch)
34
+ #define Py_UNICODE_TOTITLE(ch) _PyUnicode_ToTitlecase(ch)
35
+
36
+ #define Py_UNICODE_ISDECIMAL(ch) _PyUnicode_IsDecimalDigit(ch)
37
+ #define Py_UNICODE_ISDIGIT(ch) _PyUnicode_IsDigit(ch)
38
+ #define Py_UNICODE_ISNUMERIC(ch) _PyUnicode_IsNumeric(ch)
39
+ #define Py_UNICODE_ISPRINTABLE(ch) _PyUnicode_IsPrintable(ch)
40
+
41
+ #define Py_UNICODE_TODECIMAL(ch) _PyUnicode_ToDecimalDigit(ch)
42
+ #define Py_UNICODE_TODIGIT(ch) _PyUnicode_ToDigit(ch)
43
+ #define Py_UNICODE_TONUMERIC(ch) _PyUnicode_ToNumeric(ch)
44
+
45
+ #define Py_UNICODE_ISALPHA(ch) _PyUnicode_IsAlpha(ch)
46
+
47
+ #define Py_UNICODE_ISALNUM(ch) \
48
+ (Py_UNICODE_ISALPHA(ch) || \
49
+ Py_UNICODE_ISDECIMAL(ch) || \
50
+ Py_UNICODE_ISDIGIT(ch) || \
51
+ Py_UNICODE_ISNUMERIC(ch))
52
+
53
+ Py_DEPRECATED(3.3) static inline void
54
+ Py_UNICODE_COPY(Py_UNICODE *target, const Py_UNICODE *source, Py_ssize_t length) {
55
+ memcpy(target, source, (size_t)(length) * sizeof(Py_UNICODE));
56
+ }
57
+
58
+ Py_DEPRECATED(3.3) static inline void
59
+ Py_UNICODE_FILL(Py_UNICODE *target, Py_UNICODE value, Py_ssize_t length) {
60
+ Py_ssize_t i;
61
+ for (i = 0; i < length; i++) {
62
+ target[i] = value;
63
+ }
64
+ }
65
+
66
+ /* macros to work with surrogates */
67
+ #define Py_UNICODE_IS_SURROGATE(ch) (0xD800 <= (ch) && (ch) <= 0xDFFF)
68
+ #define Py_UNICODE_IS_HIGH_SURROGATE(ch) (0xD800 <= (ch) && (ch) <= 0xDBFF)
69
+ #define Py_UNICODE_IS_LOW_SURROGATE(ch) (0xDC00 <= (ch) && (ch) <= 0xDFFF)
70
+ /* Join two surrogate characters and return a single Py_UCS4 value. */
71
+ #define Py_UNICODE_JOIN_SURROGATES(high, low) \
72
+ (((((Py_UCS4)(high) & 0x03FF) << 10) | \
73
+ ((Py_UCS4)(low) & 0x03FF)) + 0x10000)
74
+ /* high surrogate = top 10 bits added to D800 */
75
+ #define Py_UNICODE_HIGH_SURROGATE(ch) (0xD800 - (0x10000 >> 10) + ((ch) >> 10))
76
+ /* low surrogate = bottom 10 bits added to DC00 */
77
+ #define Py_UNICODE_LOW_SURROGATE(ch) (0xDC00 + ((ch) & 0x3FF))
78
+
79
+ /* --- Unicode Type ------------------------------------------------------- */
80
+
81
+ /* ASCII-only strings created through PyUnicode_New use the PyASCIIObject
82
+ structure. state.ascii and state.compact are set, and the data
83
+ immediately follow the structure. utf8_length and wstr_length can be found
84
+ in the length field; the utf8 pointer is equal to the data pointer. */
85
+ typedef struct {
86
+ /* There are 4 forms of Unicode strings:
87
+
88
+ - compact ascii:
89
+
90
+ * structure = PyASCIIObject
91
+ * test: PyUnicode_IS_COMPACT_ASCII(op)
92
+ * kind = PyUnicode_1BYTE_KIND
93
+ * compact = 1
94
+ * ascii = 1
95
+ * ready = 1
96
+ * (length is the length of the utf8 and wstr strings)
97
+ * (data starts just after the structure)
98
+ * (since ASCII is decoded from UTF-8, the utf8 string are the data)
99
+
100
+ - compact:
101
+
102
+ * structure = PyCompactUnicodeObject
103
+ * test: PyUnicode_IS_COMPACT(op) && !PyUnicode_IS_ASCII(op)
104
+ * kind = PyUnicode_1BYTE_KIND, PyUnicode_2BYTE_KIND or
105
+ PyUnicode_4BYTE_KIND
106
+ * compact = 1
107
+ * ready = 1
108
+ * ascii = 0
109
+ * utf8 is not shared with data
110
+ * utf8_length = 0 if utf8 is NULL
111
+ * wstr is shared with data and wstr_length=length
112
+ if kind=PyUnicode_2BYTE_KIND and sizeof(wchar_t)=2
113
+ or if kind=PyUnicode_4BYTE_KIND and sizeof(wchar_t)=4
114
+ * wstr_length = 0 if wstr is NULL
115
+ * (data starts just after the structure)
116
+
117
+ - legacy string, not ready:
118
+
119
+ * structure = PyUnicodeObject
120
+ * test: kind == PyUnicode_WCHAR_KIND
121
+ * length = 0 (use wstr_length)
122
+ * hash = -1
123
+ * kind = PyUnicode_WCHAR_KIND
124
+ * compact = 0
125
+ * ascii = 0
126
+ * ready = 0
127
+ * interned = SSTATE_NOT_INTERNED
128
+ * wstr is not NULL
129
+ * data.any is NULL
130
+ * utf8 is NULL
131
+ * utf8_length = 0
132
+
133
+ - legacy string, ready:
134
+
135
+ * structure = PyUnicodeObject structure
136
+ * test: !PyUnicode_IS_COMPACT(op) && kind != PyUnicode_WCHAR_KIND
137
+ * kind = PyUnicode_1BYTE_KIND, PyUnicode_2BYTE_KIND or
138
+ PyUnicode_4BYTE_KIND
139
+ * compact = 0
140
+ * ready = 1
141
+ * data.any is not NULL
142
+ * utf8 is shared and utf8_length = length with data.any if ascii = 1
143
+ * utf8_length = 0 if utf8 is NULL
144
+ * wstr is shared with data.any and wstr_length = length
145
+ if kind=PyUnicode_2BYTE_KIND and sizeof(wchar_t)=2
146
+ or if kind=PyUnicode_4BYTE_KIND and sizeof(wchar_4)=4
147
+ * wstr_length = 0 if wstr is NULL
148
+
149
+ Compact strings use only one memory block (structure + characters),
150
+ whereas legacy strings use one block for the structure and one block
151
+ for characters.
152
+
153
+ Legacy strings are created by PyUnicode_FromUnicode() and
154
+ PyUnicode_FromStringAndSize(NULL, size) functions. They become ready
155
+ when PyUnicode_READY() is called.
156
+
157
+ See also _PyUnicode_CheckConsistency().
158
+ */
159
+ PyObject_HEAD
160
+ Py_ssize_t length; /* Number of code points in the string */
161
+ Py_hash_t hash; /* Hash value; -1 if not set */
162
+ struct {
163
+ /*
164
+ SSTATE_NOT_INTERNED (0)
165
+ SSTATE_INTERNED_MORTAL (1)
166
+ SSTATE_INTERNED_IMMORTAL (2)
167
+
168
+ If interned != SSTATE_NOT_INTERNED, the two references from the
169
+ dictionary to this object are *not* counted in ob_refcnt.
170
+ */
171
+ unsigned int interned:2;
172
+ /* Character size:
173
+
174
+ - PyUnicode_WCHAR_KIND (0):
175
+
176
+ * character type = wchar_t (16 or 32 bits, depending on the
177
+ platform)
178
+
179
+ - PyUnicode_1BYTE_KIND (1):
180
+
181
+ * character type = Py_UCS1 (8 bits, unsigned)
182
+ * all characters are in the range U+0000-U+00FF (latin1)
183
+ * if ascii is set, all characters are in the range U+0000-U+007F
184
+ (ASCII), otherwise at least one character is in the range
185
+ U+0080-U+00FF
186
+
187
+ - PyUnicode_2BYTE_KIND (2):
188
+
189
+ * character type = Py_UCS2 (16 bits, unsigned)
190
+ * all characters are in the range U+0000-U+FFFF (BMP)
191
+ * at least one character is in the range U+0100-U+FFFF
192
+
193
+ - PyUnicode_4BYTE_KIND (4):
194
+
195
+ * character type = Py_UCS4 (32 bits, unsigned)
196
+ * all characters are in the range U+0000-U+10FFFF
197
+ * at least one character is in the range U+10000-U+10FFFF
198
+ */
199
+ unsigned int kind:3;
200
+ /* Compact is with respect to the allocation scheme. Compact unicode
201
+ objects only require one memory block while non-compact objects use
202
+ one block for the PyUnicodeObject struct and another for its data
203
+ buffer. */
204
+ unsigned int compact:1;
205
+ /* The string only contains characters in the range U+0000-U+007F (ASCII)
206
+ and the kind is PyUnicode_1BYTE_KIND. If ascii is set and compact is
207
+ set, use the PyASCIIObject structure. */
208
+ unsigned int ascii:1;
209
+ /* The ready flag indicates whether the object layout is initialized
210
+ completely. This means that this is either a compact object, or
211
+ the data pointer is filled out. The bit is redundant, and helps
212
+ to minimize the test in PyUnicode_IS_READY(). */
213
+ unsigned int ready:1;
214
+ /* Padding to ensure that PyUnicode_DATA() is always aligned to
215
+ 4 bytes (see issue #19537 on m68k). */
216
+ unsigned int :24;
217
+ } state;
218
+ wchar_t *wstr; /* wchar_t representation (null-terminated) */
219
+ } PyASCIIObject;
220
+
221
+ /* Non-ASCII strings allocated through PyUnicode_New use the
222
+ PyCompactUnicodeObject structure. state.compact is set, and the data
223
+ immediately follow the structure. */
224
+ typedef struct {
225
+ PyASCIIObject _base;
226
+ Py_ssize_t utf8_length; /* Number of bytes in utf8, excluding the
227
+ * terminating \0. */
228
+ char *utf8; /* UTF-8 representation (null-terminated) */
229
+ Py_ssize_t wstr_length; /* Number of code points in wstr, possible
230
+ * surrogates count as two code points. */
231
+ } PyCompactUnicodeObject;
232
+
233
+ /* Strings allocated through PyUnicode_FromUnicode(NULL, len) use the
234
+ PyUnicodeObject structure. The actual string data is initially in the wstr
235
+ block, and copied into the data block using _PyUnicode_Ready. */
236
+ typedef struct {
237
+ PyCompactUnicodeObject _base;
238
+ union {
239
+ void *any;
240
+ Py_UCS1 *latin1;
241
+ Py_UCS2 *ucs2;
242
+ Py_UCS4 *ucs4;
243
+ } data; /* Canonical, smallest-form Unicode buffer */
244
+ } PyUnicodeObject;
245
+
246
+ PyAPI_FUNC(int) _PyUnicode_CheckConsistency(
247
+ PyObject *op,
248
+ int check_content);
249
+
250
+ /* Fast access macros */
251
+
252
+ /* Returns the deprecated Py_UNICODE representation's size in code units
253
+ (this includes surrogate pairs as 2 units).
254
+ If the Py_UNICODE representation is not available, it will be computed
255
+ on request. Use PyUnicode_GET_LENGTH() for the length in code points. */
256
+
257
+ /* Py_DEPRECATED(3.3) */
258
+ #define PyUnicode_GET_SIZE(op) \
259
+ (assert(PyUnicode_Check(op)), \
260
+ (((PyASCIIObject *)(op))->wstr) ? \
261
+ PyUnicode_WSTR_LENGTH(op) : \
262
+ ((void)PyUnicode_AsUnicode(_PyObject_CAST(op)),\
263
+ assert(((PyASCIIObject *)(op))->wstr), \
264
+ PyUnicode_WSTR_LENGTH(op)))
265
+
266
+ /* Py_DEPRECATED(3.3) */
267
+ #define PyUnicode_GET_DATA_SIZE(op) \
268
+ (PyUnicode_GET_SIZE(op) * Py_UNICODE_SIZE)
269
+
270
+ /* Alias for PyUnicode_AsUnicode(). This will create a wchar_t/Py_UNICODE
271
+ representation on demand. Using this macro is very inefficient now,
272
+ try to port your code to use the new PyUnicode_*BYTE_DATA() macros or
273
+ use PyUnicode_WRITE() and PyUnicode_READ(). */
274
+
275
+ /* Py_DEPRECATED(3.3) */
276
+ #define PyUnicode_AS_UNICODE(op) \
277
+ (assert(PyUnicode_Check(op)), \
278
+ (((PyASCIIObject *)(op))->wstr) ? (((PyASCIIObject *)(op))->wstr) : \
279
+ PyUnicode_AsUnicode(_PyObject_CAST(op)))
280
+
281
+ /* Py_DEPRECATED(3.3) */
282
+ #define PyUnicode_AS_DATA(op) \
283
+ ((const char *)(PyUnicode_AS_UNICODE(op)))
284
+
285
+
286
+ /* --- Flexible String Representation Helper Macros (PEP 393) -------------- */
287
+
288
+ /* Values for PyASCIIObject.state: */
289
+
290
+ /* Interning state. */
291
+ #define SSTATE_NOT_INTERNED 0
292
+ #define SSTATE_INTERNED_MORTAL 1
293
+ #define SSTATE_INTERNED_IMMORTAL 2
294
+
295
+ /* Return true if the string contains only ASCII characters, or 0 if not. The
296
+ string may be compact (PyUnicode_IS_COMPACT_ASCII) or not, but must be
297
+ ready. */
298
+ #define PyUnicode_IS_ASCII(op) \
299
+ (assert(PyUnicode_Check(op)), \
300
+ assert(PyUnicode_IS_READY(op)), \
301
+ ((PyASCIIObject*)op)->state.ascii)
302
+
303
+ /* Return true if the string is compact or 0 if not.
304
+ No type checks or Ready calls are performed. */
305
+ #define PyUnicode_IS_COMPACT(op) \
306
+ (((PyASCIIObject*)(op))->state.compact)
307
+
308
+ /* Return true if the string is a compact ASCII string (use PyASCIIObject
309
+ structure), or 0 if not. No type checks or Ready calls are performed. */
310
+ #define PyUnicode_IS_COMPACT_ASCII(op) \
311
+ (((PyASCIIObject*)op)->state.ascii && PyUnicode_IS_COMPACT(op))
312
+
313
+ enum PyUnicode_Kind {
314
+ /* String contains only wstr byte characters. This is only possible
315
+ when the string was created with a legacy API and _PyUnicode_Ready()
316
+ has not been called yet. */
317
+ PyUnicode_WCHAR_KIND = 0,
318
+ /* Return values of the PyUnicode_KIND() macro: */
319
+ PyUnicode_1BYTE_KIND = 1,
320
+ PyUnicode_2BYTE_KIND = 2,
321
+ PyUnicode_4BYTE_KIND = 4
322
+ };
323
+
324
+ /* Return pointers to the canonical representation cast to unsigned char,
325
+ Py_UCS2, or Py_UCS4 for direct character access.
326
+ No checks are performed, use PyUnicode_KIND() before to ensure
327
+ these will work correctly. */
328
+
329
+ #define PyUnicode_1BYTE_DATA(op) ((Py_UCS1*)PyUnicode_DATA(op))
330
+ #define PyUnicode_2BYTE_DATA(op) ((Py_UCS2*)PyUnicode_DATA(op))
331
+ #define PyUnicode_4BYTE_DATA(op) ((Py_UCS4*)PyUnicode_DATA(op))
332
+
333
+ /* Return one of the PyUnicode_*_KIND values defined above. */
334
+ #define PyUnicode_KIND(op) \
335
+ (assert(PyUnicode_Check(op)), \
336
+ assert(PyUnicode_IS_READY(op)), \
337
+ ((PyASCIIObject *)(op))->state.kind)
338
+
339
+ /* Return a void pointer to the raw unicode buffer. */
340
+ #define _PyUnicode_COMPACT_DATA(op) \
341
+ (PyUnicode_IS_ASCII(op) ? \
342
+ ((void*)((PyASCIIObject*)(op) + 1)) : \
343
+ ((void*)((PyCompactUnicodeObject*)(op) + 1)))
344
+
345
+ #define _PyUnicode_NONCOMPACT_DATA(op) \
346
+ (assert(((PyUnicodeObject*)(op))->data.any), \
347
+ ((((PyUnicodeObject *)(op))->data.any)))
348
+
349
+ #define PyUnicode_DATA(op) \
350
+ (assert(PyUnicode_Check(op)), \
351
+ PyUnicode_IS_COMPACT(op) ? _PyUnicode_COMPACT_DATA(op) : \
352
+ _PyUnicode_NONCOMPACT_DATA(op))
353
+
354
+ /* In the access macros below, "kind" may be evaluated more than once.
355
+ All other macro parameters are evaluated exactly once, so it is safe
356
+ to put side effects into them (such as increasing the index). */
357
+
358
+ /* Write into the canonical representation, this macro does not do any sanity
359
+ checks and is intended for usage in loops. The caller should cache the
360
+ kind and data pointers obtained from other macro calls.
361
+ index is the index in the string (starts at 0) and value is the new
362
+ code point value which should be written to that location. */
363
+ #define PyUnicode_WRITE(kind, data, index, value) \
364
+ do { \
365
+ switch ((kind)) { \
366
+ case PyUnicode_1BYTE_KIND: { \
367
+ ((Py_UCS1 *)(data))[(index)] = (Py_UCS1)(value); \
368
+ break; \
369
+ } \
370
+ case PyUnicode_2BYTE_KIND: { \
371
+ ((Py_UCS2 *)(data))[(index)] = (Py_UCS2)(value); \
372
+ break; \
373
+ } \
374
+ default: { \
375
+ assert((kind) == PyUnicode_4BYTE_KIND); \
376
+ ((Py_UCS4 *)(data))[(index)] = (Py_UCS4)(value); \
377
+ } \
378
+ } \
379
+ } while (0)
380
+
381
+ /* Read a code point from the string's canonical representation. No checks
382
+ or ready calls are performed. */
383
+ #define PyUnicode_READ(kind, data, index) \
384
+ ((Py_UCS4) \
385
+ ((kind) == PyUnicode_1BYTE_KIND ? \
386
+ ((const Py_UCS1 *)(data))[(index)] : \
387
+ ((kind) == PyUnicode_2BYTE_KIND ? \
388
+ ((const Py_UCS2 *)(data))[(index)] : \
389
+ ((const Py_UCS4 *)(data))[(index)] \
390
+ ) \
391
+ ))
392
+
393
+ /* PyUnicode_READ_CHAR() is less efficient than PyUnicode_READ() because it
394
+ calls PyUnicode_KIND() and might call it twice. For single reads, use
395
+ PyUnicode_READ_CHAR, for multiple consecutive reads callers should
396
+ cache kind and use PyUnicode_READ instead. */
397
+ #define PyUnicode_READ_CHAR(unicode, index) \
398
+ (assert(PyUnicode_Check(unicode)), \
399
+ assert(PyUnicode_IS_READY(unicode)), \
400
+ (Py_UCS4) \
401
+ (PyUnicode_KIND((unicode)) == PyUnicode_1BYTE_KIND ? \
402
+ ((const Py_UCS1 *)(PyUnicode_DATA((unicode))))[(index)] : \
403
+ (PyUnicode_KIND((unicode)) == PyUnicode_2BYTE_KIND ? \
404
+ ((const Py_UCS2 *)(PyUnicode_DATA((unicode))))[(index)] : \
405
+ ((const Py_UCS4 *)(PyUnicode_DATA((unicode))))[(index)] \
406
+ ) \
407
+ ))
408
+
409
+ /* Returns the length of the unicode string. The caller has to make sure that
410
+ the string has it's canonical representation set before calling
411
+ this macro. Call PyUnicode_(FAST_)Ready to ensure that. */
412
+ #define PyUnicode_GET_LENGTH(op) \
413
+ (assert(PyUnicode_Check(op)), \
414
+ assert(PyUnicode_IS_READY(op)), \
415
+ ((PyASCIIObject *)(op))->length)
416
+
417
+
418
+ /* Fast check to determine whether an object is ready. Equivalent to
419
+ PyUnicode_IS_COMPACT(op) || ((PyUnicodeObject*)(op))->data.any */
420
+
421
+ #define PyUnicode_IS_READY(op) (((PyASCIIObject*)op)->state.ready)
422
+
423
+ /* PyUnicode_READY() does less work than _PyUnicode_Ready() in the best
424
+ case. If the canonical representation is not yet set, it will still call
425
+ _PyUnicode_Ready().
426
+ Returns 0 on success and -1 on errors. */
427
+ #define PyUnicode_READY(op) \
428
+ (assert(PyUnicode_Check(op)), \
429
+ (PyUnicode_IS_READY(op) ? \
430
+ 0 : _PyUnicode_Ready(_PyObject_CAST(op))))
431
+
432
+ /* Return a maximum character value which is suitable for creating another
433
+ string based on op. This is always an approximation but more efficient
434
+ than iterating over the string. */
435
+ #define PyUnicode_MAX_CHAR_VALUE(op) \
436
+ (assert(PyUnicode_IS_READY(op)), \
437
+ (PyUnicode_IS_ASCII(op) ? \
438
+ (0x7f) : \
439
+ (PyUnicode_KIND(op) == PyUnicode_1BYTE_KIND ? \
440
+ (0xffU) : \
441
+ (PyUnicode_KIND(op) == PyUnicode_2BYTE_KIND ? \
442
+ (0xffffU) : \
443
+ (0x10ffffU)))))
444
+
445
+ Py_DEPRECATED(3.3)
446
+ static inline Py_ssize_t _PyUnicode_get_wstr_length(PyObject *op) {
447
+ return PyUnicode_IS_COMPACT_ASCII(op) ?
448
+ ((PyASCIIObject*)op)->length :
449
+ ((PyCompactUnicodeObject*)op)->wstr_length;
450
+ }
451
+ #define PyUnicode_WSTR_LENGTH(op) _PyUnicode_get_wstr_length((PyObject*)op)
452
+
453
+ /* === Public API ========================================================= */
454
+
455
+ /* --- Plain Py_UNICODE --------------------------------------------------- */
456
+
457
+ /* With PEP 393, this is the recommended way to allocate a new unicode object.
458
+ This function will allocate the object and its buffer in a single memory
459
+ block. Objects created using this function are not resizable. */
460
+ PyAPI_FUNC(PyObject*) PyUnicode_New(
461
+ Py_ssize_t size, /* Number of code points in the new string */
462
+ Py_UCS4 maxchar /* maximum code point value in the string */
463
+ );
464
+
465
+ /* Initializes the canonical string representation from the deprecated
466
+ wstr/Py_UNICODE representation. This function is used to convert Unicode
467
+ objects which were created using the old API to the new flexible format
468
+ introduced with PEP 393.
469
+
470
+ Don't call this function directly, use the public PyUnicode_READY() macro
471
+ instead. */
472
+ PyAPI_FUNC(int) _PyUnicode_Ready(
473
+ PyObject *unicode /* Unicode object */
474
+ );
475
+
476
+ /* Get a copy of a Unicode string. */
477
+ PyAPI_FUNC(PyObject*) _PyUnicode_Copy(
478
+ PyObject *unicode
479
+ );
480
+
481
+ /* Copy character from one unicode object into another, this function performs
482
+ character conversion when necessary and falls back to memcpy() if possible.
483
+
484
+ Fail if to is too small (smaller than *how_many* or smaller than
485
+ len(from)-from_start), or if kind(from[from_start:from_start+how_many]) >
486
+ kind(to), or if *to* has more than 1 reference.
487
+
488
+ Return the number of written character, or return -1 and raise an exception
489
+ on error.
490
+
491
+ Pseudo-code:
492
+
493
+ how_many = min(how_many, len(from) - from_start)
494
+ to[to_start:to_start+how_many] = from[from_start:from_start+how_many]
495
+ return how_many
496
+
497
+ Note: The function doesn't write a terminating null character.
498
+ */
499
+ PyAPI_FUNC(Py_ssize_t) PyUnicode_CopyCharacters(
500
+ PyObject *to,
501
+ Py_ssize_t to_start,
502
+ PyObject *from,
503
+ Py_ssize_t from_start,
504
+ Py_ssize_t how_many
505
+ );
506
+
507
+ /* Unsafe version of PyUnicode_CopyCharacters(): don't check arguments and so
508
+ may crash if parameters are invalid (e.g. if the output string
509
+ is too short). */
510
+ PyAPI_FUNC(void) _PyUnicode_FastCopyCharacters(
511
+ PyObject *to,
512
+ Py_ssize_t to_start,
513
+ PyObject *from,
514
+ Py_ssize_t from_start,
515
+ Py_ssize_t how_many
516
+ );
517
+
518
+ /* Fill a string with a character: write fill_char into
519
+ unicode[start:start+length].
520
+
521
+ Fail if fill_char is bigger than the string maximum character, or if the
522
+ string has more than 1 reference.
523
+
524
+ Return the number of written character, or return -1 and raise an exception
525
+ on error. */
526
+ PyAPI_FUNC(Py_ssize_t) PyUnicode_Fill(
527
+ PyObject *unicode,
528
+ Py_ssize_t start,
529
+ Py_ssize_t length,
530
+ Py_UCS4 fill_char
531
+ );
532
+
533
+ /* Unsafe version of PyUnicode_Fill(): don't check arguments and so may crash
534
+ if parameters are invalid (e.g. if length is longer than the string). */
535
+ PyAPI_FUNC(void) _PyUnicode_FastFill(
536
+ PyObject *unicode,
537
+ Py_ssize_t start,
538
+ Py_ssize_t length,
539
+ Py_UCS4 fill_char
540
+ );
541
+
542
+ /* Create a Unicode Object from the Py_UNICODE buffer u of the given
543
+ size.
544
+
545
+ u may be NULL which causes the contents to be undefined. It is the
546
+ user's responsibility to fill in the needed data afterwards. Note
547
+ that modifying the Unicode object contents after construction is
548
+ only allowed if u was set to NULL.
549
+
550
+ The buffer is copied into the new object. */
551
+ Py_DEPRECATED(3.3) PyAPI_FUNC(PyObject*) PyUnicode_FromUnicode(
552
+ const Py_UNICODE *u, /* Unicode buffer */
553
+ Py_ssize_t size /* size of buffer */
554
+ );
555
+
556
+ /* Create a new string from a buffer of Py_UCS1, Py_UCS2 or Py_UCS4 characters.
557
+ Scan the string to find the maximum character. */
558
+ PyAPI_FUNC(PyObject*) PyUnicode_FromKindAndData(
559
+ int kind,
560
+ const void *buffer,
561
+ Py_ssize_t size);
562
+
563
+ /* Create a new string from a buffer of ASCII characters.
564
+ WARNING: Don't check if the string contains any non-ASCII character. */
565
+ PyAPI_FUNC(PyObject*) _PyUnicode_FromASCII(
566
+ const char *buffer,
567
+ Py_ssize_t size);
568
+
569
+ /* Compute the maximum character of the substring unicode[start:end].
570
+ Return 127 for an empty string. */
571
+ PyAPI_FUNC(Py_UCS4) _PyUnicode_FindMaxChar (
572
+ PyObject *unicode,
573
+ Py_ssize_t start,
574
+ Py_ssize_t end);
575
+
576
+ /* Return a read-only pointer to the Unicode object's internal
577
+ Py_UNICODE buffer.
578
+ If the wchar_t/Py_UNICODE representation is not yet available, this
579
+ function will calculate it. */
580
+ Py_DEPRECATED(3.3) PyAPI_FUNC(Py_UNICODE *) PyUnicode_AsUnicode(
581
+ PyObject *unicode /* Unicode object */
582
+ );
583
+
584
+ /* Similar to PyUnicode_AsUnicode(), but raises a ValueError if the string
585
+ contains null characters. */
586
+ PyAPI_FUNC(const Py_UNICODE *) _PyUnicode_AsUnicode(
587
+ PyObject *unicode /* Unicode object */
588
+ );
589
+
590
+ /* Return a read-only pointer to the Unicode object's internal
591
+ Py_UNICODE buffer and save the length at size.
592
+ If the wchar_t/Py_UNICODE representation is not yet available, this
593
+ function will calculate it. */
594
+
595
+ Py_DEPRECATED(3.3) PyAPI_FUNC(Py_UNICODE *) PyUnicode_AsUnicodeAndSize(
596
+ PyObject *unicode, /* Unicode object */
597
+ Py_ssize_t *size /* location where to save the length */
598
+ );
599
+
600
+
601
+ /* --- _PyUnicodeWriter API ----------------------------------------------- */
602
+
603
+ typedef struct {
604
+ PyObject *buffer;
605
+ void *data;
606
+ enum PyUnicode_Kind kind;
607
+ Py_UCS4 maxchar;
608
+ Py_ssize_t size;
609
+ Py_ssize_t pos;
610
+
611
+ /* minimum number of allocated characters (default: 0) */
612
+ Py_ssize_t min_length;
613
+
614
+ /* minimum character (default: 127, ASCII) */
615
+ Py_UCS4 min_char;
616
+
617
+ /* If non-zero, overallocate the buffer (default: 0). */
618
+ unsigned char overallocate;
619
+
620
+ /* If readonly is 1, buffer is a shared string (cannot be modified)
621
+ and size is set to 0. */
622
+ unsigned char readonly;
623
+ } _PyUnicodeWriter ;
624
+
625
+ /* Initialize a Unicode writer.
626
+ *
627
+ * By default, the minimum buffer size is 0 character and overallocation is
628
+ * disabled. Set min_length, min_char and overallocate attributes to control
629
+ * the allocation of the buffer. */
630
+ PyAPI_FUNC(void)
631
+ _PyUnicodeWriter_Init(_PyUnicodeWriter *writer);
632
+
633
+ /* Prepare the buffer to write 'length' characters
634
+ with the specified maximum character.
635
+
636
+ Return 0 on success, raise an exception and return -1 on error. */
637
+ #define _PyUnicodeWriter_Prepare(WRITER, LENGTH, MAXCHAR) \
638
+ (((MAXCHAR) <= (WRITER)->maxchar \
639
+ && (LENGTH) <= (WRITER)->size - (WRITER)->pos) \
640
+ ? 0 \
641
+ : (((LENGTH) == 0) \
642
+ ? 0 \
643
+ : _PyUnicodeWriter_PrepareInternal((WRITER), (LENGTH), (MAXCHAR))))
644
+
645
+ /* Don't call this function directly, use the _PyUnicodeWriter_Prepare() macro
646
+ instead. */
647
+ PyAPI_FUNC(int)
648
+ _PyUnicodeWriter_PrepareInternal(_PyUnicodeWriter *writer,
649
+ Py_ssize_t length, Py_UCS4 maxchar);
650
+
651
+ /* Prepare the buffer to have at least the kind KIND.
652
+ For example, kind=PyUnicode_2BYTE_KIND ensures that the writer will
653
+ support characters in range U+000-U+FFFF.
654
+
655
+ Return 0 on success, raise an exception and return -1 on error. */
656
+ #define _PyUnicodeWriter_PrepareKind(WRITER, KIND) \
657
+ (assert((KIND) != PyUnicode_WCHAR_KIND), \
658
+ (KIND) <= (WRITER)->kind \
659
+ ? 0 \
660
+ : _PyUnicodeWriter_PrepareKindInternal((WRITER), (KIND)))
661
+
662
+ /* Don't call this function directly, use the _PyUnicodeWriter_PrepareKind()
663
+ macro instead. */
664
+ PyAPI_FUNC(int)
665
+ _PyUnicodeWriter_PrepareKindInternal(_PyUnicodeWriter *writer,
666
+ enum PyUnicode_Kind kind);
667
+
668
+ /* Append a Unicode character.
669
+ Return 0 on success, raise an exception and return -1 on error. */
670
+ PyAPI_FUNC(int)
671
+ _PyUnicodeWriter_WriteChar(_PyUnicodeWriter *writer,
672
+ Py_UCS4 ch
673
+ );
674
+
675
+ /* Append a Unicode string.
676
+ Return 0 on success, raise an exception and return -1 on error. */
677
+ PyAPI_FUNC(int)
678
+ _PyUnicodeWriter_WriteStr(_PyUnicodeWriter *writer,
679
+ PyObject *str /* Unicode string */
680
+ );
681
+
682
+ /* Append a substring of a Unicode string.
683
+ Return 0 on success, raise an exception and return -1 on error. */
684
+ PyAPI_FUNC(int)
685
+ _PyUnicodeWriter_WriteSubstring(_PyUnicodeWriter *writer,
686
+ PyObject *str, /* Unicode string */
687
+ Py_ssize_t start,
688
+ Py_ssize_t end
689
+ );
690
+
691
+ /* Append an ASCII-encoded byte string.
692
+ Return 0 on success, raise an exception and return -1 on error. */
693
+ PyAPI_FUNC(int)
694
+ _PyUnicodeWriter_WriteASCIIString(_PyUnicodeWriter *writer,
695
+ const char *str, /* ASCII-encoded byte string */
696
+ Py_ssize_t len /* number of bytes, or -1 if unknown */
697
+ );
698
+
699
+ /* Append a latin1-encoded byte string.
700
+ Return 0 on success, raise an exception and return -1 on error. */
701
+ PyAPI_FUNC(int)
702
+ _PyUnicodeWriter_WriteLatin1String(_PyUnicodeWriter *writer,
703
+ const char *str, /* latin1-encoded byte string */
704
+ Py_ssize_t len /* length in bytes */
705
+ );
706
+
707
+ /* Get the value of the writer as a Unicode string. Clear the
708
+ buffer of the writer. Raise an exception and return NULL
709
+ on error. */
710
+ PyAPI_FUNC(PyObject *)
711
+ _PyUnicodeWriter_Finish(_PyUnicodeWriter *writer);
712
+
713
+ /* Deallocate memory of a writer (clear its internal buffer). */
714
+ PyAPI_FUNC(void)
715
+ _PyUnicodeWriter_Dealloc(_PyUnicodeWriter *writer);
716
+
717
+
718
+ /* Format the object based on the format_spec, as defined in PEP 3101
719
+ (Advanced String Formatting). */
720
+ PyAPI_FUNC(int) _PyUnicode_FormatAdvancedWriter(
721
+ _PyUnicodeWriter *writer,
722
+ PyObject *obj,
723
+ PyObject *format_spec,
724
+ Py_ssize_t start,
725
+ Py_ssize_t end);
726
+
727
+ /* --- Manage the default encoding ---------------------------------------- */
728
+
729
+ /* Returns a pointer to the default encoding (UTF-8) of the
730
+ Unicode object unicode.
731
+
732
+ Like PyUnicode_AsUTF8AndSize(), this also caches the UTF-8 representation
733
+ in the unicodeobject.
734
+
735
+ _PyUnicode_AsString is a #define for PyUnicode_AsUTF8 to
736
+ support the previous internal function with the same behaviour.
737
+
738
+ Use of this API is DEPRECATED since no size information can be
739
+ extracted from the returned data.
740
+ */
741
+
742
+ PyAPI_FUNC(const char *) PyUnicode_AsUTF8(PyObject *unicode);
743
+
744
+ #define _PyUnicode_AsString PyUnicode_AsUTF8
745
+
746
+ /* --- Generic Codecs ----------------------------------------------------- */
747
+
748
+ /* Encodes a Py_UNICODE buffer of the given size and returns a
749
+ Python string object. */
750
+ Py_DEPRECATED(3.3) PyAPI_FUNC(PyObject*) PyUnicode_Encode(
751
+ const Py_UNICODE *s, /* Unicode char buffer */
752
+ Py_ssize_t size, /* number of Py_UNICODE chars to encode */
753
+ const char *encoding, /* encoding */
754
+ const char *errors /* error handling */
755
+ );
756
+
757
+ /* --- UTF-7 Codecs ------------------------------------------------------- */
758
+
759
+ Py_DEPRECATED(3.3) PyAPI_FUNC(PyObject*) PyUnicode_EncodeUTF7(
760
+ const Py_UNICODE *data, /* Unicode char buffer */
761
+ Py_ssize_t length, /* number of Py_UNICODE chars to encode */
762
+ int base64SetO, /* Encode RFC2152 Set O characters in base64 */
763
+ int base64WhiteSpace, /* Encode whitespace (sp, ht, nl, cr) in base64 */
764
+ const char *errors /* error handling */
765
+ );
766
+
767
+ PyAPI_FUNC(PyObject*) _PyUnicode_EncodeUTF7(
768
+ PyObject *unicode, /* Unicode object */
769
+ int base64SetO, /* Encode RFC2152 Set O characters in base64 */
770
+ int base64WhiteSpace, /* Encode whitespace (sp, ht, nl, cr) in base64 */
771
+ const char *errors /* error handling */
772
+ );
773
+
774
+ /* --- UTF-8 Codecs ------------------------------------------------------- */
775
+
776
+ PyAPI_FUNC(PyObject*) _PyUnicode_AsUTF8String(
777
+ PyObject *unicode,
778
+ const char *errors);
779
+
780
+ Py_DEPRECATED(3.3) PyAPI_FUNC(PyObject*) PyUnicode_EncodeUTF8(
781
+ const Py_UNICODE *data, /* Unicode char buffer */
782
+ Py_ssize_t length, /* number of Py_UNICODE chars to encode */
783
+ const char *errors /* error handling */
784
+ );
785
+
786
+ /* --- UTF-32 Codecs ------------------------------------------------------ */
787
+
788
+ Py_DEPRECATED(3.3) PyAPI_FUNC(PyObject*) PyUnicode_EncodeUTF32(
789
+ const Py_UNICODE *data, /* Unicode char buffer */
790
+ Py_ssize_t length, /* number of Py_UNICODE chars to encode */
791
+ const char *errors, /* error handling */
792
+ int byteorder /* byteorder to use 0=BOM+native;-1=LE,1=BE */
793
+ );
794
+
795
+ PyAPI_FUNC(PyObject*) _PyUnicode_EncodeUTF32(
796
+ PyObject *object, /* Unicode object */
797
+ const char *errors, /* error handling */
798
+ int byteorder /* byteorder to use 0=BOM+native;-1=LE,1=BE */
799
+ );
800
+
801
+ /* --- UTF-16 Codecs ------------------------------------------------------ */
802
+
803
+ /* Returns a Python string object holding the UTF-16 encoded value of
804
+ the Unicode data.
805
+
806
+ If byteorder is not 0, output is written according to the following
807
+ byte order:
808
+
809
+ byteorder == -1: little endian
810
+ byteorder == 0: native byte order (writes a BOM mark)
811
+ byteorder == 1: big endian
812
+
813
+ If byteorder is 0, the output string will always start with the
814
+ Unicode BOM mark (U+FEFF). In the other two modes, no BOM mark is
815
+ prepended.
816
+
817
+ Note that Py_UNICODE data is being interpreted as UTF-16 reduced to
818
+ UCS-2. This trick makes it possible to add full UTF-16 capabilities
819
+ at a later point without compromising the APIs.
820
+
821
+ */
822
+ Py_DEPRECATED(3.3) PyAPI_FUNC(PyObject*) PyUnicode_EncodeUTF16(
823
+ const Py_UNICODE *data, /* Unicode char buffer */
824
+ Py_ssize_t length, /* number of Py_UNICODE chars to encode */
825
+ const char *errors, /* error handling */
826
+ int byteorder /* byteorder to use 0=BOM+native;-1=LE,1=BE */
827
+ );
828
+
829
+ PyAPI_FUNC(PyObject*) _PyUnicode_EncodeUTF16(
830
+ PyObject* unicode, /* Unicode object */
831
+ const char *errors, /* error handling */
832
+ int byteorder /* byteorder to use 0=BOM+native;-1=LE,1=BE */
833
+ );
834
+
835
+ /* --- Unicode-Escape Codecs ---------------------------------------------- */
836
+
837
+ /* Variant of PyUnicode_DecodeUnicodeEscape that supports partial decoding. */
838
+ PyAPI_FUNC(PyObject*) _PyUnicode_DecodeUnicodeEscapeStateful(
839
+ const char *string, /* Unicode-Escape encoded string */
840
+ Py_ssize_t length, /* size of string */
841
+ const char *errors, /* error handling */
842
+ Py_ssize_t *consumed /* bytes consumed */
843
+ );
844
+
845
+ /* Helper for PyUnicode_DecodeUnicodeEscape that detects invalid escape
846
+ chars. */
847
+ PyAPI_FUNC(PyObject*) _PyUnicode_DecodeUnicodeEscapeInternal(
848
+ const char *string, /* Unicode-Escape encoded string */
849
+ Py_ssize_t length, /* size of string */
850
+ const char *errors, /* error handling */
851
+ Py_ssize_t *consumed, /* bytes consumed */
852
+ const char **first_invalid_escape /* on return, points to first
853
+ invalid escaped char in
854
+ string. */
855
+ );
856
+
857
+ Py_DEPRECATED(3.3) PyAPI_FUNC(PyObject*) PyUnicode_EncodeUnicodeEscape(
858
+ const Py_UNICODE *data, /* Unicode char buffer */
859
+ Py_ssize_t length /* Number of Py_UNICODE chars to encode */
860
+ );
861
+
862
+ /* --- Raw-Unicode-Escape Codecs ------------------------------------------ */
863
+
864
+ Py_DEPRECATED(3.3) PyAPI_FUNC(PyObject*) PyUnicode_EncodeRawUnicodeEscape(
865
+ const Py_UNICODE *data, /* Unicode char buffer */
866
+ Py_ssize_t length /* Number of Py_UNICODE chars to encode */
867
+ );
868
+
869
+ /* Variant of PyUnicode_DecodeRawUnicodeEscape that supports partial decoding. */
870
+ PyAPI_FUNC(PyObject*) _PyUnicode_DecodeRawUnicodeEscapeStateful(
871
+ const char *string, /* Unicode-Escape encoded string */
872
+ Py_ssize_t length, /* size of string */
873
+ const char *errors, /* error handling */
874
+ Py_ssize_t *consumed /* bytes consumed */
875
+ );
876
+
877
+ /* --- Latin-1 Codecs ----------------------------------------------------- */
878
+
879
+ PyAPI_FUNC(PyObject*) _PyUnicode_AsLatin1String(
880
+ PyObject* unicode,
881
+ const char* errors);
882
+
883
+ Py_DEPRECATED(3.3) PyAPI_FUNC(PyObject*) PyUnicode_EncodeLatin1(
884
+ const Py_UNICODE *data, /* Unicode char buffer */
885
+ Py_ssize_t length, /* Number of Py_UNICODE chars to encode */
886
+ const char *errors /* error handling */
887
+ );
888
+
889
+ /* --- ASCII Codecs ------------------------------------------------------- */
890
+
891
+ PyAPI_FUNC(PyObject*) _PyUnicode_AsASCIIString(
892
+ PyObject* unicode,
893
+ const char* errors);
894
+
895
+ Py_DEPRECATED(3.3) PyAPI_FUNC(PyObject*) PyUnicode_EncodeASCII(
896
+ const Py_UNICODE *data, /* Unicode char buffer */
897
+ Py_ssize_t length, /* Number of Py_UNICODE chars to encode */
898
+ const char *errors /* error handling */
899
+ );
900
+
901
+ /* --- Character Map Codecs ----------------------------------------------- */
902
+
903
+ Py_DEPRECATED(3.3) PyAPI_FUNC(PyObject*) PyUnicode_EncodeCharmap(
904
+ const Py_UNICODE *data, /* Unicode char buffer */
905
+ Py_ssize_t length, /* Number of Py_UNICODE chars to encode */
906
+ PyObject *mapping, /* encoding mapping */
907
+ const char *errors /* error handling */
908
+ );
909
+
910
+ PyAPI_FUNC(PyObject*) _PyUnicode_EncodeCharmap(
911
+ PyObject *unicode, /* Unicode object */
912
+ PyObject *mapping, /* encoding mapping */
913
+ const char *errors /* error handling */
914
+ );
915
+
916
+ /* Translate a Py_UNICODE buffer of the given length by applying a
917
+ character mapping table to it and return the resulting Unicode
918
+ object.
919
+
920
+ The mapping table must map Unicode ordinal integers to Unicode strings,
921
+ Unicode ordinal integers or None (causing deletion of the character).
922
+
923
+ Mapping tables may be dictionaries or sequences. Unmapped character
924
+ ordinals (ones which cause a LookupError) are left untouched and
925
+ are copied as-is.
926
+
927
+ */
928
+ Py_DEPRECATED(3.3) PyAPI_FUNC(PyObject *) PyUnicode_TranslateCharmap(
929
+ const Py_UNICODE *data, /* Unicode char buffer */
930
+ Py_ssize_t length, /* Number of Py_UNICODE chars to encode */
931
+ PyObject *table, /* Translate table */
932
+ const char *errors /* error handling */
933
+ );
934
+
935
+ /* --- MBCS codecs for Windows -------------------------------------------- */
936
+
937
+ #ifdef MS_WINDOWS
938
+ Py_DEPRECATED(3.3) PyAPI_FUNC(PyObject*) PyUnicode_EncodeMBCS(
939
+ const Py_UNICODE *data, /* Unicode char buffer */
940
+ Py_ssize_t length, /* number of Py_UNICODE chars to encode */
941
+ const char *errors /* error handling */
942
+ );
943
+ #endif
944
+
945
+ /* --- Decimal Encoder ---------------------------------------------------- */
946
+
947
+ /* Takes a Unicode string holding a decimal value and writes it into
948
+ an output buffer using standard ASCII digit codes.
949
+
950
+ The output buffer has to provide at least length+1 bytes of storage
951
+ area. The output string is 0-terminated.
952
+
953
+ The encoder converts whitespace to ' ', decimal characters to their
954
+ corresponding ASCII digit and all other Latin-1 characters except
955
+ \0 as-is. Characters outside this range (Unicode ordinals 1-256)
956
+ are treated as errors. This includes embedded NULL bytes.
957
+
958
+ Error handling is defined by the errors argument:
959
+
960
+ NULL or "strict": raise a ValueError
961
+ "ignore": ignore the wrong characters (these are not copied to the
962
+ output buffer)
963
+ "replace": replaces illegal characters with '?'
964
+
965
+ Returns 0 on success, -1 on failure.
966
+
967
+ */
968
+
969
+ Py_DEPRECATED(3.3) PyAPI_FUNC(int) PyUnicode_EncodeDecimal(
970
+ Py_UNICODE *s, /* Unicode buffer */
971
+ Py_ssize_t length, /* Number of Py_UNICODE chars to encode */
972
+ char *output, /* Output buffer; must have size >= length */
973
+ const char *errors /* error handling */
974
+ );
975
+
976
+ /* Transforms code points that have decimal digit property to the
977
+ corresponding ASCII digit code points.
978
+
979
+ Returns a new Unicode string on success, NULL on failure.
980
+ */
981
+
982
+ Py_DEPRECATED(3.3)
983
+ PyAPI_FUNC(PyObject*) PyUnicode_TransformDecimalToASCII(
984
+ Py_UNICODE *s, /* Unicode buffer */
985
+ Py_ssize_t length /* Number of Py_UNICODE chars to transform */
986
+ );
987
+
988
+ /* Coverts a Unicode object holding a decimal value to an ASCII string
989
+ for using in int, float and complex parsers.
990
+ Transforms code points that have decimal digit property to the
991
+ corresponding ASCII digit code points. Transforms spaces to ASCII.
992
+ Transforms code points starting from the first non-ASCII code point that
993
+ is neither a decimal digit nor a space to the end into '?'. */
994
+
995
+ PyAPI_FUNC(PyObject*) _PyUnicode_TransformDecimalAndSpaceToASCII(
996
+ PyObject *unicode /* Unicode object */
997
+ );
998
+
999
+ /* --- Methods & Slots ---------------------------------------------------- */
1000
+
1001
+ PyAPI_FUNC(PyObject *) _PyUnicode_JoinArray(
1002
+ PyObject *separator,
1003
+ PyObject *const *items,
1004
+ Py_ssize_t seqlen
1005
+ );
1006
+
1007
+ /* Test whether a unicode is equal to ASCII identifier. Return 1 if true,
1008
+ 0 otherwise. The right argument must be ASCII identifier.
1009
+ Any error occurs inside will be cleared before return. */
1010
+ PyAPI_FUNC(int) _PyUnicode_EqualToASCIIId(
1011
+ PyObject *left, /* Left string */
1012
+ _Py_Identifier *right /* Right identifier */
1013
+ );
1014
+
1015
+ /* Test whether a unicode is equal to ASCII string. Return 1 if true,
1016
+ 0 otherwise. The right argument must be ASCII-encoded string.
1017
+ Any error occurs inside will be cleared before return. */
1018
+ PyAPI_FUNC(int) _PyUnicode_EqualToASCIIString(
1019
+ PyObject *left,
1020
+ const char *right /* ASCII-encoded string */
1021
+ );
1022
+
1023
+ /* Externally visible for str.strip(unicode) */
1024
+ PyAPI_FUNC(PyObject *) _PyUnicode_XStrip(
1025
+ PyObject *self,
1026
+ int striptype,
1027
+ PyObject *sepobj
1028
+ );
1029
+
1030
+ /* Using explicit passed-in values, insert the thousands grouping
1031
+ into the string pointed to by buffer. For the argument descriptions,
1032
+ see Objects/stringlib/localeutil.h */
1033
+ PyAPI_FUNC(Py_ssize_t) _PyUnicode_InsertThousandsGrouping(
1034
+ _PyUnicodeWriter *writer,
1035
+ Py_ssize_t n_buffer,
1036
+ PyObject *digits,
1037
+ Py_ssize_t d_pos,
1038
+ Py_ssize_t n_digits,
1039
+ Py_ssize_t min_width,
1040
+ const char *grouping,
1041
+ PyObject *thousands_sep,
1042
+ Py_UCS4 *maxchar);
1043
+
1044
+ /* === Characters Type APIs =============================================== */
1045
+
1046
+ /* Helper array used by Py_UNICODE_ISSPACE(). */
1047
+
1048
+ PyAPI_DATA(const unsigned char) _Py_ascii_whitespace[];
1049
+
1050
+ /* These should not be used directly. Use the Py_UNICODE_IS* and
1051
+ Py_UNICODE_TO* macros instead.
1052
+
1053
+ These APIs are implemented in Objects/unicodectype.c.
1054
+
1055
+ */
1056
+
1057
+ PyAPI_FUNC(int) _PyUnicode_IsLowercase(
1058
+ Py_UCS4 ch /* Unicode character */
1059
+ );
1060
+
1061
+ PyAPI_FUNC(int) _PyUnicode_IsUppercase(
1062
+ Py_UCS4 ch /* Unicode character */
1063
+ );
1064
+
1065
+ PyAPI_FUNC(int) _PyUnicode_IsTitlecase(
1066
+ Py_UCS4 ch /* Unicode character */
1067
+ );
1068
+
1069
+ PyAPI_FUNC(int) _PyUnicode_IsXidStart(
1070
+ Py_UCS4 ch /* Unicode character */
1071
+ );
1072
+
1073
+ PyAPI_FUNC(int) _PyUnicode_IsXidContinue(
1074
+ Py_UCS4 ch /* Unicode character */
1075
+ );
1076
+
1077
+ PyAPI_FUNC(int) _PyUnicode_IsWhitespace(
1078
+ const Py_UCS4 ch /* Unicode character */
1079
+ );
1080
+
1081
+ PyAPI_FUNC(int) _PyUnicode_IsLinebreak(
1082
+ const Py_UCS4 ch /* Unicode character */
1083
+ );
1084
+
1085
+ /* Py_DEPRECATED(3.3) */ PyAPI_FUNC(Py_UCS4) _PyUnicode_ToLowercase(
1086
+ Py_UCS4 ch /* Unicode character */
1087
+ );
1088
+
1089
+ /* Py_DEPRECATED(3.3) */ PyAPI_FUNC(Py_UCS4) _PyUnicode_ToUppercase(
1090
+ Py_UCS4 ch /* Unicode character */
1091
+ );
1092
+
1093
+ Py_DEPRECATED(3.3) PyAPI_FUNC(Py_UCS4) _PyUnicode_ToTitlecase(
1094
+ Py_UCS4 ch /* Unicode character */
1095
+ );
1096
+
1097
+ PyAPI_FUNC(int) _PyUnicode_ToLowerFull(
1098
+ Py_UCS4 ch, /* Unicode character */
1099
+ Py_UCS4 *res
1100
+ );
1101
+
1102
+ PyAPI_FUNC(int) _PyUnicode_ToTitleFull(
1103
+ Py_UCS4 ch, /* Unicode character */
1104
+ Py_UCS4 *res
1105
+ );
1106
+
1107
+ PyAPI_FUNC(int) _PyUnicode_ToUpperFull(
1108
+ Py_UCS4 ch, /* Unicode character */
1109
+ Py_UCS4 *res
1110
+ );
1111
+
1112
+ PyAPI_FUNC(int) _PyUnicode_ToFoldedFull(
1113
+ Py_UCS4 ch, /* Unicode character */
1114
+ Py_UCS4 *res
1115
+ );
1116
+
1117
+ PyAPI_FUNC(int) _PyUnicode_IsCaseIgnorable(
1118
+ Py_UCS4 ch /* Unicode character */
1119
+ );
1120
+
1121
+ PyAPI_FUNC(int) _PyUnicode_IsCased(
1122
+ Py_UCS4 ch /* Unicode character */
1123
+ );
1124
+
1125
+ PyAPI_FUNC(int) _PyUnicode_ToDecimalDigit(
1126
+ Py_UCS4 ch /* Unicode character */
1127
+ );
1128
+
1129
+ PyAPI_FUNC(int) _PyUnicode_ToDigit(
1130
+ Py_UCS4 ch /* Unicode character */
1131
+ );
1132
+
1133
+ PyAPI_FUNC(double) _PyUnicode_ToNumeric(
1134
+ Py_UCS4 ch /* Unicode character */
1135
+ );
1136
+
1137
+ PyAPI_FUNC(int) _PyUnicode_IsDecimalDigit(
1138
+ Py_UCS4 ch /* Unicode character */
1139
+ );
1140
+
1141
+ PyAPI_FUNC(int) _PyUnicode_IsDigit(
1142
+ Py_UCS4 ch /* Unicode character */
1143
+ );
1144
+
1145
+ PyAPI_FUNC(int) _PyUnicode_IsNumeric(
1146
+ Py_UCS4 ch /* Unicode character */
1147
+ );
1148
+
1149
+ PyAPI_FUNC(int) _PyUnicode_IsPrintable(
1150
+ Py_UCS4 ch /* Unicode character */
1151
+ );
1152
+
1153
+ PyAPI_FUNC(int) _PyUnicode_IsAlpha(
1154
+ Py_UCS4 ch /* Unicode character */
1155
+ );
1156
+
1157
+ PyAPI_FUNC(PyObject*) _PyUnicode_FormatLong(PyObject *, int, int, int);
1158
+
1159
+ /* Return an interned Unicode object for an Identifier; may fail if there is no memory.*/
1160
+ PyAPI_FUNC(PyObject*) _PyUnicode_FromId(_Py_Identifier*);
1161
+
1162
+ /* Fast equality check when the inputs are known to be exact unicode types
1163
+ and where the hash values are equal (i.e. a very probable match) */
1164
+ PyAPI_FUNC(int) _PyUnicode_EQ(PyObject *, PyObject *);
1165
+
1166
+ PyAPI_FUNC(int) _PyUnicode_WideCharString_Converter(PyObject *, void *);
1167
+ PyAPI_FUNC(int) _PyUnicode_WideCharString_Opt_Converter(PyObject *, void *);
1168
+
1169
+ PyAPI_FUNC(Py_ssize_t) _PyUnicode_ScanIdentifier(PyObject *);
evalkit_internvl/include/python3.10/datetime.h ADDED
@@ -0,0 +1,267 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /* datetime.h
2
+ */
3
+ #ifndef Py_LIMITED_API
4
+ #ifndef DATETIME_H
5
+ #define DATETIME_H
6
+ #ifdef __cplusplus
7
+ extern "C" {
8
+ #endif
9
+
10
+ /* Fields are packed into successive bytes, each viewed as unsigned and
11
+ * big-endian, unless otherwise noted:
12
+ *
13
+ * byte offset
14
+ * 0 year 2 bytes, 1-9999
15
+ * 2 month 1 byte, 1-12
16
+ * 3 day 1 byte, 1-31
17
+ * 4 hour 1 byte, 0-23
18
+ * 5 minute 1 byte, 0-59
19
+ * 6 second 1 byte, 0-59
20
+ * 7 usecond 3 bytes, 0-999999
21
+ * 10
22
+ */
23
+
24
+ /* # of bytes for year, month, and day. */
25
+ #define _PyDateTime_DATE_DATASIZE 4
26
+
27
+ /* # of bytes for hour, minute, second, and usecond. */
28
+ #define _PyDateTime_TIME_DATASIZE 6
29
+
30
+ /* # of bytes for year, month, day, hour, minute, second, and usecond. */
31
+ #define _PyDateTime_DATETIME_DATASIZE 10
32
+
33
+
34
+ typedef struct
35
+ {
36
+ PyObject_HEAD
37
+ Py_hash_t hashcode; /* -1 when unknown */
38
+ int days; /* -MAX_DELTA_DAYS <= days <= MAX_DELTA_DAYS */
39
+ int seconds; /* 0 <= seconds < 24*3600 is invariant */
40
+ int microseconds; /* 0 <= microseconds < 1000000 is invariant */
41
+ } PyDateTime_Delta;
42
+
43
+ typedef struct
44
+ {
45
+ PyObject_HEAD /* a pure abstract base class */
46
+ } PyDateTime_TZInfo;
47
+
48
+
49
+ /* The datetime and time types have hashcodes, and an optional tzinfo member,
50
+ * present if and only if hastzinfo is true.
51
+ */
52
+ #define _PyTZINFO_HEAD \
53
+ PyObject_HEAD \
54
+ Py_hash_t hashcode; \
55
+ char hastzinfo; /* boolean flag */
56
+
57
+ /* No _PyDateTime_BaseTZInfo is allocated; it's just to have something
58
+ * convenient to cast to, when getting at the hastzinfo member of objects
59
+ * starting with _PyTZINFO_HEAD.
60
+ */
61
+ typedef struct
62
+ {
63
+ _PyTZINFO_HEAD
64
+ } _PyDateTime_BaseTZInfo;
65
+
66
+ /* All time objects are of PyDateTime_TimeType, but that can be allocated
67
+ * in two ways, with or without a tzinfo member. Without is the same as
68
+ * tzinfo == None, but consumes less memory. _PyDateTime_BaseTime is an
69
+ * internal struct used to allocate the right amount of space for the
70
+ * "without" case.
71
+ */
72
+ #define _PyDateTime_TIMEHEAD \
73
+ _PyTZINFO_HEAD \
74
+ unsigned char data[_PyDateTime_TIME_DATASIZE];
75
+
76
+ typedef struct
77
+ {
78
+ _PyDateTime_TIMEHEAD
79
+ } _PyDateTime_BaseTime; /* hastzinfo false */
80
+
81
+ typedef struct
82
+ {
83
+ _PyDateTime_TIMEHEAD
84
+ unsigned char fold;
85
+ PyObject *tzinfo;
86
+ } PyDateTime_Time; /* hastzinfo true */
87
+
88
+
89
+ /* All datetime objects are of PyDateTime_DateTimeType, but that can be
90
+ * allocated in two ways too, just like for time objects above. In addition,
91
+ * the plain date type is a base class for datetime, so it must also have
92
+ * a hastzinfo member (although it's unused there).
93
+ */
94
+ typedef struct
95
+ {
96
+ _PyTZINFO_HEAD
97
+ unsigned char data[_PyDateTime_DATE_DATASIZE];
98
+ } PyDateTime_Date;
99
+
100
+ #define _PyDateTime_DATETIMEHEAD \
101
+ _PyTZINFO_HEAD \
102
+ unsigned char data[_PyDateTime_DATETIME_DATASIZE];
103
+
104
+ typedef struct
105
+ {
106
+ _PyDateTime_DATETIMEHEAD
107
+ } _PyDateTime_BaseDateTime; /* hastzinfo false */
108
+
109
+ typedef struct
110
+ {
111
+ _PyDateTime_DATETIMEHEAD
112
+ unsigned char fold;
113
+ PyObject *tzinfo;
114
+ } PyDateTime_DateTime; /* hastzinfo true */
115
+
116
+
117
+ /* Apply for date and datetime instances. */
118
+
119
+ // o is a pointer to a time or a datetime object.
120
+ #define _PyDateTime_HAS_TZINFO(o) (((_PyDateTime_BaseTZInfo *)(o))->hastzinfo)
121
+
122
+ #define PyDateTime_GET_YEAR(o) ((((PyDateTime_Date*)o)->data[0] << 8) | \
123
+ ((PyDateTime_Date*)o)->data[1])
124
+ #define PyDateTime_GET_MONTH(o) (((PyDateTime_Date*)o)->data[2])
125
+ #define PyDateTime_GET_DAY(o) (((PyDateTime_Date*)o)->data[3])
126
+
127
+ #define PyDateTime_DATE_GET_HOUR(o) (((PyDateTime_DateTime*)o)->data[4])
128
+ #define PyDateTime_DATE_GET_MINUTE(o) (((PyDateTime_DateTime*)o)->data[5])
129
+ #define PyDateTime_DATE_GET_SECOND(o) (((PyDateTime_DateTime*)o)->data[6])
130
+ #define PyDateTime_DATE_GET_MICROSECOND(o) \
131
+ ((((PyDateTime_DateTime*)o)->data[7] << 16) | \
132
+ (((PyDateTime_DateTime*)o)->data[8] << 8) | \
133
+ ((PyDateTime_DateTime*)o)->data[9])
134
+ #define PyDateTime_DATE_GET_FOLD(o) (((PyDateTime_DateTime*)o)->fold)
135
+ #define PyDateTime_DATE_GET_TZINFO(o) (_PyDateTime_HAS_TZINFO(o) ? \
136
+ ((PyDateTime_DateTime *)(o))->tzinfo : Py_None)
137
+
138
+ /* Apply for time instances. */
139
+ #define PyDateTime_TIME_GET_HOUR(o) (((PyDateTime_Time*)o)->data[0])
140
+ #define PyDateTime_TIME_GET_MINUTE(o) (((PyDateTime_Time*)o)->data[1])
141
+ #define PyDateTime_TIME_GET_SECOND(o) (((PyDateTime_Time*)o)->data[2])
142
+ #define PyDateTime_TIME_GET_MICROSECOND(o) \
143
+ ((((PyDateTime_Time*)o)->data[3] << 16) | \
144
+ (((PyDateTime_Time*)o)->data[4] << 8) | \
145
+ ((PyDateTime_Time*)o)->data[5])
146
+ #define PyDateTime_TIME_GET_FOLD(o) (((PyDateTime_Time*)o)->fold)
147
+ #define PyDateTime_TIME_GET_TZINFO(o) (_PyDateTime_HAS_TZINFO(o) ? \
148
+ ((PyDateTime_Time *)(o))->tzinfo : Py_None)
149
+
150
+ /* Apply for time delta instances */
151
+ #define PyDateTime_DELTA_GET_DAYS(o) (((PyDateTime_Delta*)o)->days)
152
+ #define PyDateTime_DELTA_GET_SECONDS(o) (((PyDateTime_Delta*)o)->seconds)
153
+ #define PyDateTime_DELTA_GET_MICROSECONDS(o) \
154
+ (((PyDateTime_Delta*)o)->microseconds)
155
+
156
+
157
+ /* Define structure for C API. */
158
+ typedef struct {
159
+ /* type objects */
160
+ PyTypeObject *DateType;
161
+ PyTypeObject *DateTimeType;
162
+ PyTypeObject *TimeType;
163
+ PyTypeObject *DeltaType;
164
+ PyTypeObject *TZInfoType;
165
+
166
+ /* singletons */
167
+ PyObject *TimeZone_UTC;
168
+
169
+ /* constructors */
170
+ PyObject *(*Date_FromDate)(int, int, int, PyTypeObject*);
171
+ PyObject *(*DateTime_FromDateAndTime)(int, int, int, int, int, int, int,
172
+ PyObject*, PyTypeObject*);
173
+ PyObject *(*Time_FromTime)(int, int, int, int, PyObject*, PyTypeObject*);
174
+ PyObject *(*Delta_FromDelta)(int, int, int, int, PyTypeObject*);
175
+ PyObject *(*TimeZone_FromTimeZone)(PyObject *offset, PyObject *name);
176
+
177
+ /* constructors for the DB API */
178
+ PyObject *(*DateTime_FromTimestamp)(PyObject*, PyObject*, PyObject*);
179
+ PyObject *(*Date_FromTimestamp)(PyObject*, PyObject*);
180
+
181
+ /* PEP 495 constructors */
182
+ PyObject *(*DateTime_FromDateAndTimeAndFold)(int, int, int, int, int, int, int,
183
+ PyObject*, int, PyTypeObject*);
184
+ PyObject *(*Time_FromTimeAndFold)(int, int, int, int, PyObject*, int, PyTypeObject*);
185
+
186
+ } PyDateTime_CAPI;
187
+
188
+ #define PyDateTime_CAPSULE_NAME "datetime.datetime_CAPI"
189
+
190
+
191
+ /* This block is only used as part of the public API and should not be
192
+ * included in _datetimemodule.c, which does not use the C API capsule.
193
+ * See bpo-35081 for more details.
194
+ * */
195
+ #ifndef _PY_DATETIME_IMPL
196
+ /* Define global variable for the C API and a macro for setting it. */
197
+ static PyDateTime_CAPI *PyDateTimeAPI = NULL;
198
+
199
+ #define PyDateTime_IMPORT \
200
+ PyDateTimeAPI = (PyDateTime_CAPI *)PyCapsule_Import(PyDateTime_CAPSULE_NAME, 0)
201
+
202
+ /* Macro for access to the UTC singleton */
203
+ #define PyDateTime_TimeZone_UTC PyDateTimeAPI->TimeZone_UTC
204
+
205
+ /* Macros for type checking when not building the Python core. */
206
+ #define PyDate_Check(op) PyObject_TypeCheck(op, PyDateTimeAPI->DateType)
207
+ #define PyDate_CheckExact(op) Py_IS_TYPE(op, PyDateTimeAPI->DateType)
208
+
209
+ #define PyDateTime_Check(op) PyObject_TypeCheck(op, PyDateTimeAPI->DateTimeType)
210
+ #define PyDateTime_CheckExact(op) Py_IS_TYPE(op, PyDateTimeAPI->DateTimeType)
211
+
212
+ #define PyTime_Check(op) PyObject_TypeCheck(op, PyDateTimeAPI->TimeType)
213
+ #define PyTime_CheckExact(op) Py_IS_TYPE(op, PyDateTimeAPI->TimeType)
214
+
215
+ #define PyDelta_Check(op) PyObject_TypeCheck(op, PyDateTimeAPI->DeltaType)
216
+ #define PyDelta_CheckExact(op) Py_IS_TYPE(op, PyDateTimeAPI->DeltaType)
217
+
218
+ #define PyTZInfo_Check(op) PyObject_TypeCheck(op, PyDateTimeAPI->TZInfoType)
219
+ #define PyTZInfo_CheckExact(op) Py_IS_TYPE(op, PyDateTimeAPI->TZInfoType)
220
+
221
+
222
+ /* Macros for accessing constructors in a simplified fashion. */
223
+ #define PyDate_FromDate(year, month, day) \
224
+ PyDateTimeAPI->Date_FromDate(year, month, day, PyDateTimeAPI->DateType)
225
+
226
+ #define PyDateTime_FromDateAndTime(year, month, day, hour, min, sec, usec) \
227
+ PyDateTimeAPI->DateTime_FromDateAndTime(year, month, day, hour, \
228
+ min, sec, usec, Py_None, PyDateTimeAPI->DateTimeType)
229
+
230
+ #define PyDateTime_FromDateAndTimeAndFold(year, month, day, hour, min, sec, usec, fold) \
231
+ PyDateTimeAPI->DateTime_FromDateAndTimeAndFold(year, month, day, hour, \
232
+ min, sec, usec, Py_None, fold, PyDateTimeAPI->DateTimeType)
233
+
234
+ #define PyTime_FromTime(hour, minute, second, usecond) \
235
+ PyDateTimeAPI->Time_FromTime(hour, minute, second, usecond, \
236
+ Py_None, PyDateTimeAPI->TimeType)
237
+
238
+ #define PyTime_FromTimeAndFold(hour, minute, second, usecond, fold) \
239
+ PyDateTimeAPI->Time_FromTimeAndFold(hour, minute, second, usecond, \
240
+ Py_None, fold, PyDateTimeAPI->TimeType)
241
+
242
+ #define PyDelta_FromDSU(days, seconds, useconds) \
243
+ PyDateTimeAPI->Delta_FromDelta(days, seconds, useconds, 1, \
244
+ PyDateTimeAPI->DeltaType)
245
+
246
+ #define PyTimeZone_FromOffset(offset) \
247
+ PyDateTimeAPI->TimeZone_FromTimeZone(offset, NULL)
248
+
249
+ #define PyTimeZone_FromOffsetAndName(offset, name) \
250
+ PyDateTimeAPI->TimeZone_FromTimeZone(offset, name)
251
+
252
+ /* Macros supporting the DB API. */
253
+ #define PyDateTime_FromTimestamp(args) \
254
+ PyDateTimeAPI->DateTime_FromTimestamp( \
255
+ (PyObject*) (PyDateTimeAPI->DateTimeType), args, NULL)
256
+
257
+ #define PyDate_FromTimestamp(args) \
258
+ PyDateTimeAPI->Date_FromTimestamp( \
259
+ (PyObject*) (PyDateTimeAPI->DateType), args)
260
+
261
+ #endif /* !defined(_PY_DATETIME_IMPL) */
262
+
263
+ #ifdef __cplusplus
264
+ }
265
+ #endif
266
+ #endif
267
+ #endif /* !Py_LIMITED_API */
evalkit_internvl/include/python3.10/dictobject.h ADDED
@@ -0,0 +1,97 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ #ifndef Py_DICTOBJECT_H
2
+ #define Py_DICTOBJECT_H
3
+ #ifdef __cplusplus
4
+ extern "C" {
5
+ #endif
6
+
7
+ /* Dictionary object type -- mapping from hashable object to object */
8
+
9
+ /* The distribution includes a separate file, Objects/dictnotes.txt,
10
+ describing explorations into dictionary design and optimization.
11
+ It covers typical dictionary use patterns, the parameters for
12
+ tuning dictionaries, and several ideas for possible optimizations.
13
+ */
14
+
15
+ PyAPI_DATA(PyTypeObject) PyDict_Type;
16
+
17
+ #define PyDict_Check(op) \
18
+ PyType_FastSubclass(Py_TYPE(op), Py_TPFLAGS_DICT_SUBCLASS)
19
+ #define PyDict_CheckExact(op) Py_IS_TYPE(op, &PyDict_Type)
20
+
21
+ PyAPI_FUNC(PyObject *) PyDict_New(void);
22
+ PyAPI_FUNC(PyObject *) PyDict_GetItem(PyObject *mp, PyObject *key);
23
+ PyAPI_FUNC(PyObject *) PyDict_GetItemWithError(PyObject *mp, PyObject *key);
24
+ PyAPI_FUNC(int) PyDict_SetItem(PyObject *mp, PyObject *key, PyObject *item);
25
+ PyAPI_FUNC(int) PyDict_DelItem(PyObject *mp, PyObject *key);
26
+ PyAPI_FUNC(void) PyDict_Clear(PyObject *mp);
27
+ PyAPI_FUNC(int) PyDict_Next(
28
+ PyObject *mp, Py_ssize_t *pos, PyObject **key, PyObject **value);
29
+ PyAPI_FUNC(PyObject *) PyDict_Keys(PyObject *mp);
30
+ PyAPI_FUNC(PyObject *) PyDict_Values(PyObject *mp);
31
+ PyAPI_FUNC(PyObject *) PyDict_Items(PyObject *mp);
32
+ PyAPI_FUNC(Py_ssize_t) PyDict_Size(PyObject *mp);
33
+ PyAPI_FUNC(PyObject *) PyDict_Copy(PyObject *mp);
34
+ PyAPI_FUNC(int) PyDict_Contains(PyObject *mp, PyObject *key);
35
+
36
+ /* PyDict_Update(mp, other) is equivalent to PyDict_Merge(mp, other, 1). */
37
+ PyAPI_FUNC(int) PyDict_Update(PyObject *mp, PyObject *other);
38
+
39
+ /* PyDict_Merge updates/merges from a mapping object (an object that
40
+ supports PyMapping_Keys() and PyObject_GetItem()). If override is true,
41
+ the last occurrence of a key wins, else the first. The Python
42
+ dict.update(other) is equivalent to PyDict_Merge(dict, other, 1).
43
+ */
44
+ PyAPI_FUNC(int) PyDict_Merge(PyObject *mp,
45
+ PyObject *other,
46
+ int override);
47
+
48
+ /* PyDict_MergeFromSeq2 updates/merges from an iterable object producing
49
+ iterable objects of length 2. If override is true, the last occurrence
50
+ of a key wins, else the first. The Python dict constructor dict(seq2)
51
+ is equivalent to dict={}; PyDict_MergeFromSeq(dict, seq2, 1).
52
+ */
53
+ PyAPI_FUNC(int) PyDict_MergeFromSeq2(PyObject *d,
54
+ PyObject *seq2,
55
+ int override);
56
+
57
+ PyAPI_FUNC(PyObject *) PyDict_GetItemString(PyObject *dp, const char *key);
58
+ PyAPI_FUNC(int) PyDict_SetItemString(PyObject *dp, const char *key, PyObject *item);
59
+ PyAPI_FUNC(int) PyDict_DelItemString(PyObject *dp, const char *key);
60
+ #if !defined(Py_LIMITED_API) || Py_LIMITED_API+0 >= 0x030A0000
61
+ PyAPI_FUNC(PyObject *) PyObject_GenericGetDict(PyObject *, void *);
62
+ #endif
63
+
64
+ /* Dictionary (keys, values, items) views */
65
+
66
+ PyAPI_DATA(PyTypeObject) PyDictKeys_Type;
67
+ PyAPI_DATA(PyTypeObject) PyDictValues_Type;
68
+ PyAPI_DATA(PyTypeObject) PyDictItems_Type;
69
+
70
+ #define PyDictKeys_Check(op) PyObject_TypeCheck(op, &PyDictKeys_Type)
71
+ #define PyDictValues_Check(op) PyObject_TypeCheck(op, &PyDictValues_Type)
72
+ #define PyDictItems_Check(op) PyObject_TypeCheck(op, &PyDictItems_Type)
73
+ /* This excludes Values, since they are not sets. */
74
+ # define PyDictViewSet_Check(op) \
75
+ (PyDictKeys_Check(op) || PyDictItems_Check(op))
76
+
77
+ /* Dictionary (key, value, items) iterators */
78
+
79
+ PyAPI_DATA(PyTypeObject) PyDictIterKey_Type;
80
+ PyAPI_DATA(PyTypeObject) PyDictIterValue_Type;
81
+ PyAPI_DATA(PyTypeObject) PyDictIterItem_Type;
82
+
83
+ PyAPI_DATA(PyTypeObject) PyDictRevIterKey_Type;
84
+ PyAPI_DATA(PyTypeObject) PyDictRevIterItem_Type;
85
+ PyAPI_DATA(PyTypeObject) PyDictRevIterValue_Type;
86
+
87
+
88
+ #ifndef Py_LIMITED_API
89
+ # define Py_CPYTHON_DICTOBJECT_H
90
+ # include "cpython/dictobject.h"
91
+ # undef Py_CPYTHON_DICTOBJECT_H
92
+ #endif
93
+
94
+ #ifdef __cplusplus
95
+ }
96
+ #endif
97
+ #endif /* !Py_DICTOBJECT_H */
evalkit_internvl/include/python3.10/dynamic_annotations.h ADDED
@@ -0,0 +1,499 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /* Copyright (c) 2008-2009, Google Inc.
2
+ * All rights reserved.
3
+ *
4
+ * Redistribution and use in source and binary forms, with or without
5
+ * modification, are permitted provided that the following conditions are
6
+ * met:
7
+ *
8
+ * * Redistributions of source code must retain the above copyright
9
+ * notice, this list of conditions and the following disclaimer.
10
+ * * Neither the name of Google Inc. nor the names of its
11
+ * contributors may be used to endorse or promote products derived from
12
+ * this software without specific prior written permission.
13
+ *
14
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
15
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
16
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
17
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
18
+ * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
19
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
20
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
21
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
22
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
23
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
24
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
25
+ *
26
+ * ---
27
+ * Author: Kostya Serebryany
28
+ * Copied to CPython by Jeffrey Yasskin, with all macros renamed to
29
+ * start with _Py_ to avoid colliding with users embedding Python, and
30
+ * with deprecated macros removed.
31
+ */
32
+
33
+ /* This file defines dynamic annotations for use with dynamic analysis
34
+ tool such as valgrind, PIN, etc.
35
+
36
+ Dynamic annotation is a source code annotation that affects
37
+ the generated code (that is, the annotation is not a comment).
38
+ Each such annotation is attached to a particular
39
+ instruction and/or to a particular object (address) in the program.
40
+
41
+ The annotations that should be used by users are macros in all upper-case
42
+ (e.g., _Py_ANNOTATE_NEW_MEMORY).
43
+
44
+ Actual implementation of these macros may differ depending on the
45
+ dynamic analysis tool being used.
46
+
47
+ See https://code.google.com/p/data-race-test/ for more information.
48
+
49
+ This file supports the following dynamic analysis tools:
50
+ - None (DYNAMIC_ANNOTATIONS_ENABLED is not defined or zero).
51
+ Macros are defined empty.
52
+ - ThreadSanitizer, Helgrind, DRD (DYNAMIC_ANNOTATIONS_ENABLED is 1).
53
+ Macros are defined as calls to non-inlinable empty functions
54
+ that are intercepted by Valgrind. */
55
+
56
+ #ifndef __DYNAMIC_ANNOTATIONS_H__
57
+ #define __DYNAMIC_ANNOTATIONS_H__
58
+
59
+ #ifndef DYNAMIC_ANNOTATIONS_ENABLED
60
+ # define DYNAMIC_ANNOTATIONS_ENABLED 0
61
+ #endif
62
+
63
+ #if DYNAMIC_ANNOTATIONS_ENABLED != 0
64
+
65
+ /* -------------------------------------------------------------
66
+ Annotations useful when implementing condition variables such as CondVar,
67
+ using conditional critical sections (Await/LockWhen) and when constructing
68
+ user-defined synchronization mechanisms.
69
+
70
+ The annotations _Py_ANNOTATE_HAPPENS_BEFORE() and
71
+ _Py_ANNOTATE_HAPPENS_AFTER() can be used to define happens-before arcs in
72
+ user-defined synchronization mechanisms: the race detector will infer an
73
+ arc from the former to the latter when they share the same argument
74
+ pointer.
75
+
76
+ Example 1 (reference counting):
77
+
78
+ void Unref() {
79
+ _Py_ANNOTATE_HAPPENS_BEFORE(&refcount_);
80
+ if (AtomicDecrementByOne(&refcount_) == 0) {
81
+ _Py_ANNOTATE_HAPPENS_AFTER(&refcount_);
82
+ delete this;
83
+ }
84
+ }
85
+
86
+ Example 2 (message queue):
87
+
88
+ void MyQueue::Put(Type *e) {
89
+ MutexLock lock(&mu_);
90
+ _Py_ANNOTATE_HAPPENS_BEFORE(e);
91
+ PutElementIntoMyQueue(e);
92
+ }
93
+
94
+ Type *MyQueue::Get() {
95
+ MutexLock lock(&mu_);
96
+ Type *e = GetElementFromMyQueue();
97
+ _Py_ANNOTATE_HAPPENS_AFTER(e);
98
+ return e;
99
+ }
100
+
101
+ Note: when possible, please use the existing reference counting and message
102
+ queue implementations instead of inventing new ones. */
103
+
104
+ /* Report that wait on the condition variable at address "cv" has succeeded
105
+ and the lock at address "lock" is held. */
106
+ #define _Py_ANNOTATE_CONDVAR_LOCK_WAIT(cv, lock) \
107
+ AnnotateCondVarWait(__FILE__, __LINE__, cv, lock)
108
+
109
+ /* Report that wait on the condition variable at "cv" has succeeded. Variant
110
+ w/o lock. */
111
+ #define _Py_ANNOTATE_CONDVAR_WAIT(cv) \
112
+ AnnotateCondVarWait(__FILE__, __LINE__, cv, NULL)
113
+
114
+ /* Report that we are about to signal on the condition variable at address
115
+ "cv". */
116
+ #define _Py_ANNOTATE_CONDVAR_SIGNAL(cv) \
117
+ AnnotateCondVarSignal(__FILE__, __LINE__, cv)
118
+
119
+ /* Report that we are about to signal_all on the condition variable at "cv". */
120
+ #define _Py_ANNOTATE_CONDVAR_SIGNAL_ALL(cv) \
121
+ AnnotateCondVarSignalAll(__FILE__, __LINE__, cv)
122
+
123
+ /* Annotations for user-defined synchronization mechanisms. */
124
+ #define _Py_ANNOTATE_HAPPENS_BEFORE(obj) _Py_ANNOTATE_CONDVAR_SIGNAL(obj)
125
+ #define _Py_ANNOTATE_HAPPENS_AFTER(obj) _Py_ANNOTATE_CONDVAR_WAIT(obj)
126
+
127
+ /* Report that the bytes in the range [pointer, pointer+size) are about
128
+ to be published safely. The race checker will create a happens-before
129
+ arc from the call _Py_ANNOTATE_PUBLISH_MEMORY_RANGE(pointer, size) to
130
+ subsequent accesses to this memory.
131
+ Note: this annotation may not work properly if the race detector uses
132
+ sampling, i.e. does not observe all memory accesses.
133
+ */
134
+ #define _Py_ANNOTATE_PUBLISH_MEMORY_RANGE(pointer, size) \
135
+ AnnotatePublishMemoryRange(__FILE__, __LINE__, pointer, size)
136
+
137
+ /* Instruct the tool to create a happens-before arc between mu->Unlock() and
138
+ mu->Lock(). This annotation may slow down the race detector and hide real
139
+ races. Normally it is used only when it would be difficult to annotate each
140
+ of the mutex's critical sections individually using the annotations above.
141
+ This annotation makes sense only for hybrid race detectors. For pure
142
+ happens-before detectors this is a no-op. For more details see
143
+ https://code.google.com/p/data-race-test/wiki/PureHappensBeforeVsHybrid . */
144
+ #define _Py_ANNOTATE_PURE_HAPPENS_BEFORE_MUTEX(mu) \
145
+ AnnotateMutexIsUsedAsCondVar(__FILE__, __LINE__, mu)
146
+
147
+ /* -------------------------------------------------------------
148
+ Annotations useful when defining memory allocators, or when memory that
149
+ was protected in one way starts to be protected in another. */
150
+
151
+ /* Report that a new memory at "address" of size "size" has been allocated.
152
+ This might be used when the memory has been retrieved from a free list and
153
+ is about to be reused, or when the locking discipline for a variable
154
+ changes. */
155
+ #define _Py_ANNOTATE_NEW_MEMORY(address, size) \
156
+ AnnotateNewMemory(__FILE__, __LINE__, address, size)
157
+
158
+ /* -------------------------------------------------------------
159
+ Annotations useful when defining FIFO queues that transfer data between
160
+ threads. */
161
+
162
+ /* Report that the producer-consumer queue (such as ProducerConsumerQueue) at
163
+ address "pcq" has been created. The _Py_ANNOTATE_PCQ_* annotations should
164
+ be used only for FIFO queues. For non-FIFO queues use
165
+ _Py_ANNOTATE_HAPPENS_BEFORE (for put) and _Py_ANNOTATE_HAPPENS_AFTER (for
166
+ get). */
167
+ #define _Py_ANNOTATE_PCQ_CREATE(pcq) \
168
+ AnnotatePCQCreate(__FILE__, __LINE__, pcq)
169
+
170
+ /* Report that the queue at address "pcq" is about to be destroyed. */
171
+ #define _Py_ANNOTATE_PCQ_DESTROY(pcq) \
172
+ AnnotatePCQDestroy(__FILE__, __LINE__, pcq)
173
+
174
+ /* Report that we are about to put an element into a FIFO queue at address
175
+ "pcq". */
176
+ #define _Py_ANNOTATE_PCQ_PUT(pcq) \
177
+ AnnotatePCQPut(__FILE__, __LINE__, pcq)
178
+
179
+ /* Report that we've just got an element from a FIFO queue at address "pcq". */
180
+ #define _Py_ANNOTATE_PCQ_GET(pcq) \
181
+ AnnotatePCQGet(__FILE__, __LINE__, pcq)
182
+
183
+ /* -------------------------------------------------------------
184
+ Annotations that suppress errors. It is usually better to express the
185
+ program's synchronization using the other annotations, but these can
186
+ be used when all else fails. */
187
+
188
+ /* Report that we may have a benign race at "pointer", with size
189
+ "sizeof(*(pointer))". "pointer" must be a non-void* pointer. Insert at the
190
+ point where "pointer" has been allocated, preferably close to the point
191
+ where the race happens. See also _Py_ANNOTATE_BENIGN_RACE_STATIC. */
192
+ #define _Py_ANNOTATE_BENIGN_RACE(pointer, description) \
193
+ AnnotateBenignRaceSized(__FILE__, __LINE__, pointer, \
194
+ sizeof(*(pointer)), description)
195
+
196
+ /* Same as _Py_ANNOTATE_BENIGN_RACE(address, description), but applies to
197
+ the memory range [address, address+size). */
198
+ #define _Py_ANNOTATE_BENIGN_RACE_SIZED(address, size, description) \
199
+ AnnotateBenignRaceSized(__FILE__, __LINE__, address, size, description)
200
+
201
+ /* Request the analysis tool to ignore all reads in the current thread
202
+ until _Py_ANNOTATE_IGNORE_READS_END is called.
203
+ Useful to ignore intentional racey reads, while still checking
204
+ other reads and all writes.
205
+ See also _Py_ANNOTATE_UNPROTECTED_READ. */
206
+ #define _Py_ANNOTATE_IGNORE_READS_BEGIN() \
207
+ AnnotateIgnoreReadsBegin(__FILE__, __LINE__)
208
+
209
+ /* Stop ignoring reads. */
210
+ #define _Py_ANNOTATE_IGNORE_READS_END() \
211
+ AnnotateIgnoreReadsEnd(__FILE__, __LINE__)
212
+
213
+ /* Similar to _Py_ANNOTATE_IGNORE_READS_BEGIN, but ignore writes. */
214
+ #define _Py_ANNOTATE_IGNORE_WRITES_BEGIN() \
215
+ AnnotateIgnoreWritesBegin(__FILE__, __LINE__)
216
+
217
+ /* Stop ignoring writes. */
218
+ #define _Py_ANNOTATE_IGNORE_WRITES_END() \
219
+ AnnotateIgnoreWritesEnd(__FILE__, __LINE__)
220
+
221
+ /* Start ignoring all memory accesses (reads and writes). */
222
+ #define _Py_ANNOTATE_IGNORE_READS_AND_WRITES_BEGIN() \
223
+ do {\
224
+ _Py_ANNOTATE_IGNORE_READS_BEGIN();\
225
+ _Py_ANNOTATE_IGNORE_WRITES_BEGIN();\
226
+ }while(0)\
227
+
228
+ /* Stop ignoring all memory accesses. */
229
+ #define _Py_ANNOTATE_IGNORE_READS_AND_WRITES_END() \
230
+ do {\
231
+ _Py_ANNOTATE_IGNORE_WRITES_END();\
232
+ _Py_ANNOTATE_IGNORE_READS_END();\
233
+ }while(0)\
234
+
235
+ /* Similar to _Py_ANNOTATE_IGNORE_READS_BEGIN, but ignore synchronization events:
236
+ RWLOCK* and CONDVAR*. */
237
+ #define _Py_ANNOTATE_IGNORE_SYNC_BEGIN() \
238
+ AnnotateIgnoreSyncBegin(__FILE__, __LINE__)
239
+
240
+ /* Stop ignoring sync events. */
241
+ #define _Py_ANNOTATE_IGNORE_SYNC_END() \
242
+ AnnotateIgnoreSyncEnd(__FILE__, __LINE__)
243
+
244
+
245
+ /* Enable (enable!=0) or disable (enable==0) race detection for all threads.
246
+ This annotation could be useful if you want to skip expensive race analysis
247
+ during some period of program execution, e.g. during initialization. */
248
+ #define _Py_ANNOTATE_ENABLE_RACE_DETECTION(enable) \
249
+ AnnotateEnableRaceDetection(__FILE__, __LINE__, enable)
250
+
251
+ /* -------------------------------------------------------------
252
+ Annotations useful for debugging. */
253
+
254
+ /* Request to trace every access to "address". */
255
+ #define _Py_ANNOTATE_TRACE_MEMORY(address) \
256
+ AnnotateTraceMemory(__FILE__, __LINE__, address)
257
+
258
+ /* Report the current thread name to a race detector. */
259
+ #define _Py_ANNOTATE_THREAD_NAME(name) \
260
+ AnnotateThreadName(__FILE__, __LINE__, name)
261
+
262
+ /* -------------------------------------------------------------
263
+ Annotations useful when implementing locks. They are not
264
+ normally needed by modules that merely use locks.
265
+ The "lock" argument is a pointer to the lock object. */
266
+
267
+ /* Report that a lock has been created at address "lock". */
268
+ #define _Py_ANNOTATE_RWLOCK_CREATE(lock) \
269
+ AnnotateRWLockCreate(__FILE__, __LINE__, lock)
270
+
271
+ /* Report that the lock at address "lock" is about to be destroyed. */
272
+ #define _Py_ANNOTATE_RWLOCK_DESTROY(lock) \
273
+ AnnotateRWLockDestroy(__FILE__, __LINE__, lock)
274
+
275
+ /* Report that the lock at address "lock" has been acquired.
276
+ is_w=1 for writer lock, is_w=0 for reader lock. */
277
+ #define _Py_ANNOTATE_RWLOCK_ACQUIRED(lock, is_w) \
278
+ AnnotateRWLockAcquired(__FILE__, __LINE__, lock, is_w)
279
+
280
+ /* Report that the lock at address "lock" is about to be released. */
281
+ #define _Py_ANNOTATE_RWLOCK_RELEASED(lock, is_w) \
282
+ AnnotateRWLockReleased(__FILE__, __LINE__, lock, is_w)
283
+
284
+ /* -------------------------------------------------------------
285
+ Annotations useful when implementing barriers. They are not
286
+ normally needed by modules that merely use barriers.
287
+ The "barrier" argument is a pointer to the barrier object. */
288
+
289
+ /* Report that the "barrier" has been initialized with initial "count".
290
+ If 'reinitialization_allowed' is true, initialization is allowed to happen
291
+ multiple times w/o calling barrier_destroy() */
292
+ #define _Py_ANNOTATE_BARRIER_INIT(barrier, count, reinitialization_allowed) \
293
+ AnnotateBarrierInit(__FILE__, __LINE__, barrier, count, \
294
+ reinitialization_allowed)
295
+
296
+ /* Report that we are about to enter barrier_wait("barrier"). */
297
+ #define _Py_ANNOTATE_BARRIER_WAIT_BEFORE(barrier) \
298
+ AnnotateBarrierWaitBefore(__FILE__, __LINE__, barrier)
299
+
300
+ /* Report that we just exited barrier_wait("barrier"). */
301
+ #define _Py_ANNOTATE_BARRIER_WAIT_AFTER(barrier) \
302
+ AnnotateBarrierWaitAfter(__FILE__, __LINE__, barrier)
303
+
304
+ /* Report that the "barrier" has been destroyed. */
305
+ #define _Py_ANNOTATE_BARRIER_DESTROY(barrier) \
306
+ AnnotateBarrierDestroy(__FILE__, __LINE__, barrier)
307
+
308
+ /* -------------------------------------------------------------
309
+ Annotations useful for testing race detectors. */
310
+
311
+ /* Report that we expect a race on the variable at "address".
312
+ Use only in unit tests for a race detector. */
313
+ #define _Py_ANNOTATE_EXPECT_RACE(address, description) \
314
+ AnnotateExpectRace(__FILE__, __LINE__, address, description)
315
+
316
+ /* A no-op. Insert where you like to test the interceptors. */
317
+ #define _Py_ANNOTATE_NO_OP(arg) \
318
+ AnnotateNoOp(__FILE__, __LINE__, arg)
319
+
320
+ /* Force the race detector to flush its state. The actual effect depends on
321
+ * the implementation of the detector. */
322
+ #define _Py_ANNOTATE_FLUSH_STATE() \
323
+ AnnotateFlushState(__FILE__, __LINE__)
324
+
325
+
326
+ #else /* DYNAMIC_ANNOTATIONS_ENABLED == 0 */
327
+
328
+ #define _Py_ANNOTATE_RWLOCK_CREATE(lock) /* empty */
329
+ #define _Py_ANNOTATE_RWLOCK_DESTROY(lock) /* empty */
330
+ #define _Py_ANNOTATE_RWLOCK_ACQUIRED(lock, is_w) /* empty */
331
+ #define _Py_ANNOTATE_RWLOCK_RELEASED(lock, is_w) /* empty */
332
+ #define _Py_ANNOTATE_BARRIER_INIT(barrier, count, reinitialization_allowed) /* */
333
+ #define _Py_ANNOTATE_BARRIER_WAIT_BEFORE(barrier) /* empty */
334
+ #define _Py_ANNOTATE_BARRIER_WAIT_AFTER(barrier) /* empty */
335
+ #define _Py_ANNOTATE_BARRIER_DESTROY(barrier) /* empty */
336
+ #define _Py_ANNOTATE_CONDVAR_LOCK_WAIT(cv, lock) /* empty */
337
+ #define _Py_ANNOTATE_CONDVAR_WAIT(cv) /* empty */
338
+ #define _Py_ANNOTATE_CONDVAR_SIGNAL(cv) /* empty */
339
+ #define _Py_ANNOTATE_CONDVAR_SIGNAL_ALL(cv) /* empty */
340
+ #define _Py_ANNOTATE_HAPPENS_BEFORE(obj) /* empty */
341
+ #define _Py_ANNOTATE_HAPPENS_AFTER(obj) /* empty */
342
+ #define _Py_ANNOTATE_PUBLISH_MEMORY_RANGE(address, size) /* empty */
343
+ #define _Py_ANNOTATE_UNPUBLISH_MEMORY_RANGE(address, size) /* empty */
344
+ #define _Py_ANNOTATE_SWAP_MEMORY_RANGE(address, size) /* empty */
345
+ #define _Py_ANNOTATE_PCQ_CREATE(pcq) /* empty */
346
+ #define _Py_ANNOTATE_PCQ_DESTROY(pcq) /* empty */
347
+ #define _Py_ANNOTATE_PCQ_PUT(pcq) /* empty */
348
+ #define _Py_ANNOTATE_PCQ_GET(pcq) /* empty */
349
+ #define _Py_ANNOTATE_NEW_MEMORY(address, size) /* empty */
350
+ #define _Py_ANNOTATE_EXPECT_RACE(address, description) /* empty */
351
+ #define _Py_ANNOTATE_BENIGN_RACE(address, description) /* empty */
352
+ #define _Py_ANNOTATE_BENIGN_RACE_SIZED(address, size, description) /* empty */
353
+ #define _Py_ANNOTATE_PURE_HAPPENS_BEFORE_MUTEX(mu) /* empty */
354
+ #define _Py_ANNOTATE_MUTEX_IS_USED_AS_CONDVAR(mu) /* empty */
355
+ #define _Py_ANNOTATE_TRACE_MEMORY(arg) /* empty */
356
+ #define _Py_ANNOTATE_THREAD_NAME(name) /* empty */
357
+ #define _Py_ANNOTATE_IGNORE_READS_BEGIN() /* empty */
358
+ #define _Py_ANNOTATE_IGNORE_READS_END() /* empty */
359
+ #define _Py_ANNOTATE_IGNORE_WRITES_BEGIN() /* empty */
360
+ #define _Py_ANNOTATE_IGNORE_WRITES_END() /* empty */
361
+ #define _Py_ANNOTATE_IGNORE_READS_AND_WRITES_BEGIN() /* empty */
362
+ #define _Py_ANNOTATE_IGNORE_READS_AND_WRITES_END() /* empty */
363
+ #define _Py_ANNOTATE_IGNORE_SYNC_BEGIN() /* empty */
364
+ #define _Py_ANNOTATE_IGNORE_SYNC_END() /* empty */
365
+ #define _Py_ANNOTATE_ENABLE_RACE_DETECTION(enable) /* empty */
366
+ #define _Py_ANNOTATE_NO_OP(arg) /* empty */
367
+ #define _Py_ANNOTATE_FLUSH_STATE() /* empty */
368
+
369
+ #endif /* DYNAMIC_ANNOTATIONS_ENABLED */
370
+
371
+ /* Use the macros above rather than using these functions directly. */
372
+ #ifdef __cplusplus
373
+ extern "C" {
374
+ #endif
375
+ void AnnotateRWLockCreate(const char *file, int line,
376
+ const volatile void *lock);
377
+ void AnnotateRWLockDestroy(const char *file, int line,
378
+ const volatile void *lock);
379
+ void AnnotateRWLockAcquired(const char *file, int line,
380
+ const volatile void *lock, long is_w);
381
+ void AnnotateRWLockReleased(const char *file, int line,
382
+ const volatile void *lock, long is_w);
383
+ void AnnotateBarrierInit(const char *file, int line,
384
+ const volatile void *barrier, long count,
385
+ long reinitialization_allowed);
386
+ void AnnotateBarrierWaitBefore(const char *file, int line,
387
+ const volatile void *barrier);
388
+ void AnnotateBarrierWaitAfter(const char *file, int line,
389
+ const volatile void *barrier);
390
+ void AnnotateBarrierDestroy(const char *file, int line,
391
+ const volatile void *barrier);
392
+ void AnnotateCondVarWait(const char *file, int line,
393
+ const volatile void *cv,
394
+ const volatile void *lock);
395
+ void AnnotateCondVarSignal(const char *file, int line,
396
+ const volatile void *cv);
397
+ void AnnotateCondVarSignalAll(const char *file, int line,
398
+ const volatile void *cv);
399
+ void AnnotatePublishMemoryRange(const char *file, int line,
400
+ const volatile void *address,
401
+ long size);
402
+ void AnnotateUnpublishMemoryRange(const char *file, int line,
403
+ const volatile void *address,
404
+ long size);
405
+ void AnnotatePCQCreate(const char *file, int line,
406
+ const volatile void *pcq);
407
+ void AnnotatePCQDestroy(const char *file, int line,
408
+ const volatile void *pcq);
409
+ void AnnotatePCQPut(const char *file, int line,
410
+ const volatile void *pcq);
411
+ void AnnotatePCQGet(const char *file, int line,
412
+ const volatile void *pcq);
413
+ void AnnotateNewMemory(const char *file, int line,
414
+ const volatile void *address,
415
+ long size);
416
+ void AnnotateExpectRace(const char *file, int line,
417
+ const volatile void *address,
418
+ const char *description);
419
+ void AnnotateBenignRace(const char *file, int line,
420
+ const volatile void *address,
421
+ const char *description);
422
+ void AnnotateBenignRaceSized(const char *file, int line,
423
+ const volatile void *address,
424
+ long size,
425
+ const char *description);
426
+ void AnnotateMutexIsUsedAsCondVar(const char *file, int line,
427
+ const volatile void *mu);
428
+ void AnnotateTraceMemory(const char *file, int line,
429
+ const volatile void *arg);
430
+ void AnnotateThreadName(const char *file, int line,
431
+ const char *name);
432
+ void AnnotateIgnoreReadsBegin(const char *file, int line);
433
+ void AnnotateIgnoreReadsEnd(const char *file, int line);
434
+ void AnnotateIgnoreWritesBegin(const char *file, int line);
435
+ void AnnotateIgnoreWritesEnd(const char *file, int line);
436
+ void AnnotateEnableRaceDetection(const char *file, int line, int enable);
437
+ void AnnotateNoOp(const char *file, int line,
438
+ const volatile void *arg);
439
+ void AnnotateFlushState(const char *file, int line);
440
+
441
+ /* Return non-zero value if running under valgrind.
442
+
443
+ If "valgrind.h" is included into dynamic_annotations.c,
444
+ the regular valgrind mechanism will be used.
445
+ See http://valgrind.org/docs/manual/manual-core-adv.html about
446
+ RUNNING_ON_VALGRIND and other valgrind "client requests".
447
+ The file "valgrind.h" may be obtained by doing
448
+ svn co svn://svn.valgrind.org/valgrind/trunk/include
449
+
450
+ If for some reason you can't use "valgrind.h" or want to fake valgrind,
451
+ there are two ways to make this function return non-zero:
452
+ - Use environment variable: export RUNNING_ON_VALGRIND=1
453
+ - Make your tool intercept the function RunningOnValgrind() and
454
+ change its return value.
455
+ */
456
+ int RunningOnValgrind(void);
457
+
458
+ #ifdef __cplusplus
459
+ }
460
+ #endif
461
+
462
+ #if DYNAMIC_ANNOTATIONS_ENABLED != 0 && defined(__cplusplus)
463
+
464
+ /* _Py_ANNOTATE_UNPROTECTED_READ is the preferred way to annotate racey reads.
465
+
466
+ Instead of doing
467
+ _Py_ANNOTATE_IGNORE_READS_BEGIN();
468
+ ... = x;
469
+ _Py_ANNOTATE_IGNORE_READS_END();
470
+ one can use
471
+ ... = _Py_ANNOTATE_UNPROTECTED_READ(x); */
472
+ template <class T>
473
+ inline T _Py_ANNOTATE_UNPROTECTED_READ(const volatile T &x) {
474
+ _Py_ANNOTATE_IGNORE_READS_BEGIN();
475
+ T res = x;
476
+ _Py_ANNOTATE_IGNORE_READS_END();
477
+ return res;
478
+ }
479
+ /* Apply _Py_ANNOTATE_BENIGN_RACE_SIZED to a static variable. */
480
+ #define _Py_ANNOTATE_BENIGN_RACE_STATIC(static_var, description) \
481
+ namespace { \
482
+ class static_var ## _annotator { \
483
+ public: \
484
+ static_var ## _annotator() { \
485
+ _Py_ANNOTATE_BENIGN_RACE_SIZED(&static_var, \
486
+ sizeof(static_var), \
487
+ # static_var ": " description); \
488
+ } \
489
+ }; \
490
+ static static_var ## _annotator the ## static_var ## _annotator;\
491
+ }
492
+ #else /* DYNAMIC_ANNOTATIONS_ENABLED == 0 */
493
+
494
+ #define _Py_ANNOTATE_UNPROTECTED_READ(x) (x)
495
+ #define _Py_ANNOTATE_BENIGN_RACE_STATIC(static_var, description) /* empty */
496
+
497
+ #endif /* DYNAMIC_ANNOTATIONS_ENABLED */
498
+
499
+ #endif /* __DYNAMIC_ANNOTATIONS_H__ */
evalkit_internvl/include/python3.10/errcode.h ADDED
@@ -0,0 +1,38 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ #ifndef Py_ERRCODE_H
2
+ #define Py_ERRCODE_H
3
+ #ifdef __cplusplus
4
+ extern "C" {
5
+ #endif
6
+
7
+
8
+ /* Error codes passed around between file input, tokenizer, parser and
9
+ interpreter. This is necessary so we can turn them into Python
10
+ exceptions at a higher level. Note that some errors have a
11
+ slightly different meaning when passed from the tokenizer to the
12
+ parser than when passed from the parser to the interpreter; e.g.
13
+ the parser only returns E_EOF when it hits EOF immediately, and it
14
+ never returns E_OK. */
15
+
16
+ #define E_OK 10 /* No error */
17
+ #define E_EOF 11 /* End Of File */
18
+ #define E_INTR 12 /* Interrupted */
19
+ #define E_TOKEN 13 /* Bad token */
20
+ #define E_SYNTAX 14 /* Syntax error */
21
+ #define E_NOMEM 15 /* Ran out of memory */
22
+ #define E_DONE 16 /* Parsing complete */
23
+ #define E_ERROR 17 /* Execution error */
24
+ #define E_TABSPACE 18 /* Inconsistent mixing of tabs and spaces */
25
+ #define E_OVERFLOW 19 /* Node had too many children */
26
+ #define E_TOODEEP 20 /* Too many indentation levels */
27
+ #define E_DEDENT 21 /* No matching outer block for dedent */
28
+ #define E_DECODE 22 /* Error in decoding into Unicode */
29
+ #define E_EOFS 23 /* EOF in triple-quoted string */
30
+ #define E_EOLS 24 /* EOL in single-quoted string */
31
+ #define E_LINECONT 25 /* Unexpected characters after a line continuation */
32
+ #define E_BADSINGLE 27 /* Ill-formed single statement input */
33
+ #define E_INTERACT_STOP 28 /* Interactive mode stopped tokenization */
34
+
35
+ #ifdef __cplusplus
36
+ }
37
+ #endif
38
+ #endif /* !Py_ERRCODE_H */
evalkit_internvl/include/python3.10/exports.h ADDED
@@ -0,0 +1,30 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ #ifndef Py_EXPORTS_H
2
+ #define Py_EXPORTS_H
3
+
4
+ #if defined(_WIN32) || defined(__CYGWIN__)
5
+ #define Py_IMPORTED_SYMBOL __declspec(dllimport)
6
+ #define Py_EXPORTED_SYMBOL __declspec(dllexport)
7
+ #define Py_LOCAL_SYMBOL
8
+ #else
9
+ /*
10
+ * If we only ever used gcc >= 5, we could use __has_attribute(visibility)
11
+ * as a cross-platform way to determine if visibility is supported. However,
12
+ * we may still need to support gcc >= 4, as some Ubuntu LTS and Centos versions
13
+ * have 4 < gcc < 5.
14
+ */
15
+ #ifndef __has_attribute
16
+ #define __has_attribute(x) 0 // Compatibility with non-clang compilers.
17
+ #endif
18
+ #if (defined(__GNUC__) && (__GNUC__ >= 4)) ||\
19
+ (defined(__clang__) && __has_attribute(visibility))
20
+ #define Py_IMPORTED_SYMBOL __attribute__ ((visibility ("default")))
21
+ #define Py_EXPORTED_SYMBOL __attribute__ ((visibility ("default")))
22
+ #define Py_LOCAL_SYMBOL __attribute__ ((visibility ("hidden")))
23
+ #else
24
+ #define Py_IMPORTED_SYMBOL
25
+ #define Py_EXPORTED_SYMBOL
26
+ #define Py_LOCAL_SYMBOL
27
+ #endif
28
+ #endif
29
+
30
+ #endif /* Py_EXPORTS_H */
evalkit_internvl/include/python3.10/fileobject.h ADDED
@@ -0,0 +1,49 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /* File object interface (what's left of it -- see io.py) */
2
+
3
+ #ifndef Py_FILEOBJECT_H
4
+ #define Py_FILEOBJECT_H
5
+ #ifdef __cplusplus
6
+ extern "C" {
7
+ #endif
8
+
9
+ #define PY_STDIOTEXTMODE "b"
10
+
11
+ PyAPI_FUNC(PyObject *) PyFile_FromFd(int, const char *, const char *, int,
12
+ const char *, const char *,
13
+ const char *, int);
14
+ PyAPI_FUNC(PyObject *) PyFile_GetLine(PyObject *, int);
15
+ PyAPI_FUNC(int) PyFile_WriteObject(PyObject *, PyObject *, int);
16
+ PyAPI_FUNC(int) PyFile_WriteString(const char *, PyObject *);
17
+ PyAPI_FUNC(int) PyObject_AsFileDescriptor(PyObject *);
18
+
19
+ /* The default encoding used by the platform file system APIs
20
+ If non-NULL, this is different than the default encoding for strings
21
+ */
22
+ PyAPI_DATA(const char *) Py_FileSystemDefaultEncoding;
23
+ #if !defined(Py_LIMITED_API) || Py_LIMITED_API+0 >= 0x03060000
24
+ PyAPI_DATA(const char *) Py_FileSystemDefaultEncodeErrors;
25
+ #endif
26
+ PyAPI_DATA(int) Py_HasFileSystemDefaultEncoding;
27
+
28
+ #if !defined(Py_LIMITED_API) || Py_LIMITED_API+0 >= 0x03070000
29
+ PyAPI_DATA(int) Py_UTF8Mode;
30
+ #endif
31
+
32
+ /* A routine to check if a file descriptor can be select()-ed. */
33
+ #ifdef _MSC_VER
34
+ /* On Windows, any socket fd can be select()-ed, no matter how high */
35
+ #define _PyIsSelectable_fd(FD) (1)
36
+ #else
37
+ #define _PyIsSelectable_fd(FD) ((unsigned int)(FD) < (unsigned int)FD_SETSIZE)
38
+ #endif
39
+
40
+ #ifndef Py_LIMITED_API
41
+ # define Py_CPYTHON_FILEOBJECT_H
42
+ # include "cpython/fileobject.h"
43
+ # undef Py_CPYTHON_FILEOBJECT_H
44
+ #endif
45
+
46
+ #ifdef __cplusplus
47
+ }
48
+ #endif
49
+ #endif /* !Py_FILEOBJECT_H */
evalkit_internvl/include/python3.10/fileutils.h ADDED
@@ -0,0 +1,26 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ #ifndef Py_FILEUTILS_H
2
+ #define Py_FILEUTILS_H
3
+ #ifdef __cplusplus
4
+ extern "C" {
5
+ #endif
6
+
7
+ #if !defined(Py_LIMITED_API) || Py_LIMITED_API+0 >= 0x03050000
8
+ PyAPI_FUNC(wchar_t *) Py_DecodeLocale(
9
+ const char *arg,
10
+ size_t *size);
11
+
12
+ PyAPI_FUNC(char*) Py_EncodeLocale(
13
+ const wchar_t *text,
14
+ size_t *error_pos);
15
+ #endif
16
+
17
+ #ifndef Py_LIMITED_API
18
+ # define Py_CPYTHON_FILEUTILS_H
19
+ # include "cpython/fileutils.h"
20
+ # undef Py_CPYTHON_FILEUTILS_H
21
+ #endif
22
+
23
+ #ifdef __cplusplus
24
+ }
25
+ #endif
26
+ #endif /* !Py_FILEUTILS_H */
evalkit_internvl/include/python3.10/floatobject.h ADDED
@@ -0,0 +1,118 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+
2
+ /* Float object interface */
3
+
4
+ /*
5
+ PyFloatObject represents a (double precision) floating point number.
6
+ */
7
+
8
+ #ifndef Py_FLOATOBJECT_H
9
+ #define Py_FLOATOBJECT_H
10
+ #ifdef __cplusplus
11
+ extern "C" {
12
+ #endif
13
+
14
+ #ifndef Py_LIMITED_API
15
+ typedef struct {
16
+ PyObject_HEAD
17
+ double ob_fval;
18
+ } PyFloatObject;
19
+ #endif
20
+
21
+ PyAPI_DATA(PyTypeObject) PyFloat_Type;
22
+
23
+ #define PyFloat_Check(op) PyObject_TypeCheck(op, &PyFloat_Type)
24
+ #define PyFloat_CheckExact(op) Py_IS_TYPE(op, &PyFloat_Type)
25
+
26
+ #ifdef Py_NAN
27
+ #define Py_RETURN_NAN return PyFloat_FromDouble(Py_NAN)
28
+ #endif
29
+
30
+ #define Py_RETURN_INF(sign) do \
31
+ if (copysign(1., sign) == 1.) { \
32
+ return PyFloat_FromDouble(Py_HUGE_VAL); \
33
+ } else { \
34
+ return PyFloat_FromDouble(-Py_HUGE_VAL); \
35
+ } while(0)
36
+
37
+ PyAPI_FUNC(double) PyFloat_GetMax(void);
38
+ PyAPI_FUNC(double) PyFloat_GetMin(void);
39
+ PyAPI_FUNC(PyObject *) PyFloat_GetInfo(void);
40
+
41
+ /* Return Python float from string PyObject. */
42
+ PyAPI_FUNC(PyObject *) PyFloat_FromString(PyObject*);
43
+
44
+ /* Return Python float from C double. */
45
+ PyAPI_FUNC(PyObject *) PyFloat_FromDouble(double);
46
+
47
+ /* Extract C double from Python float. The macro version trades safety for
48
+ speed. */
49
+ PyAPI_FUNC(double) PyFloat_AsDouble(PyObject *);
50
+ #ifndef Py_LIMITED_API
51
+ #define PyFloat_AS_DOUBLE(op) (((PyFloatObject *)(op))->ob_fval)
52
+ #endif
53
+
54
+ #ifndef Py_LIMITED_API
55
+ /* _PyFloat_{Pack,Unpack}{4,8}
56
+ *
57
+ * The struct and pickle (at least) modules need an efficient platform-
58
+ * independent way to store floating-point values as byte strings.
59
+ * The Pack routines produce a string from a C double, and the Unpack
60
+ * routines produce a C double from such a string. The suffix (4 or 8)
61
+ * specifies the number of bytes in the string.
62
+ *
63
+ * On platforms that appear to use (see _PyFloat_Init()) IEEE-754 formats
64
+ * these functions work by copying bits. On other platforms, the formats the
65
+ * 4- byte format is identical to the IEEE-754 single precision format, and
66
+ * the 8-byte format to the IEEE-754 double precision format, although the
67
+ * packing of INFs and NaNs (if such things exist on the platform) isn't
68
+ * handled correctly, and attempting to unpack a string containing an IEEE
69
+ * INF or NaN will raise an exception.
70
+ *
71
+ * On non-IEEE platforms with more precision, or larger dynamic range, than
72
+ * 754 supports, not all values can be packed; on non-IEEE platforms with less
73
+ * precision, or smaller dynamic range, not all values can be unpacked. What
74
+ * happens in such cases is partly accidental (alas).
75
+ */
76
+
77
+ /* The pack routines write 2, 4 or 8 bytes, starting at p. le is a bool
78
+ * argument, true if you want the string in little-endian format (exponent
79
+ * last, at p+1, p+3 or p+7), false if you want big-endian format (exponent
80
+ * first, at p).
81
+ * Return value: 0 if all is OK, -1 if error (and an exception is
82
+ * set, most likely OverflowError).
83
+ * There are two problems on non-IEEE platforms:
84
+ * 1): What this does is undefined if x is a NaN or infinity.
85
+ * 2): -0.0 and +0.0 produce the same string.
86
+ */
87
+ PyAPI_FUNC(int) _PyFloat_Pack2(double x, unsigned char *p, int le);
88
+ PyAPI_FUNC(int) _PyFloat_Pack4(double x, unsigned char *p, int le);
89
+ PyAPI_FUNC(int) _PyFloat_Pack8(double x, unsigned char *p, int le);
90
+
91
+ /* The unpack routines read 2, 4 or 8 bytes, starting at p. le is a bool
92
+ * argument, true if the string is in little-endian format (exponent
93
+ * last, at p+1, p+3 or p+7), false if big-endian (exponent first, at p).
94
+ * Return value: The unpacked double. On error, this is -1.0 and
95
+ * PyErr_Occurred() is true (and an exception is set, most likely
96
+ * OverflowError). Note that on a non-IEEE platform this will refuse
97
+ * to unpack a string that represents a NaN or infinity.
98
+ */
99
+ PyAPI_FUNC(double) _PyFloat_Unpack2(const unsigned char *p, int le);
100
+ PyAPI_FUNC(double) _PyFloat_Unpack4(const unsigned char *p, int le);
101
+ PyAPI_FUNC(double) _PyFloat_Unpack8(const unsigned char *p, int le);
102
+
103
+ PyAPI_FUNC(void) _PyFloat_DebugMallocStats(FILE* out);
104
+
105
+ /* Format the object based on the format_spec, as defined in PEP 3101
106
+ (Advanced String Formatting). */
107
+ PyAPI_FUNC(int) _PyFloat_FormatAdvancedWriter(
108
+ _PyUnicodeWriter *writer,
109
+ PyObject *obj,
110
+ PyObject *format_spec,
111
+ Py_ssize_t start,
112
+ Py_ssize_t end);
113
+ #endif /* Py_LIMITED_API */
114
+
115
+ #ifdef __cplusplus
116
+ }
117
+ #endif
118
+ #endif /* !Py_FLOATOBJECT_H */
evalkit_internvl/include/python3.10/frameobject.h ADDED
@@ -0,0 +1,20 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /* Frame object interface */
2
+
3
+ #ifndef Py_FRAMEOBJECT_H
4
+ #define Py_FRAMEOBJECT_H
5
+ #ifdef __cplusplus
6
+ extern "C" {
7
+ #endif
8
+
9
+ #include "pyframe.h"
10
+
11
+ #ifndef Py_LIMITED_API
12
+ # define Py_CPYTHON_FRAMEOBJECT_H
13
+ # include "cpython/frameobject.h"
14
+ # undef Py_CPYTHON_FRAMEOBJECT_H
15
+ #endif
16
+
17
+ #ifdef __cplusplus
18
+ }
19
+ #endif
20
+ #endif /* !Py_FRAMEOBJECT_H */
evalkit_internvl/include/python3.10/funcobject.h ADDED
@@ -0,0 +1,110 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+
2
+ /* Function object interface */
3
+ #ifndef Py_LIMITED_API
4
+ #ifndef Py_FUNCOBJECT_H
5
+ #define Py_FUNCOBJECT_H
6
+ #ifdef __cplusplus
7
+ extern "C" {
8
+ #endif
9
+
10
+
11
+ #define COMMON_FIELDS(PREFIX) \
12
+ PyObject *PREFIX ## globals; \
13
+ PyObject *PREFIX ## builtins; \
14
+ PyObject *PREFIX ## name; \
15
+ PyObject *PREFIX ## qualname; \
16
+ PyObject *PREFIX ## code; /* A code object, the __code__ attribute */ \
17
+ PyObject *PREFIX ## defaults; /* NULL or a tuple */ \
18
+ PyObject *PREFIX ## kwdefaults; /* NULL or a dict */ \
19
+ PyObject *PREFIX ## closure; /* NULL or a tuple of cell objects */
20
+
21
+ typedef struct {
22
+ COMMON_FIELDS(fc_)
23
+ } PyFrameConstructor;
24
+
25
+ /* Function objects and code objects should not be confused with each other:
26
+ *
27
+ * Function objects are created by the execution of the 'def' statement.
28
+ * They reference a code object in their __code__ attribute, which is a
29
+ * purely syntactic object, i.e. nothing more than a compiled version of some
30
+ * source code lines. There is one code object per source code "fragment",
31
+ * but each code object can be referenced by zero or many function objects
32
+ * depending only on how many times the 'def' statement in the source was
33
+ * executed so far.
34
+ */
35
+
36
+ typedef struct {
37
+ PyObject_HEAD
38
+ COMMON_FIELDS(func_)
39
+ PyObject *func_doc; /* The __doc__ attribute, can be anything */
40
+ PyObject *func_dict; /* The __dict__ attribute, a dict or NULL */
41
+ PyObject *func_weakreflist; /* List of weak references */
42
+ PyObject *func_module; /* The __module__ attribute, can be anything */
43
+ PyObject *func_annotations; /* Annotations, a dict or NULL */
44
+ vectorcallfunc vectorcall;
45
+
46
+ /* Invariant:
47
+ * func_closure contains the bindings for func_code->co_freevars, so
48
+ * PyTuple_Size(func_closure) == PyCode_GetNumFree(func_code)
49
+ * (func_closure may be NULL if PyCode_GetNumFree(func_code) == 0).
50
+ */
51
+ } PyFunctionObject;
52
+
53
+ PyAPI_DATA(PyTypeObject) PyFunction_Type;
54
+
55
+ #define PyFunction_Check(op) Py_IS_TYPE(op, &PyFunction_Type)
56
+
57
+ PyAPI_FUNC(PyObject *) PyFunction_New(PyObject *, PyObject *);
58
+ PyAPI_FUNC(PyObject *) PyFunction_NewWithQualName(PyObject *, PyObject *, PyObject *);
59
+ PyAPI_FUNC(PyObject *) PyFunction_GetCode(PyObject *);
60
+ PyAPI_FUNC(PyObject *) PyFunction_GetGlobals(PyObject *);
61
+ PyAPI_FUNC(PyObject *) PyFunction_GetModule(PyObject *);
62
+ PyAPI_FUNC(PyObject *) PyFunction_GetDefaults(PyObject *);
63
+ PyAPI_FUNC(int) PyFunction_SetDefaults(PyObject *, PyObject *);
64
+ PyAPI_FUNC(PyObject *) PyFunction_GetKwDefaults(PyObject *);
65
+ PyAPI_FUNC(int) PyFunction_SetKwDefaults(PyObject *, PyObject *);
66
+ PyAPI_FUNC(PyObject *) PyFunction_GetClosure(PyObject *);
67
+ PyAPI_FUNC(int) PyFunction_SetClosure(PyObject *, PyObject *);
68
+ PyAPI_FUNC(PyObject *) PyFunction_GetAnnotations(PyObject *);
69
+ PyAPI_FUNC(int) PyFunction_SetAnnotations(PyObject *, PyObject *);
70
+
71
+ #ifndef Py_LIMITED_API
72
+ PyAPI_FUNC(PyObject *) _PyFunction_Vectorcall(
73
+ PyObject *func,
74
+ PyObject *const *stack,
75
+ size_t nargsf,
76
+ PyObject *kwnames);
77
+ #endif
78
+
79
+ /* Macros for direct access to these values. Type checks are *not*
80
+ done, so use with care. */
81
+ #define PyFunction_GET_CODE(func) \
82
+ (((PyFunctionObject *)func) -> func_code)
83
+ #define PyFunction_GET_GLOBALS(func) \
84
+ (((PyFunctionObject *)func) -> func_globals)
85
+ #define PyFunction_GET_MODULE(func) \
86
+ (((PyFunctionObject *)func) -> func_module)
87
+ #define PyFunction_GET_DEFAULTS(func) \
88
+ (((PyFunctionObject *)func) -> func_defaults)
89
+ #define PyFunction_GET_KW_DEFAULTS(func) \
90
+ (((PyFunctionObject *)func) -> func_kwdefaults)
91
+ #define PyFunction_GET_CLOSURE(func) \
92
+ (((PyFunctionObject *)func) -> func_closure)
93
+ #define PyFunction_GET_ANNOTATIONS(func) \
94
+ (((PyFunctionObject *)func) -> func_annotations)
95
+
96
+ #define PyFunction_AS_FRAME_CONSTRUCTOR(func) \
97
+ ((PyFrameConstructor *)&((PyFunctionObject *)(func))->func_globals)
98
+
99
+ /* The classmethod and staticmethod types lives here, too */
100
+ PyAPI_DATA(PyTypeObject) PyClassMethod_Type;
101
+ PyAPI_DATA(PyTypeObject) PyStaticMethod_Type;
102
+
103
+ PyAPI_FUNC(PyObject *) PyClassMethod_New(PyObject *);
104
+ PyAPI_FUNC(PyObject *) PyStaticMethod_New(PyObject *);
105
+
106
+ #ifdef __cplusplus
107
+ }
108
+ #endif
109
+ #endif /* !Py_FUNCOBJECT_H */
110
+ #endif /* Py_LIMITED_API */
evalkit_internvl/include/python3.10/genobject.h ADDED
@@ -0,0 +1,100 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+
2
+ /* Generator object interface */
3
+
4
+ #ifndef Py_LIMITED_API
5
+ #ifndef Py_GENOBJECT_H
6
+ #define Py_GENOBJECT_H
7
+ #ifdef __cplusplus
8
+ extern "C" {
9
+ #endif
10
+
11
+ #include "pystate.h" /* _PyErr_StackItem */
12
+ #include "abstract.h" /* PySendResult */
13
+
14
+ /* _PyGenObject_HEAD defines the initial segment of generator
15
+ and coroutine objects. */
16
+ #define _PyGenObject_HEAD(prefix) \
17
+ PyObject_HEAD \
18
+ /* Note: gi_frame can be NULL if the generator is "finished" */ \
19
+ PyFrameObject *prefix##_frame; \
20
+ /* The code object backing the generator */ \
21
+ PyObject *prefix##_code; \
22
+ /* List of weak reference. */ \
23
+ PyObject *prefix##_weakreflist; \
24
+ /* Name of the generator. */ \
25
+ PyObject *prefix##_name; \
26
+ /* Qualified name of the generator. */ \
27
+ PyObject *prefix##_qualname; \
28
+ _PyErr_StackItem prefix##_exc_state;
29
+
30
+ typedef struct {
31
+ /* The gi_ prefix is intended to remind of generator-iterator. */
32
+ _PyGenObject_HEAD(gi)
33
+ } PyGenObject;
34
+
35
+ PyAPI_DATA(PyTypeObject) PyGen_Type;
36
+
37
+ #define PyGen_Check(op) PyObject_TypeCheck(op, &PyGen_Type)
38
+ #define PyGen_CheckExact(op) Py_IS_TYPE(op, &PyGen_Type)
39
+
40
+ PyAPI_FUNC(PyObject *) PyGen_New(PyFrameObject *);
41
+ PyAPI_FUNC(PyObject *) PyGen_NewWithQualName(PyFrameObject *,
42
+ PyObject *name, PyObject *qualname);
43
+ PyAPI_FUNC(int) _PyGen_SetStopIterationValue(PyObject *);
44
+ PyAPI_FUNC(int) _PyGen_FetchStopIterationValue(PyObject **);
45
+ PyObject *_PyGen_yf(PyGenObject *);
46
+ PyAPI_FUNC(void) _PyGen_Finalize(PyObject *self);
47
+
48
+ #ifndef Py_LIMITED_API
49
+ typedef struct {
50
+ _PyGenObject_HEAD(cr)
51
+ PyObject *cr_origin;
52
+ } PyCoroObject;
53
+
54
+ PyAPI_DATA(PyTypeObject) PyCoro_Type;
55
+ PyAPI_DATA(PyTypeObject) _PyCoroWrapper_Type;
56
+
57
+ #define PyCoro_CheckExact(op) Py_IS_TYPE(op, &PyCoro_Type)
58
+ PyObject *_PyCoro_GetAwaitableIter(PyObject *o);
59
+ PyAPI_FUNC(PyObject *) PyCoro_New(PyFrameObject *,
60
+ PyObject *name, PyObject *qualname);
61
+
62
+ /* Asynchronous Generators */
63
+
64
+ typedef struct {
65
+ _PyGenObject_HEAD(ag)
66
+ PyObject *ag_finalizer;
67
+
68
+ /* Flag is set to 1 when hooks set up by sys.set_asyncgen_hooks
69
+ were called on the generator, to avoid calling them more
70
+ than once. */
71
+ int ag_hooks_inited;
72
+
73
+ /* Flag is set to 1 when aclose() is called for the first time, or
74
+ when a StopAsyncIteration exception is raised. */
75
+ int ag_closed;
76
+
77
+ int ag_running_async;
78
+ } PyAsyncGenObject;
79
+
80
+ PyAPI_DATA(PyTypeObject) PyAsyncGen_Type;
81
+ PyAPI_DATA(PyTypeObject) _PyAsyncGenASend_Type;
82
+ PyAPI_DATA(PyTypeObject) _PyAsyncGenWrappedValue_Type;
83
+ PyAPI_DATA(PyTypeObject) _PyAsyncGenAThrow_Type;
84
+
85
+ PyAPI_FUNC(PyObject *) PyAsyncGen_New(PyFrameObject *,
86
+ PyObject *name, PyObject *qualname);
87
+
88
+ #define PyAsyncGen_CheckExact(op) Py_IS_TYPE(op, &PyAsyncGen_Type)
89
+
90
+ PyObject *_PyAsyncGenValueWrapperNew(PyObject *);
91
+
92
+ #endif
93
+
94
+ #undef _PyGenObject_HEAD
95
+
96
+ #ifdef __cplusplus
97
+ }
98
+ #endif
99
+ #endif /* !Py_GENOBJECT_H */
100
+ #endif /* Py_LIMITED_API */
evalkit_internvl/include/python3.10/import.h ADDED
@@ -0,0 +1,98 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /* Module definition and import interface */
2
+
3
+ #ifndef Py_IMPORT_H
4
+ #define Py_IMPORT_H
5
+ #ifdef __cplusplus
6
+ extern "C" {
7
+ #endif
8
+
9
+ PyAPI_FUNC(long) PyImport_GetMagicNumber(void);
10
+ PyAPI_FUNC(const char *) PyImport_GetMagicTag(void);
11
+ PyAPI_FUNC(PyObject *) PyImport_ExecCodeModule(
12
+ const char *name, /* UTF-8 encoded string */
13
+ PyObject *co
14
+ );
15
+ PyAPI_FUNC(PyObject *) PyImport_ExecCodeModuleEx(
16
+ const char *name, /* UTF-8 encoded string */
17
+ PyObject *co,
18
+ const char *pathname /* decoded from the filesystem encoding */
19
+ );
20
+ PyAPI_FUNC(PyObject *) PyImport_ExecCodeModuleWithPathnames(
21
+ const char *name, /* UTF-8 encoded string */
22
+ PyObject *co,
23
+ const char *pathname, /* decoded from the filesystem encoding */
24
+ const char *cpathname /* decoded from the filesystem encoding */
25
+ );
26
+ #if !defined(Py_LIMITED_API) || Py_LIMITED_API+0 >= 0x03030000
27
+ PyAPI_FUNC(PyObject *) PyImport_ExecCodeModuleObject(
28
+ PyObject *name,
29
+ PyObject *co,
30
+ PyObject *pathname,
31
+ PyObject *cpathname
32
+ );
33
+ #endif
34
+ PyAPI_FUNC(PyObject *) PyImport_GetModuleDict(void);
35
+ #if !defined(Py_LIMITED_API) || Py_LIMITED_API+0 >= 0x03070000
36
+ PyAPI_FUNC(PyObject *) PyImport_GetModule(PyObject *name);
37
+ #endif
38
+ #if !defined(Py_LIMITED_API) || Py_LIMITED_API+0 >= 0x03030000
39
+ PyAPI_FUNC(PyObject *) PyImport_AddModuleObject(
40
+ PyObject *name
41
+ );
42
+ #endif
43
+ PyAPI_FUNC(PyObject *) PyImport_AddModule(
44
+ const char *name /* UTF-8 encoded string */
45
+ );
46
+ PyAPI_FUNC(PyObject *) PyImport_ImportModule(
47
+ const char *name /* UTF-8 encoded string */
48
+ );
49
+ PyAPI_FUNC(PyObject *) PyImport_ImportModuleNoBlock(
50
+ const char *name /* UTF-8 encoded string */
51
+ );
52
+ PyAPI_FUNC(PyObject *) PyImport_ImportModuleLevel(
53
+ const char *name, /* UTF-8 encoded string */
54
+ PyObject *globals,
55
+ PyObject *locals,
56
+ PyObject *fromlist,
57
+ int level
58
+ );
59
+ #if !defined(Py_LIMITED_API) || Py_LIMITED_API+0 >= 0x03050000
60
+ PyAPI_FUNC(PyObject *) PyImport_ImportModuleLevelObject(
61
+ PyObject *name,
62
+ PyObject *globals,
63
+ PyObject *locals,
64
+ PyObject *fromlist,
65
+ int level
66
+ );
67
+ #endif
68
+
69
+ #define PyImport_ImportModuleEx(n, g, l, f) \
70
+ PyImport_ImportModuleLevel(n, g, l, f, 0)
71
+
72
+ PyAPI_FUNC(PyObject *) PyImport_GetImporter(PyObject *path);
73
+ PyAPI_FUNC(PyObject *) PyImport_Import(PyObject *name);
74
+ PyAPI_FUNC(PyObject *) PyImport_ReloadModule(PyObject *m);
75
+ #if !defined(Py_LIMITED_API) || Py_LIMITED_API+0 >= 0x03030000
76
+ PyAPI_FUNC(int) PyImport_ImportFrozenModuleObject(
77
+ PyObject *name
78
+ );
79
+ #endif
80
+ PyAPI_FUNC(int) PyImport_ImportFrozenModule(
81
+ const char *name /* UTF-8 encoded string */
82
+ );
83
+
84
+ PyAPI_FUNC(int) PyImport_AppendInittab(
85
+ const char *name, /* ASCII encoded string */
86
+ PyObject* (*initfunc)(void)
87
+ );
88
+
89
+ #ifndef Py_LIMITED_API
90
+ # define Py_CPYTHON_IMPORT_H
91
+ # include "cpython/import.h"
92
+ # undef Py_CPYTHON_IMPORT_H
93
+ #endif
94
+
95
+ #ifdef __cplusplus
96
+ }
97
+ #endif
98
+ #endif /* !Py_IMPORT_H */
evalkit_internvl/include/python3.10/interpreteridobject.h ADDED
@@ -0,0 +1,17 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ #ifndef Py_INTERPRETERIDOBJECT_H
2
+ #define Py_INTERPRETERIDOBJECT_H
3
+
4
+ #ifdef __cplusplus
5
+ extern "C" {
6
+ #endif
7
+
8
+ #ifndef Py_LIMITED_API
9
+ # define Py_CPYTHON_INTERPRETERIDOBJECT_H
10
+ # include "cpython/interpreteridobject.h"
11
+ # undef Py_CPYTHON_INTERPRETERIDOBJECT_H
12
+ #endif
13
+
14
+ #ifdef __cplusplus
15
+ }
16
+ #endif
17
+ #endif /* !Py_INTERPRETERIDOBJECT_H */
evalkit_internvl/include/python3.10/intrcheck.h ADDED
@@ -0,0 +1,30 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ #ifndef Py_INTRCHECK_H
2
+ #define Py_INTRCHECK_H
3
+ #ifdef __cplusplus
4
+ extern "C" {
5
+ #endif
6
+
7
+ PyAPI_FUNC(int) PyOS_InterruptOccurred(void);
8
+ #ifdef HAVE_FORK
9
+ #if !defined(Py_LIMITED_API) || Py_LIMITED_API+0 >= 0x03070000
10
+ PyAPI_FUNC(void) PyOS_BeforeFork(void);
11
+ PyAPI_FUNC(void) PyOS_AfterFork_Parent(void);
12
+ PyAPI_FUNC(void) PyOS_AfterFork_Child(void);
13
+ #endif
14
+ #endif
15
+ /* Deprecated, please use PyOS_AfterFork_Child() instead */
16
+ Py_DEPRECATED(3.7) PyAPI_FUNC(void) PyOS_AfterFork(void);
17
+
18
+ #ifndef Py_LIMITED_API
19
+ PyAPI_FUNC(int) _PyOS_IsMainThread(void);
20
+
21
+ #ifdef MS_WINDOWS
22
+ /* windows.h is not included by Python.h so use void* instead of HANDLE */
23
+ PyAPI_FUNC(void*) _PyOS_SigintEvent(void);
24
+ #endif
25
+ #endif /* !Py_LIMITED_API */
26
+
27
+ #ifdef __cplusplus
28
+ }
29
+ #endif
30
+ #endif /* !Py_INTRCHECK_H */
evalkit_internvl/include/python3.10/iterobject.h ADDED
@@ -0,0 +1,27 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ #ifndef Py_ITEROBJECT_H
2
+ #define Py_ITEROBJECT_H
3
+ /* Iterators (the basic kind, over a sequence) */
4
+ #ifdef __cplusplus
5
+ extern "C" {
6
+ #endif
7
+
8
+ PyAPI_DATA(PyTypeObject) PySeqIter_Type;
9
+ PyAPI_DATA(PyTypeObject) PyCallIter_Type;
10
+ #ifdef Py_BUILD_CORE
11
+ extern PyTypeObject _PyAnextAwaitable_Type;
12
+ #endif
13
+
14
+ #define PySeqIter_Check(op) Py_IS_TYPE(op, &PySeqIter_Type)
15
+
16
+ PyAPI_FUNC(PyObject *) PySeqIter_New(PyObject *);
17
+
18
+
19
+ #define PyCallIter_Check(op) Py_IS_TYPE(op, &PyCallIter_Type)
20
+
21
+ PyAPI_FUNC(PyObject *) PyCallIter_New(PyObject *, PyObject *);
22
+
23
+ #ifdef __cplusplus
24
+ }
25
+ #endif
26
+ #endif /* !Py_ITEROBJECT_H */
27
+
evalkit_internvl/include/python3.10/listobject.h ADDED
@@ -0,0 +1,52 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /* List object interface
2
+
3
+ Another generally useful object type is a list of object pointers.
4
+ This is a mutable type: the list items can be changed, and items can be
5
+ added or removed. Out-of-range indices or non-list objects are ignored.
6
+
7
+ WARNING: PyList_SetItem does not increment the new item's reference count,
8
+ but does decrement the reference count of the item it replaces, if not nil.
9
+ It does *decrement* the reference count if it is *not* inserted in the list.
10
+ Similarly, PyList_GetItem does not increment the returned item's reference
11
+ count.
12
+ */
13
+
14
+ #ifndef Py_LISTOBJECT_H
15
+ #define Py_LISTOBJECT_H
16
+ #ifdef __cplusplus
17
+ extern "C" {
18
+ #endif
19
+
20
+ PyAPI_DATA(PyTypeObject) PyList_Type;
21
+ PyAPI_DATA(PyTypeObject) PyListIter_Type;
22
+ PyAPI_DATA(PyTypeObject) PyListRevIter_Type;
23
+
24
+ #define PyList_Check(op) \
25
+ PyType_FastSubclass(Py_TYPE(op), Py_TPFLAGS_LIST_SUBCLASS)
26
+ #define PyList_CheckExact(op) Py_IS_TYPE(op, &PyList_Type)
27
+
28
+ PyAPI_FUNC(PyObject *) PyList_New(Py_ssize_t size);
29
+ PyAPI_FUNC(Py_ssize_t) PyList_Size(PyObject *);
30
+
31
+ PyAPI_FUNC(PyObject *) PyList_GetItem(PyObject *, Py_ssize_t);
32
+ PyAPI_FUNC(int) PyList_SetItem(PyObject *, Py_ssize_t, PyObject *);
33
+ PyAPI_FUNC(int) PyList_Insert(PyObject *, Py_ssize_t, PyObject *);
34
+ PyAPI_FUNC(int) PyList_Append(PyObject *, PyObject *);
35
+
36
+ PyAPI_FUNC(PyObject *) PyList_GetSlice(PyObject *, Py_ssize_t, Py_ssize_t);
37
+ PyAPI_FUNC(int) PyList_SetSlice(PyObject *, Py_ssize_t, Py_ssize_t, PyObject *);
38
+
39
+ PyAPI_FUNC(int) PyList_Sort(PyObject *);
40
+ PyAPI_FUNC(int) PyList_Reverse(PyObject *);
41
+ PyAPI_FUNC(PyObject *) PyList_AsTuple(PyObject *);
42
+
43
+ #ifndef Py_LIMITED_API
44
+ # define Py_CPYTHON_LISTOBJECT_H
45
+ # include "cpython/listobject.h"
46
+ # undef Py_CPYTHON_LISTOBJECT_H
47
+ #endif
48
+
49
+ #ifdef __cplusplus
50
+ }
51
+ #endif
52
+ #endif /* !Py_LISTOBJECT_H */
evalkit_internvl/include/python3.10/longintrepr.h ADDED
@@ -0,0 +1,99 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ #ifndef Py_LIMITED_API
2
+ #ifndef Py_LONGINTREPR_H
3
+ #define Py_LONGINTREPR_H
4
+ #ifdef __cplusplus
5
+ extern "C" {
6
+ #endif
7
+
8
+
9
+ /* This is published for the benefit of "friends" marshal.c and _decimal.c. */
10
+
11
+ /* Parameters of the integer representation. There are two different
12
+ sets of parameters: one set for 30-bit digits, stored in an unsigned 32-bit
13
+ integer type, and one set for 15-bit digits with each digit stored in an
14
+ unsigned short. The value of PYLONG_BITS_IN_DIGIT, defined either at
15
+ configure time or in pyport.h, is used to decide which digit size to use.
16
+
17
+ Type 'digit' should be able to hold 2*PyLong_BASE-1, and type 'twodigits'
18
+ should be an unsigned integer type able to hold all integers up to
19
+ PyLong_BASE*PyLong_BASE-1. x_sub assumes that 'digit' is an unsigned type,
20
+ and that overflow is handled by taking the result modulo 2**N for some N >
21
+ PyLong_SHIFT. The majority of the code doesn't care about the precise
22
+ value of PyLong_SHIFT, but there are some notable exceptions:
23
+
24
+ - long_pow() requires that PyLong_SHIFT be divisible by 5
25
+
26
+ - PyLong_{As,From}ByteArray require that PyLong_SHIFT be at least 8
27
+
28
+ - long_hash() requires that PyLong_SHIFT is *strictly* less than the number
29
+ of bits in an unsigned long, as do the PyLong <-> long (or unsigned long)
30
+ conversion functions
31
+
32
+ - the Python int <-> size_t/Py_ssize_t conversion functions expect that
33
+ PyLong_SHIFT is strictly less than the number of bits in a size_t
34
+
35
+ - the marshal code currently expects that PyLong_SHIFT is a multiple of 15
36
+
37
+ - NSMALLNEGINTS and NSMALLPOSINTS should be small enough to fit in a single
38
+ digit; with the current values this forces PyLong_SHIFT >= 9
39
+
40
+ The values 15 and 30 should fit all of the above requirements, on any
41
+ platform.
42
+ */
43
+
44
+ #if PYLONG_BITS_IN_DIGIT == 30
45
+ typedef uint32_t digit;
46
+ typedef int32_t sdigit; /* signed variant of digit */
47
+ typedef uint64_t twodigits;
48
+ typedef int64_t stwodigits; /* signed variant of twodigits */
49
+ #define PyLong_SHIFT 30
50
+ #define _PyLong_DECIMAL_SHIFT 9 /* max(e such that 10**e fits in a digit) */
51
+ #define _PyLong_DECIMAL_BASE ((digit)1000000000) /* 10 ** DECIMAL_SHIFT */
52
+ #elif PYLONG_BITS_IN_DIGIT == 15
53
+ typedef unsigned short digit;
54
+ typedef short sdigit; /* signed variant of digit */
55
+ typedef unsigned long twodigits;
56
+ typedef long stwodigits; /* signed variant of twodigits */
57
+ #define PyLong_SHIFT 15
58
+ #define _PyLong_DECIMAL_SHIFT 4 /* max(e such that 10**e fits in a digit) */
59
+ #define _PyLong_DECIMAL_BASE ((digit)10000) /* 10 ** DECIMAL_SHIFT */
60
+ #else
61
+ #error "PYLONG_BITS_IN_DIGIT should be 15 or 30"
62
+ #endif
63
+ #define PyLong_BASE ((digit)1 << PyLong_SHIFT)
64
+ #define PyLong_MASK ((digit)(PyLong_BASE - 1))
65
+
66
+ #if PyLong_SHIFT % 5 != 0
67
+ #error "longobject.c requires that PyLong_SHIFT be divisible by 5"
68
+ #endif
69
+
70
+ /* Long integer representation.
71
+ The absolute value of a number is equal to
72
+ SUM(for i=0 through abs(ob_size)-1) ob_digit[i] * 2**(SHIFT*i)
73
+ Negative numbers are represented with ob_size < 0;
74
+ zero is represented by ob_size == 0.
75
+ In a normalized number, ob_digit[abs(ob_size)-1] (the most significant
76
+ digit) is never zero. Also, in all cases, for all valid i,
77
+ 0 <= ob_digit[i] <= MASK.
78
+ The allocation function takes care of allocating extra memory
79
+ so that ob_digit[0] ... ob_digit[abs(ob_size)-1] are actually available.
80
+
81
+ CAUTION: Generic code manipulating subtypes of PyVarObject has to
82
+ aware that ints abuse ob_size's sign bit.
83
+ */
84
+
85
+ struct _longobject {
86
+ PyObject_VAR_HEAD
87
+ digit ob_digit[1];
88
+ };
89
+
90
+ PyAPI_FUNC(PyLongObject *) _PyLong_New(Py_ssize_t);
91
+
92
+ /* Return a copy of src. */
93
+ PyAPI_FUNC(PyObject *) _PyLong_Copy(PyLongObject *src);
94
+
95
+ #ifdef __cplusplus
96
+ }
97
+ #endif
98
+ #endif /* !Py_LONGINTREPR_H */
99
+ #endif /* Py_LIMITED_API */
evalkit_internvl/include/python3.10/longobject.h ADDED
@@ -0,0 +1,220 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ #ifndef Py_LONGOBJECT_H
2
+ #define Py_LONGOBJECT_H
3
+ #ifdef __cplusplus
4
+ extern "C" {
5
+ #endif
6
+
7
+
8
+ /* Long (arbitrary precision) integer object interface */
9
+
10
+ typedef struct _longobject PyLongObject; /* Revealed in longintrepr.h */
11
+
12
+ PyAPI_DATA(PyTypeObject) PyLong_Type;
13
+
14
+ #define PyLong_Check(op) \
15
+ PyType_FastSubclass(Py_TYPE(op), Py_TPFLAGS_LONG_SUBCLASS)
16
+ #define PyLong_CheckExact(op) Py_IS_TYPE(op, &PyLong_Type)
17
+
18
+ PyAPI_FUNC(PyObject *) PyLong_FromLong(long);
19
+ PyAPI_FUNC(PyObject *) PyLong_FromUnsignedLong(unsigned long);
20
+ PyAPI_FUNC(PyObject *) PyLong_FromSize_t(size_t);
21
+ PyAPI_FUNC(PyObject *) PyLong_FromSsize_t(Py_ssize_t);
22
+ PyAPI_FUNC(PyObject *) PyLong_FromDouble(double);
23
+ PyAPI_FUNC(long) PyLong_AsLong(PyObject *);
24
+ PyAPI_FUNC(long) PyLong_AsLongAndOverflow(PyObject *, int *);
25
+ PyAPI_FUNC(Py_ssize_t) PyLong_AsSsize_t(PyObject *);
26
+ PyAPI_FUNC(size_t) PyLong_AsSize_t(PyObject *);
27
+ PyAPI_FUNC(unsigned long) PyLong_AsUnsignedLong(PyObject *);
28
+ PyAPI_FUNC(unsigned long) PyLong_AsUnsignedLongMask(PyObject *);
29
+ #ifndef Py_LIMITED_API
30
+ PyAPI_FUNC(int) _PyLong_AsInt(PyObject *);
31
+ #endif
32
+ PyAPI_FUNC(PyObject *) PyLong_GetInfo(void);
33
+
34
+ /* It may be useful in the future. I've added it in the PyInt -> PyLong
35
+ cleanup to keep the extra information. [CH] */
36
+ #define PyLong_AS_LONG(op) PyLong_AsLong(op)
37
+
38
+ /* Issue #1983: pid_t can be longer than a C long on some systems */
39
+ #if !defined(SIZEOF_PID_T) || SIZEOF_PID_T == SIZEOF_INT
40
+ #define _Py_PARSE_PID "i"
41
+ #define PyLong_FromPid PyLong_FromLong
42
+ #define PyLong_AsPid PyLong_AsLong
43
+ #elif SIZEOF_PID_T == SIZEOF_LONG
44
+ #define _Py_PARSE_PID "l"
45
+ #define PyLong_FromPid PyLong_FromLong
46
+ #define PyLong_AsPid PyLong_AsLong
47
+ #elif defined(SIZEOF_LONG_LONG) && SIZEOF_PID_T == SIZEOF_LONG_LONG
48
+ #define _Py_PARSE_PID "L"
49
+ #define PyLong_FromPid PyLong_FromLongLong
50
+ #define PyLong_AsPid PyLong_AsLongLong
51
+ #else
52
+ #error "sizeof(pid_t) is neither sizeof(int), sizeof(long) or sizeof(long long)"
53
+ #endif /* SIZEOF_PID_T */
54
+
55
+ #if SIZEOF_VOID_P == SIZEOF_INT
56
+ # define _Py_PARSE_INTPTR "i"
57
+ # define _Py_PARSE_UINTPTR "I"
58
+ #elif SIZEOF_VOID_P == SIZEOF_LONG
59
+ # define _Py_PARSE_INTPTR "l"
60
+ # define _Py_PARSE_UINTPTR "k"
61
+ #elif defined(SIZEOF_LONG_LONG) && SIZEOF_VOID_P == SIZEOF_LONG_LONG
62
+ # define _Py_PARSE_INTPTR "L"
63
+ # define _Py_PARSE_UINTPTR "K"
64
+ #else
65
+ # error "void* different in size from int, long and long long"
66
+ #endif /* SIZEOF_VOID_P */
67
+
68
+ #ifndef Py_LIMITED_API
69
+ PyAPI_FUNC(int) _PyLong_UnsignedShort_Converter(PyObject *, void *);
70
+ PyAPI_FUNC(int) _PyLong_UnsignedInt_Converter(PyObject *, void *);
71
+ PyAPI_FUNC(int) _PyLong_UnsignedLong_Converter(PyObject *, void *);
72
+ PyAPI_FUNC(int) _PyLong_UnsignedLongLong_Converter(PyObject *, void *);
73
+ PyAPI_FUNC(int) _PyLong_Size_t_Converter(PyObject *, void *);
74
+ #endif
75
+
76
+ /* Used by Python/mystrtoul.c, _PyBytes_FromHex(),
77
+ _PyBytes_DecodeEscape(), etc. */
78
+ #ifndef Py_LIMITED_API
79
+ PyAPI_DATA(unsigned char) _PyLong_DigitValue[256];
80
+ #endif
81
+
82
+ /* _PyLong_Frexp returns a double x and an exponent e such that the
83
+ true value is approximately equal to x * 2**e. e is >= 0. x is
84
+ 0.0 if and only if the input is 0 (in which case, e and x are both
85
+ zeroes); otherwise, 0.5 <= abs(x) < 1.0. On overflow, which is
86
+ possible if the number of bits doesn't fit into a Py_ssize_t, sets
87
+ OverflowError and returns -1.0 for x, 0 for e. */
88
+ #ifndef Py_LIMITED_API
89
+ PyAPI_FUNC(double) _PyLong_Frexp(PyLongObject *a, Py_ssize_t *e);
90
+ #endif
91
+
92
+ PyAPI_FUNC(double) PyLong_AsDouble(PyObject *);
93
+ PyAPI_FUNC(PyObject *) PyLong_FromVoidPtr(void *);
94
+ PyAPI_FUNC(void *) PyLong_AsVoidPtr(PyObject *);
95
+
96
+ PyAPI_FUNC(PyObject *) PyLong_FromLongLong(long long);
97
+ PyAPI_FUNC(PyObject *) PyLong_FromUnsignedLongLong(unsigned long long);
98
+ PyAPI_FUNC(long long) PyLong_AsLongLong(PyObject *);
99
+ PyAPI_FUNC(unsigned long long) PyLong_AsUnsignedLongLong(PyObject *);
100
+ PyAPI_FUNC(unsigned long long) PyLong_AsUnsignedLongLongMask(PyObject *);
101
+ PyAPI_FUNC(long long) PyLong_AsLongLongAndOverflow(PyObject *, int *);
102
+
103
+ PyAPI_FUNC(PyObject *) PyLong_FromString(const char *, char **, int);
104
+ #ifndef Py_LIMITED_API
105
+ PyAPI_FUNC(PyObject *) PyLong_FromUnicodeObject(PyObject *u, int base);
106
+ PyAPI_FUNC(PyObject *) _PyLong_FromBytes(const char *, Py_ssize_t, int);
107
+ #endif
108
+
109
+ #ifndef Py_LIMITED_API
110
+ /* _PyLong_Sign. Return 0 if v is 0, -1 if v < 0, +1 if v > 0.
111
+ v must not be NULL, and must be a normalized long.
112
+ There are no error cases.
113
+ */
114
+ PyAPI_FUNC(int) _PyLong_Sign(PyObject *v);
115
+
116
+
117
+ /* _PyLong_NumBits. Return the number of bits needed to represent the
118
+ absolute value of a long. For example, this returns 1 for 1 and -1, 2
119
+ for 2 and -2, and 2 for 3 and -3. It returns 0 for 0.
120
+ v must not be NULL, and must be a normalized long.
121
+ (size_t)-1 is returned and OverflowError set if the true result doesn't
122
+ fit in a size_t.
123
+ */
124
+ PyAPI_FUNC(size_t) _PyLong_NumBits(PyObject *v);
125
+
126
+ /* _PyLong_DivmodNear. Given integers a and b, compute the nearest
127
+ integer q to the exact quotient a / b, rounding to the nearest even integer
128
+ in the case of a tie. Return (q, r), where r = a - q*b. The remainder r
129
+ will satisfy abs(r) <= abs(b)/2, with equality possible only if q is
130
+ even.
131
+ */
132
+ PyAPI_FUNC(PyObject *) _PyLong_DivmodNear(PyObject *, PyObject *);
133
+
134
+ /* _PyLong_FromByteArray: View the n unsigned bytes as a binary integer in
135
+ base 256, and return a Python int with the same numeric value.
136
+ If n is 0, the integer is 0. Else:
137
+ If little_endian is 1/true, bytes[n-1] is the MSB and bytes[0] the LSB;
138
+ else (little_endian is 0/false) bytes[0] is the MSB and bytes[n-1] the
139
+ LSB.
140
+ If is_signed is 0/false, view the bytes as a non-negative integer.
141
+ If is_signed is 1/true, view the bytes as a 2's-complement integer,
142
+ non-negative if bit 0x80 of the MSB is clear, negative if set.
143
+ Error returns:
144
+ + Return NULL with the appropriate exception set if there's not
145
+ enough memory to create the Python int.
146
+ */
147
+ PyAPI_FUNC(PyObject *) _PyLong_FromByteArray(
148
+ const unsigned char* bytes, size_t n,
149
+ int little_endian, int is_signed);
150
+
151
+ /* _PyLong_AsByteArray: Convert the least-significant 8*n bits of long
152
+ v to a base-256 integer, stored in array bytes. Normally return 0,
153
+ return -1 on error.
154
+ If little_endian is 1/true, store the MSB at bytes[n-1] and the LSB at
155
+ bytes[0]; else (little_endian is 0/false) store the MSB at bytes[0] and
156
+ the LSB at bytes[n-1].
157
+ If is_signed is 0/false, it's an error if v < 0; else (v >= 0) n bytes
158
+ are filled and there's nothing special about bit 0x80 of the MSB.
159
+ If is_signed is 1/true, bytes is filled with the 2's-complement
160
+ representation of v's value. Bit 0x80 of the MSB is the sign bit.
161
+ Error returns (-1):
162
+ + is_signed is 0 and v < 0. TypeError is set in this case, and bytes
163
+ isn't altered.
164
+ + n isn't big enough to hold the full mathematical value of v. For
165
+ example, if is_signed is 0 and there are more digits in the v than
166
+ fit in n; or if is_signed is 1, v < 0, and n is just 1 bit shy of
167
+ being large enough to hold a sign bit. OverflowError is set in this
168
+ case, but bytes holds the least-significant n bytes of the true value.
169
+ */
170
+ PyAPI_FUNC(int) _PyLong_AsByteArray(PyLongObject* v,
171
+ unsigned char* bytes, size_t n,
172
+ int little_endian, int is_signed);
173
+
174
+ /* _PyLong_Format: Convert the long to a string object with given base,
175
+ appending a base prefix of 0[box] if base is 2, 8 or 16. */
176
+ PyAPI_FUNC(PyObject *) _PyLong_Format(PyObject *obj, int base);
177
+
178
+ PyAPI_FUNC(int) _PyLong_FormatWriter(
179
+ _PyUnicodeWriter *writer,
180
+ PyObject *obj,
181
+ int base,
182
+ int alternate);
183
+
184
+ PyAPI_FUNC(char*) _PyLong_FormatBytesWriter(
185
+ _PyBytesWriter *writer,
186
+ char *str,
187
+ PyObject *obj,
188
+ int base,
189
+ int alternate);
190
+
191
+ /* Format the object based on the format_spec, as defined in PEP 3101
192
+ (Advanced String Formatting). */
193
+ PyAPI_FUNC(int) _PyLong_FormatAdvancedWriter(
194
+ _PyUnicodeWriter *writer,
195
+ PyObject *obj,
196
+ PyObject *format_spec,
197
+ Py_ssize_t start,
198
+ Py_ssize_t end);
199
+ #endif /* Py_LIMITED_API */
200
+
201
+ /* These aren't really part of the int object, but they're handy. The
202
+ functions are in Python/mystrtoul.c.
203
+ */
204
+ PyAPI_FUNC(unsigned long) PyOS_strtoul(const char *, char **, int);
205
+ PyAPI_FUNC(long) PyOS_strtol(const char *, char **, int);
206
+
207
+ #ifndef Py_LIMITED_API
208
+ /* For use by the gcd function in mathmodule.c */
209
+ PyAPI_FUNC(PyObject *) _PyLong_GCD(PyObject *, PyObject *);
210
+ #endif /* !Py_LIMITED_API */
211
+
212
+ #ifndef Py_LIMITED_API
213
+ PyAPI_FUNC(PyObject *) _PyLong_Rshift(PyObject *, size_t);
214
+ PyAPI_FUNC(PyObject *) _PyLong_Lshift(PyObject *, size_t);
215
+ #endif
216
+
217
+ #ifdef __cplusplus
218
+ }
219
+ #endif
220
+ #endif /* !Py_LONGOBJECT_H */
evalkit_internvl/include/python3.10/marshal.h ADDED
@@ -0,0 +1,28 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+
2
+ /* Interface for marshal.c */
3
+
4
+ #ifndef Py_MARSHAL_H
5
+ #define Py_MARSHAL_H
6
+ #ifdef __cplusplus
7
+ extern "C" {
8
+ #endif
9
+
10
+ #define Py_MARSHAL_VERSION 4
11
+
12
+ PyAPI_FUNC(void) PyMarshal_WriteLongToFile(long, FILE *, int);
13
+ PyAPI_FUNC(void) PyMarshal_WriteObjectToFile(PyObject *, FILE *, int);
14
+ PyAPI_FUNC(PyObject *) PyMarshal_WriteObjectToString(PyObject *, int);
15
+
16
+ #ifndef Py_LIMITED_API
17
+ PyAPI_FUNC(long) PyMarshal_ReadLongFromFile(FILE *);
18
+ PyAPI_FUNC(int) PyMarshal_ReadShortFromFile(FILE *);
19
+ PyAPI_FUNC(PyObject *) PyMarshal_ReadObjectFromFile(FILE *);
20
+ PyAPI_FUNC(PyObject *) PyMarshal_ReadLastObjectFromFile(FILE *);
21
+ #endif
22
+ PyAPI_FUNC(PyObject *) PyMarshal_ReadObjectFromString(const char *,
23
+ Py_ssize_t);
24
+
25
+ #ifdef __cplusplus
26
+ }
27
+ #endif
28
+ #endif /* !Py_MARSHAL_H */
evalkit_internvl/include/python3.10/memoryobject.h ADDED
@@ -0,0 +1,72 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /* Memory view object. In Python this is available as "memoryview". */
2
+
3
+ #ifndef Py_MEMORYOBJECT_H
4
+ #define Py_MEMORYOBJECT_H
5
+ #ifdef __cplusplus
6
+ extern "C" {
7
+ #endif
8
+
9
+ #ifndef Py_LIMITED_API
10
+ PyAPI_DATA(PyTypeObject) _PyManagedBuffer_Type;
11
+ #endif
12
+ PyAPI_DATA(PyTypeObject) PyMemoryView_Type;
13
+
14
+ #define PyMemoryView_Check(op) Py_IS_TYPE(op, &PyMemoryView_Type)
15
+
16
+ #ifndef Py_LIMITED_API
17
+ /* Get a pointer to the memoryview's private copy of the exporter's buffer. */
18
+ #define PyMemoryView_GET_BUFFER(op) (&((PyMemoryViewObject *)(op))->view)
19
+ /* Get a pointer to the exporting object (this may be NULL!). */
20
+ #define PyMemoryView_GET_BASE(op) (((PyMemoryViewObject *)(op))->view.obj)
21
+ #endif
22
+
23
+ PyAPI_FUNC(PyObject *) PyMemoryView_FromObject(PyObject *base);
24
+ #if !defined(Py_LIMITED_API) || Py_LIMITED_API+0 >= 0x03030000
25
+ PyAPI_FUNC(PyObject *) PyMemoryView_FromMemory(char *mem, Py_ssize_t size,
26
+ int flags);
27
+ #endif
28
+ #ifndef Py_LIMITED_API
29
+ PyAPI_FUNC(PyObject *) PyMemoryView_FromBuffer(Py_buffer *info);
30
+ #endif
31
+ PyAPI_FUNC(PyObject *) PyMemoryView_GetContiguous(PyObject *base,
32
+ int buffertype,
33
+ char order);
34
+
35
+
36
+ /* The structs are declared here so that macros can work, but they shouldn't
37
+ be considered public. Don't access their fields directly, use the macros
38
+ and functions instead! */
39
+ #ifndef Py_LIMITED_API
40
+ #define _Py_MANAGED_BUFFER_RELEASED 0x001 /* access to exporter blocked */
41
+ #define _Py_MANAGED_BUFFER_FREE_FORMAT 0x002 /* free format */
42
+ typedef struct {
43
+ PyObject_HEAD
44
+ int flags; /* state flags */
45
+ Py_ssize_t exports; /* number of direct memoryview exports */
46
+ Py_buffer master; /* snapshot buffer obtained from the original exporter */
47
+ } _PyManagedBufferObject;
48
+
49
+
50
+ /* memoryview state flags */
51
+ #define _Py_MEMORYVIEW_RELEASED 0x001 /* access to master buffer blocked */
52
+ #define _Py_MEMORYVIEW_C 0x002 /* C-contiguous layout */
53
+ #define _Py_MEMORYVIEW_FORTRAN 0x004 /* Fortran contiguous layout */
54
+ #define _Py_MEMORYVIEW_SCALAR 0x008 /* scalar: ndim = 0 */
55
+ #define _Py_MEMORYVIEW_PIL 0x010 /* PIL-style layout */
56
+
57
+ typedef struct {
58
+ PyObject_VAR_HEAD
59
+ _PyManagedBufferObject *mbuf; /* managed buffer */
60
+ Py_hash_t hash; /* hash value for read-only views */
61
+ int flags; /* state flags */
62
+ Py_ssize_t exports; /* number of buffer re-exports */
63
+ Py_buffer view; /* private copy of the exporter's view */
64
+ PyObject *weakreflist;
65
+ Py_ssize_t ob_array[1]; /* shape, strides, suboffsets */
66
+ } PyMemoryViewObject;
67
+ #endif
68
+
69
+ #ifdef __cplusplus
70
+ }
71
+ #endif
72
+ #endif /* !Py_MEMORYOBJECT_H */
evalkit_internvl/include/python3.10/methodobject.h ADDED
@@ -0,0 +1,116 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+
2
+ /* Method object interface */
3
+
4
+ #ifndef Py_METHODOBJECT_H
5
+ #define Py_METHODOBJECT_H
6
+ #ifdef __cplusplus
7
+ extern "C" {
8
+ #endif
9
+
10
+ /* This is about the type 'builtin_function_or_method',
11
+ not Python methods in user-defined classes. See classobject.h
12
+ for the latter. */
13
+
14
+ PyAPI_DATA(PyTypeObject) PyCFunction_Type;
15
+
16
+ #define PyCFunction_CheckExact(op) Py_IS_TYPE(op, &PyCFunction_Type)
17
+ #define PyCFunction_Check(op) PyObject_TypeCheck(op, &PyCFunction_Type)
18
+
19
+ typedef PyObject *(*PyCFunction)(PyObject *, PyObject *);
20
+ typedef PyObject *(*_PyCFunctionFast) (PyObject *, PyObject *const *, Py_ssize_t);
21
+ typedef PyObject *(*PyCFunctionWithKeywords)(PyObject *, PyObject *,
22
+ PyObject *);
23
+ typedef PyObject *(*_PyCFunctionFastWithKeywords) (PyObject *,
24
+ PyObject *const *, Py_ssize_t,
25
+ PyObject *);
26
+ typedef PyObject *(*PyCMethod)(PyObject *, PyTypeObject *, PyObject *const *,
27
+ size_t, PyObject *);
28
+
29
+ PyAPI_FUNC(PyCFunction) PyCFunction_GetFunction(PyObject *);
30
+ PyAPI_FUNC(PyObject *) PyCFunction_GetSelf(PyObject *);
31
+ PyAPI_FUNC(int) PyCFunction_GetFlags(PyObject *);
32
+
33
+ Py_DEPRECATED(3.9) PyAPI_FUNC(PyObject *) PyCFunction_Call(PyObject *, PyObject *, PyObject *);
34
+
35
+ struct PyMethodDef {
36
+ const char *ml_name; /* The name of the built-in function/method */
37
+ PyCFunction ml_meth; /* The C function that implements it */
38
+ int ml_flags; /* Combination of METH_xxx flags, which mostly
39
+ describe the args expected by the C func */
40
+ const char *ml_doc; /* The __doc__ attribute, or NULL */
41
+ };
42
+ typedef struct PyMethodDef PyMethodDef;
43
+
44
+ /* PyCFunction_New is declared as a function for stable ABI (declaration is
45
+ * needed for e.g. GCC with -fvisibility=hidden), but redefined as a macro
46
+ * that calls PyCFunction_NewEx. */
47
+ PyAPI_FUNC(PyObject *) PyCFunction_New(PyMethodDef *, PyObject *);
48
+ #define PyCFunction_New(ML, SELF) PyCFunction_NewEx((ML), (SELF), NULL)
49
+
50
+ /* PyCFunction_NewEx is similar: on 3.9+, this calls PyCMethod_New. */
51
+ PyAPI_FUNC(PyObject *) PyCFunction_NewEx(PyMethodDef *, PyObject *,
52
+ PyObject *);
53
+
54
+ #if !defined(Py_LIMITED_API) || Py_LIMITED_API+0 >= 0x03090000
55
+ #define PyCFunction_NewEx(ML, SELF, MOD) PyCMethod_New((ML), (SELF), (MOD), NULL)
56
+ PyAPI_FUNC(PyObject *) PyCMethod_New(PyMethodDef *, PyObject *,
57
+ PyObject *, PyTypeObject *);
58
+ #endif
59
+
60
+
61
+ /* Flag passed to newmethodobject */
62
+ /* #define METH_OLDARGS 0x0000 -- unsupported now */
63
+ #define METH_VARARGS 0x0001
64
+ #define METH_KEYWORDS 0x0002
65
+ /* METH_NOARGS and METH_O must not be combined with the flags above. */
66
+ #define METH_NOARGS 0x0004
67
+ #define METH_O 0x0008
68
+
69
+ /* METH_CLASS and METH_STATIC are a little different; these control
70
+ the construction of methods for a class. These cannot be used for
71
+ functions in modules. */
72
+ #define METH_CLASS 0x0010
73
+ #define METH_STATIC 0x0020
74
+
75
+ /* METH_COEXIST allows a method to be entered even though a slot has
76
+ already filled the entry. When defined, the flag allows a separate
77
+ method, "__contains__" for example, to coexist with a defined
78
+ slot like sq_contains. */
79
+
80
+ #define METH_COEXIST 0x0040
81
+
82
+ #if !defined(Py_LIMITED_API) || Py_LIMITED_API+0 >= 0x030a0000
83
+ # define METH_FASTCALL 0x0080
84
+ #endif
85
+
86
+ /* This bit is preserved for Stackless Python */
87
+ #ifdef STACKLESS
88
+ # define METH_STACKLESS 0x0100
89
+ #else
90
+ # define METH_STACKLESS 0x0000
91
+ #endif
92
+
93
+ /* METH_METHOD means the function stores an
94
+ * additional reference to the class that defines it;
95
+ * both self and class are passed to it.
96
+ * It uses PyCMethodObject instead of PyCFunctionObject.
97
+ * May not be combined with METH_NOARGS, METH_O, METH_CLASS or METH_STATIC.
98
+ */
99
+
100
+ #if !defined(Py_LIMITED_API) || Py_LIMITED_API+0 >= 0x03090000
101
+ #define METH_METHOD 0x0200
102
+ #endif
103
+
104
+
105
+ #ifndef Py_LIMITED_API
106
+
107
+ #define Py_CPYTHON_METHODOBJECT_H
108
+ #include "cpython/methodobject.h"
109
+ #undef Py_CPYTHON_METHODOBJECT_H
110
+
111
+ #endif
112
+
113
+ #ifdef __cplusplus
114
+ }
115
+ #endif
116
+ #endif /* !Py_METHODOBJECT_H */
evalkit_internvl/include/python3.10/modsupport.h ADDED
@@ -0,0 +1,263 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+
2
+ #ifndef Py_MODSUPPORT_H
3
+ #define Py_MODSUPPORT_H
4
+ #ifdef __cplusplus
5
+ extern "C" {
6
+ #endif
7
+
8
+ /* Module support interface */
9
+
10
+ #include <stdarg.h>
11
+
12
+ /* If PY_SSIZE_T_CLEAN is defined, each functions treats #-specifier
13
+ to mean Py_ssize_t */
14
+ #ifdef PY_SSIZE_T_CLEAN
15
+ #define PyArg_Parse _PyArg_Parse_SizeT
16
+ #define PyArg_ParseTuple _PyArg_ParseTuple_SizeT
17
+ #define PyArg_ParseTupleAndKeywords _PyArg_ParseTupleAndKeywords_SizeT
18
+ #define PyArg_VaParse _PyArg_VaParse_SizeT
19
+ #define PyArg_VaParseTupleAndKeywords _PyArg_VaParseTupleAndKeywords_SizeT
20
+ #define Py_BuildValue _Py_BuildValue_SizeT
21
+ #define Py_VaBuildValue _Py_VaBuildValue_SizeT
22
+ #ifndef Py_LIMITED_API
23
+ #define _Py_VaBuildStack _Py_VaBuildStack_SizeT
24
+ #endif
25
+ #else
26
+ #ifndef Py_LIMITED_API
27
+ PyAPI_FUNC(PyObject *) _Py_VaBuildValue_SizeT(const char *, va_list);
28
+ PyAPI_FUNC(PyObject **) _Py_VaBuildStack_SizeT(
29
+ PyObject **small_stack,
30
+ Py_ssize_t small_stack_len,
31
+ const char *format,
32
+ va_list va,
33
+ Py_ssize_t *p_nargs);
34
+ #endif /* !Py_LIMITED_API */
35
+ #endif
36
+
37
+ /* Due to a glitch in 3.2, the _SizeT versions weren't exported from the DLL. */
38
+ #if !defined(PY_SSIZE_T_CLEAN) || !defined(Py_LIMITED_API) || Py_LIMITED_API+0 >= 0x03030000
39
+ PyAPI_FUNC(int) PyArg_Parse(PyObject *, const char *, ...);
40
+ PyAPI_FUNC(int) PyArg_ParseTuple(PyObject *, const char *, ...);
41
+ PyAPI_FUNC(int) PyArg_ParseTupleAndKeywords(PyObject *, PyObject *,
42
+ const char *, char **, ...);
43
+ PyAPI_FUNC(int) PyArg_VaParse(PyObject *, const char *, va_list);
44
+ PyAPI_FUNC(int) PyArg_VaParseTupleAndKeywords(PyObject *, PyObject *,
45
+ const char *, char **, va_list);
46
+ #endif
47
+ PyAPI_FUNC(int) PyArg_ValidateKeywordArguments(PyObject *);
48
+ PyAPI_FUNC(int) PyArg_UnpackTuple(PyObject *, const char *, Py_ssize_t, Py_ssize_t, ...);
49
+ PyAPI_FUNC(PyObject *) Py_BuildValue(const char *, ...);
50
+ PyAPI_FUNC(PyObject *) _Py_BuildValue_SizeT(const char *, ...);
51
+
52
+
53
+ #ifndef Py_LIMITED_API
54
+ PyAPI_FUNC(int) _PyArg_UnpackStack(
55
+ PyObject *const *args,
56
+ Py_ssize_t nargs,
57
+ const char *name,
58
+ Py_ssize_t min,
59
+ Py_ssize_t max,
60
+ ...);
61
+
62
+ PyAPI_FUNC(int) _PyArg_NoKeywords(const char *funcname, PyObject *kwargs);
63
+ PyAPI_FUNC(int) _PyArg_NoKwnames(const char *funcname, PyObject *kwnames);
64
+ PyAPI_FUNC(int) _PyArg_NoPositional(const char *funcname, PyObject *args);
65
+ #define _PyArg_NoKeywords(funcname, kwargs) \
66
+ ((kwargs) == NULL || _PyArg_NoKeywords((funcname), (kwargs)))
67
+ #define _PyArg_NoKwnames(funcname, kwnames) \
68
+ ((kwnames) == NULL || _PyArg_NoKwnames((funcname), (kwnames)))
69
+ #define _PyArg_NoPositional(funcname, args) \
70
+ ((args) == NULL || _PyArg_NoPositional((funcname), (args)))
71
+
72
+ PyAPI_FUNC(void) _PyArg_BadArgument(const char *, const char *, const char *, PyObject *);
73
+ PyAPI_FUNC(int) _PyArg_CheckPositional(const char *, Py_ssize_t,
74
+ Py_ssize_t, Py_ssize_t);
75
+ #define _PyArg_CheckPositional(funcname, nargs, min, max) \
76
+ (((min) <= (nargs) && (nargs) <= (max)) \
77
+ || _PyArg_CheckPositional((funcname), (nargs), (min), (max)))
78
+
79
+ #endif
80
+
81
+ PyAPI_FUNC(PyObject *) Py_VaBuildValue(const char *, va_list);
82
+ #ifndef Py_LIMITED_API
83
+ PyAPI_FUNC(PyObject **) _Py_VaBuildStack(
84
+ PyObject **small_stack,
85
+ Py_ssize_t small_stack_len,
86
+ const char *format,
87
+ va_list va,
88
+ Py_ssize_t *p_nargs);
89
+ #endif
90
+
91
+ #ifndef Py_LIMITED_API
92
+ typedef struct _PyArg_Parser {
93
+ const char *format;
94
+ const char * const *keywords;
95
+ const char *fname;
96
+ const char *custom_msg;
97
+ int pos; /* number of positional-only arguments */
98
+ int min; /* minimal number of arguments */
99
+ int max; /* maximal number of positional arguments */
100
+ PyObject *kwtuple; /* tuple of keyword parameter names */
101
+ struct _PyArg_Parser *next;
102
+ } _PyArg_Parser;
103
+ #ifdef PY_SSIZE_T_CLEAN
104
+ #define _PyArg_ParseTupleAndKeywordsFast _PyArg_ParseTupleAndKeywordsFast_SizeT
105
+ #define _PyArg_ParseStack _PyArg_ParseStack_SizeT
106
+ #define _PyArg_ParseStackAndKeywords _PyArg_ParseStackAndKeywords_SizeT
107
+ #define _PyArg_VaParseTupleAndKeywordsFast _PyArg_VaParseTupleAndKeywordsFast_SizeT
108
+ #endif
109
+ PyAPI_FUNC(int) _PyArg_ParseTupleAndKeywordsFast(PyObject *, PyObject *,
110
+ struct _PyArg_Parser *, ...);
111
+ PyAPI_FUNC(int) _PyArg_ParseStack(
112
+ PyObject *const *args,
113
+ Py_ssize_t nargs,
114
+ const char *format,
115
+ ...);
116
+ PyAPI_FUNC(int) _PyArg_ParseStackAndKeywords(
117
+ PyObject *const *args,
118
+ Py_ssize_t nargs,
119
+ PyObject *kwnames,
120
+ struct _PyArg_Parser *,
121
+ ...);
122
+ PyAPI_FUNC(int) _PyArg_VaParseTupleAndKeywordsFast(PyObject *, PyObject *,
123
+ struct _PyArg_Parser *, va_list);
124
+ PyAPI_FUNC(PyObject * const *) _PyArg_UnpackKeywords(
125
+ PyObject *const *args, Py_ssize_t nargs,
126
+ PyObject *kwargs, PyObject *kwnames,
127
+ struct _PyArg_Parser *parser,
128
+ int minpos, int maxpos, int minkw,
129
+ PyObject **buf);
130
+ #define _PyArg_UnpackKeywords(args, nargs, kwargs, kwnames, parser, minpos, maxpos, minkw, buf) \
131
+ (((minkw) == 0 && (kwargs) == NULL && (kwnames) == NULL && \
132
+ (minpos) <= (nargs) && (nargs) <= (maxpos) && args != NULL) ? (args) : \
133
+ _PyArg_UnpackKeywords((args), (nargs), (kwargs), (kwnames), (parser), \
134
+ (minpos), (maxpos), (minkw), (buf)))
135
+
136
+ void _PyArg_Fini(void);
137
+ #endif /* Py_LIMITED_API */
138
+
139
+ // Add an attribute with name 'name' and value 'obj' to the module 'mod.
140
+ // On success, return 0 on success.
141
+ // On error, raise an exception and return -1.
142
+ PyAPI_FUNC(int) PyModule_AddObjectRef(PyObject *mod, const char *name, PyObject *value);
143
+
144
+ // Similar to PyModule_AddObjectRef() but steal a reference to 'obj'
145
+ // (Py_DECREF(obj)) on success (if it returns 0).
146
+ PyAPI_FUNC(int) PyModule_AddObject(PyObject *mod, const char *, PyObject *value);
147
+
148
+ PyAPI_FUNC(int) PyModule_AddIntConstant(PyObject *, const char *, long);
149
+ PyAPI_FUNC(int) PyModule_AddStringConstant(PyObject *, const char *, const char *);
150
+ #if !defined(Py_LIMITED_API) || Py_LIMITED_API+0 >= 0x03090000
151
+ /* New in 3.9 */
152
+ PyAPI_FUNC(int) PyModule_AddType(PyObject *module, PyTypeObject *type);
153
+ #endif /* Py_LIMITED_API */
154
+ #define PyModule_AddIntMacro(m, c) PyModule_AddIntConstant(m, #c, c)
155
+ #define PyModule_AddStringMacro(m, c) PyModule_AddStringConstant(m, #c, c)
156
+
157
+ #if !defined(Py_LIMITED_API) || Py_LIMITED_API+0 >= 0x03050000
158
+ /* New in 3.5 */
159
+ PyAPI_FUNC(int) PyModule_SetDocString(PyObject *, const char *);
160
+ PyAPI_FUNC(int) PyModule_AddFunctions(PyObject *, PyMethodDef *);
161
+ PyAPI_FUNC(int) PyModule_ExecDef(PyObject *module, PyModuleDef *def);
162
+ #endif
163
+
164
+ #define Py_CLEANUP_SUPPORTED 0x20000
165
+
166
+ #define PYTHON_API_VERSION 1013
167
+ #define PYTHON_API_STRING "1013"
168
+ /* The API version is maintained (independently from the Python version)
169
+ so we can detect mismatches between the interpreter and dynamically
170
+ loaded modules. These are diagnosed by an error message but
171
+ the module is still loaded (because the mismatch can only be tested
172
+ after loading the module). The error message is intended to
173
+ explain the core dump a few seconds later.
174
+
175
+ The symbol PYTHON_API_STRING defines the same value as a string
176
+ literal. *** PLEASE MAKE SURE THE DEFINITIONS MATCH. ***
177
+
178
+ Please add a line or two to the top of this log for each API
179
+ version change:
180
+
181
+ 22-Feb-2006 MvL 1013 PEP 353 - long indices for sequence lengths
182
+
183
+ 19-Aug-2002 GvR 1012 Changes to string object struct for
184
+ interning changes, saving 3 bytes.
185
+
186
+ 17-Jul-2001 GvR 1011 Descr-branch, just to be on the safe side
187
+
188
+ 25-Jan-2001 FLD 1010 Parameters added to PyCode_New() and
189
+ PyFrame_New(); Python 2.1a2
190
+
191
+ 14-Mar-2000 GvR 1009 Unicode API added
192
+
193
+ 3-Jan-1999 GvR 1007 Decided to change back! (Don't reuse 1008!)
194
+
195
+ 3-Dec-1998 GvR 1008 Python 1.5.2b1
196
+
197
+ 18-Jan-1997 GvR 1007 string interning and other speedups
198
+
199
+ 11-Oct-1996 GvR renamed Py_Ellipses to Py_Ellipsis :-(
200
+
201
+ 30-Jul-1996 GvR Slice and ellipses syntax added
202
+
203
+ 23-Jul-1996 GvR For 1.4 -- better safe than sorry this time :-)
204
+
205
+ 7-Nov-1995 GvR Keyword arguments (should've been done at 1.3 :-( )
206
+
207
+ 10-Jan-1995 GvR Renamed globals to new naming scheme
208
+
209
+ 9-Jan-1995 GvR Initial version (incompatible with older API)
210
+ */
211
+
212
+ /* The PYTHON_ABI_VERSION is introduced in PEP 384. For the lifetime of
213
+ Python 3, it will stay at the value of 3; changes to the limited API
214
+ must be performed in a strictly backwards-compatible manner. */
215
+ #define PYTHON_ABI_VERSION 3
216
+ #define PYTHON_ABI_STRING "3"
217
+
218
+ #ifdef Py_TRACE_REFS
219
+ /* When we are tracing reference counts, rename module creation functions so
220
+ modules compiled with incompatible settings will generate a
221
+ link-time error. */
222
+ #define PyModule_Create2 PyModule_Create2TraceRefs
223
+ #define PyModule_FromDefAndSpec2 PyModule_FromDefAndSpec2TraceRefs
224
+ #endif
225
+
226
+ PyAPI_FUNC(PyObject *) PyModule_Create2(struct PyModuleDef*,
227
+ int apiver);
228
+ #ifndef Py_LIMITED_API
229
+ PyAPI_FUNC(PyObject *) _PyModule_CreateInitialized(struct PyModuleDef*,
230
+ int apiver);
231
+ #endif
232
+
233
+ #ifdef Py_LIMITED_API
234
+ #define PyModule_Create(module) \
235
+ PyModule_Create2(module, PYTHON_ABI_VERSION)
236
+ #else
237
+ #define PyModule_Create(module) \
238
+ PyModule_Create2(module, PYTHON_API_VERSION)
239
+ #endif
240
+
241
+ #if !defined(Py_LIMITED_API) || Py_LIMITED_API+0 >= 0x03050000
242
+ /* New in 3.5 */
243
+ PyAPI_FUNC(PyObject *) PyModule_FromDefAndSpec2(PyModuleDef *def,
244
+ PyObject *spec,
245
+ int module_api_version);
246
+
247
+ #ifdef Py_LIMITED_API
248
+ #define PyModule_FromDefAndSpec(module, spec) \
249
+ PyModule_FromDefAndSpec2(module, spec, PYTHON_ABI_VERSION)
250
+ #else
251
+ #define PyModule_FromDefAndSpec(module, spec) \
252
+ PyModule_FromDefAndSpec2(module, spec, PYTHON_API_VERSION)
253
+ #endif /* Py_LIMITED_API */
254
+ #endif /* New in 3.5 */
255
+
256
+ #ifndef Py_LIMITED_API
257
+ PyAPI_DATA(const char *) _Py_PackageContext;
258
+ #endif
259
+
260
+ #ifdef __cplusplus
261
+ }
262
+ #endif
263
+ #endif /* !Py_MODSUPPORT_H */
evalkit_internvl/include/python3.10/moduleobject.h ADDED
@@ -0,0 +1,96 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+
2
+ /* Module object interface */
3
+
4
+ #ifndef Py_MODULEOBJECT_H
5
+ #define Py_MODULEOBJECT_H
6
+ #ifdef __cplusplus
7
+ extern "C" {
8
+ #endif
9
+
10
+ PyAPI_DATA(PyTypeObject) PyModule_Type;
11
+
12
+ #define PyModule_Check(op) PyObject_TypeCheck(op, &PyModule_Type)
13
+ #define PyModule_CheckExact(op) Py_IS_TYPE(op, &PyModule_Type)
14
+
15
+ #if !defined(Py_LIMITED_API) || Py_LIMITED_API+0 >= 0x03030000
16
+ PyAPI_FUNC(PyObject *) PyModule_NewObject(
17
+ PyObject *name
18
+ );
19
+ #endif
20
+ PyAPI_FUNC(PyObject *) PyModule_New(
21
+ const char *name /* UTF-8 encoded string */
22
+ );
23
+ PyAPI_FUNC(PyObject *) PyModule_GetDict(PyObject *);
24
+ #if !defined(Py_LIMITED_API) || Py_LIMITED_API+0 >= 0x03030000
25
+ PyAPI_FUNC(PyObject *) PyModule_GetNameObject(PyObject *);
26
+ #endif
27
+ PyAPI_FUNC(const char *) PyModule_GetName(PyObject *);
28
+ Py_DEPRECATED(3.2) PyAPI_FUNC(const char *) PyModule_GetFilename(PyObject *);
29
+ PyAPI_FUNC(PyObject *) PyModule_GetFilenameObject(PyObject *);
30
+ #ifndef Py_LIMITED_API
31
+ PyAPI_FUNC(void) _PyModule_Clear(PyObject *);
32
+ PyAPI_FUNC(void) _PyModule_ClearDict(PyObject *);
33
+ PyAPI_FUNC(int) _PyModuleSpec_IsInitializing(PyObject *);
34
+ #endif
35
+ PyAPI_FUNC(struct PyModuleDef*) PyModule_GetDef(PyObject*);
36
+ PyAPI_FUNC(void*) PyModule_GetState(PyObject*);
37
+
38
+ #if !defined(Py_LIMITED_API) || Py_LIMITED_API+0 >= 0x03050000
39
+ /* New in 3.5 */
40
+ PyAPI_FUNC(PyObject *) PyModuleDef_Init(struct PyModuleDef*);
41
+ PyAPI_DATA(PyTypeObject) PyModuleDef_Type;
42
+ #endif
43
+
44
+ typedef struct PyModuleDef_Base {
45
+ PyObject_HEAD
46
+ PyObject* (*m_init)(void);
47
+ Py_ssize_t m_index;
48
+ PyObject* m_copy;
49
+ } PyModuleDef_Base;
50
+
51
+ #define PyModuleDef_HEAD_INIT { \
52
+ PyObject_HEAD_INIT(NULL) \
53
+ NULL, /* m_init */ \
54
+ 0, /* m_index */ \
55
+ NULL, /* m_copy */ \
56
+ }
57
+
58
+ struct PyModuleDef_Slot;
59
+ #if !defined(Py_LIMITED_API) || Py_LIMITED_API+0 >= 0x03050000
60
+ /* New in 3.5 */
61
+ typedef struct PyModuleDef_Slot{
62
+ int slot;
63
+ void *value;
64
+ } PyModuleDef_Slot;
65
+
66
+ #define Py_mod_create 1
67
+ #define Py_mod_exec 2
68
+
69
+ #ifndef Py_LIMITED_API
70
+ #define _Py_mod_LAST_SLOT 2
71
+ #endif
72
+
73
+ #endif /* New in 3.5 */
74
+
75
+ typedef struct PyModuleDef{
76
+ PyModuleDef_Base m_base;
77
+ const char* m_name;
78
+ const char* m_doc;
79
+ Py_ssize_t m_size;
80
+ PyMethodDef *m_methods;
81
+ struct PyModuleDef_Slot* m_slots;
82
+ traverseproc m_traverse;
83
+ inquiry m_clear;
84
+ freefunc m_free;
85
+ } PyModuleDef;
86
+
87
+
88
+ // Internal C API
89
+ #ifdef Py_BUILD_CORE
90
+ extern int _PyModule_IsExtension(PyObject *obj);
91
+ #endif
92
+
93
+ #ifdef __cplusplus
94
+ }
95
+ #endif
96
+ #endif /* !Py_MODULEOBJECT_H */
evalkit_internvl/include/python3.10/namespaceobject.h ADDED
@@ -0,0 +1,19 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+
2
+ /* simple namespace object interface */
3
+
4
+ #ifndef NAMESPACEOBJECT_H
5
+ #define NAMESPACEOBJECT_H
6
+ #ifdef __cplusplus
7
+ extern "C" {
8
+ #endif
9
+
10
+ #ifndef Py_LIMITED_API
11
+ PyAPI_DATA(PyTypeObject) _PyNamespace_Type;
12
+
13
+ PyAPI_FUNC(PyObject *) _PyNamespace_New(PyObject *kwds);
14
+ #endif /* !Py_LIMITED_API */
15
+
16
+ #ifdef __cplusplus
17
+ }
18
+ #endif
19
+ #endif /* !NAMESPACEOBJECT_H */
evalkit_internvl/include/python3.10/object.h ADDED
@@ -0,0 +1,749 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ #ifndef Py_OBJECT_H
2
+ #define Py_OBJECT_H
3
+
4
+ #ifdef __cplusplus
5
+ extern "C" {
6
+ #endif
7
+
8
+
9
+ /* Object and type object interface */
10
+
11
+ /*
12
+ Objects are structures allocated on the heap. Special rules apply to
13
+ the use of objects to ensure they are properly garbage-collected.
14
+ Objects are never allocated statically or on the stack; they must be
15
+ accessed through special macros and functions only. (Type objects are
16
+ exceptions to the first rule; the standard types are represented by
17
+ statically initialized type objects, although work on type/class unification
18
+ for Python 2.2 made it possible to have heap-allocated type objects too).
19
+
20
+ An object has a 'reference count' that is increased or decreased when a
21
+ pointer to the object is copied or deleted; when the reference count
22
+ reaches zero there are no references to the object left and it can be
23
+ removed from the heap.
24
+
25
+ An object has a 'type' that determines what it represents and what kind
26
+ of data it contains. An object's type is fixed when it is created.
27
+ Types themselves are represented as objects; an object contains a
28
+ pointer to the corresponding type object. The type itself has a type
29
+ pointer pointing to the object representing the type 'type', which
30
+ contains a pointer to itself!.
31
+
32
+ Objects do not float around in memory; once allocated an object keeps
33
+ the same size and address. Objects that must hold variable-size data
34
+ can contain pointers to variable-size parts of the object. Not all
35
+ objects of the same type have the same size; but the size cannot change
36
+ after allocation. (These restrictions are made so a reference to an
37
+ object can be simply a pointer -- moving an object would require
38
+ updating all the pointers, and changing an object's size would require
39
+ moving it if there was another object right next to it.)
40
+
41
+ Objects are always accessed through pointers of the type 'PyObject *'.
42
+ The type 'PyObject' is a structure that only contains the reference count
43
+ and the type pointer. The actual memory allocated for an object
44
+ contains other data that can only be accessed after casting the pointer
45
+ to a pointer to a longer structure type. This longer type must start
46
+ with the reference count and type fields; the macro PyObject_HEAD should be
47
+ used for this (to accommodate for future changes). The implementation
48
+ of a particular object type can cast the object pointer to the proper
49
+ type and back.
50
+
51
+ A standard interface exists for objects that contain an array of items
52
+ whose size is determined when the object is allocated.
53
+ */
54
+
55
+ /* Py_DEBUG implies Py_REF_DEBUG. */
56
+ #if defined(Py_DEBUG) && !defined(Py_REF_DEBUG)
57
+ # define Py_REF_DEBUG
58
+ #endif
59
+
60
+ #if defined(Py_LIMITED_API) && defined(Py_TRACE_REFS)
61
+ # error Py_LIMITED_API is incompatible with Py_TRACE_REFS
62
+ #endif
63
+
64
+ /* PyTypeObject structure is defined in cpython/object.h.
65
+ In Py_LIMITED_API, PyTypeObject is an opaque structure. */
66
+ typedef struct _typeobject PyTypeObject;
67
+
68
+ #ifdef Py_TRACE_REFS
69
+ /* Define pointers to support a doubly-linked list of all live heap objects. */
70
+ #define _PyObject_HEAD_EXTRA \
71
+ struct _object *_ob_next; \
72
+ struct _object *_ob_prev;
73
+
74
+ #define _PyObject_EXTRA_INIT 0, 0,
75
+
76
+ #else
77
+ # define _PyObject_HEAD_EXTRA
78
+ # define _PyObject_EXTRA_INIT
79
+ #endif
80
+
81
+ /* PyObject_HEAD defines the initial segment of every PyObject. */
82
+ #define PyObject_HEAD PyObject ob_base;
83
+
84
+ #define PyObject_HEAD_INIT(type) \
85
+ { _PyObject_EXTRA_INIT \
86
+ 1, type },
87
+
88
+ #define PyVarObject_HEAD_INIT(type, size) \
89
+ { PyObject_HEAD_INIT(type) size },
90
+
91
+ /* PyObject_VAR_HEAD defines the initial segment of all variable-size
92
+ * container objects. These end with a declaration of an array with 1
93
+ * element, but enough space is malloc'ed so that the array actually
94
+ * has room for ob_size elements. Note that ob_size is an element count,
95
+ * not necessarily a byte count.
96
+ */
97
+ #define PyObject_VAR_HEAD PyVarObject ob_base;
98
+ #define Py_INVALID_SIZE (Py_ssize_t)-1
99
+
100
+ /* Nothing is actually declared to be a PyObject, but every pointer to
101
+ * a Python object can be cast to a PyObject*. This is inheritance built
102
+ * by hand. Similarly every pointer to a variable-size Python object can,
103
+ * in addition, be cast to PyVarObject*.
104
+ */
105
+ typedef struct _object {
106
+ _PyObject_HEAD_EXTRA
107
+ Py_ssize_t ob_refcnt;
108
+ PyTypeObject *ob_type;
109
+ } PyObject;
110
+
111
+ /* Cast argument to PyObject* type. */
112
+ #define _PyObject_CAST(op) ((PyObject*)(op))
113
+ #define _PyObject_CAST_CONST(op) ((const PyObject*)(op))
114
+
115
+ typedef struct {
116
+ PyObject ob_base;
117
+ Py_ssize_t ob_size; /* Number of items in variable part */
118
+ } PyVarObject;
119
+
120
+ /* Cast argument to PyVarObject* type. */
121
+ #define _PyVarObject_CAST(op) ((PyVarObject*)(op))
122
+ #define _PyVarObject_CAST_CONST(op) ((const PyVarObject*)(op))
123
+
124
+
125
+ // Test if the 'x' object is the 'y' object, the same as "x is y" in Python.
126
+ PyAPI_FUNC(int) Py_Is(PyObject *x, PyObject *y);
127
+ #define Py_Is(x, y) ((x) == (y))
128
+
129
+
130
+ static inline Py_ssize_t _Py_REFCNT(const PyObject *ob) {
131
+ return ob->ob_refcnt;
132
+ }
133
+ #define Py_REFCNT(ob) _Py_REFCNT(_PyObject_CAST_CONST(ob))
134
+
135
+
136
+ // bpo-39573: The Py_SET_TYPE() function must be used to set an object type.
137
+ #define Py_TYPE(ob) (_PyObject_CAST(ob)->ob_type)
138
+
139
+ // bpo-39573: The Py_SET_SIZE() function must be used to set an object size.
140
+ #define Py_SIZE(ob) (_PyVarObject_CAST(ob)->ob_size)
141
+
142
+
143
+ static inline int _Py_IS_TYPE(const PyObject *ob, const PyTypeObject *type) {
144
+ // bpo-44378: Don't use Py_TYPE() since Py_TYPE() requires a non-const
145
+ // object.
146
+ return ob->ob_type == type;
147
+ }
148
+ #define Py_IS_TYPE(ob, type) _Py_IS_TYPE(_PyObject_CAST_CONST(ob), type)
149
+
150
+
151
+ static inline void _Py_SET_REFCNT(PyObject *ob, Py_ssize_t refcnt) {
152
+ ob->ob_refcnt = refcnt;
153
+ }
154
+ #define Py_SET_REFCNT(ob, refcnt) _Py_SET_REFCNT(_PyObject_CAST(ob), refcnt)
155
+
156
+
157
+ static inline void _Py_SET_TYPE(PyObject *ob, PyTypeObject *type) {
158
+ ob->ob_type = type;
159
+ }
160
+ #define Py_SET_TYPE(ob, type) _Py_SET_TYPE(_PyObject_CAST(ob), type)
161
+
162
+
163
+ static inline void _Py_SET_SIZE(PyVarObject *ob, Py_ssize_t size) {
164
+ ob->ob_size = size;
165
+ }
166
+ #define Py_SET_SIZE(ob, size) _Py_SET_SIZE(_PyVarObject_CAST(ob), size)
167
+
168
+
169
+ /*
170
+ Type objects contain a string containing the type name (to help somewhat
171
+ in debugging), the allocation parameters (see PyObject_New() and
172
+ PyObject_NewVar()),
173
+ and methods for accessing objects of the type. Methods are optional, a
174
+ nil pointer meaning that particular kind of access is not available for
175
+ this type. The Py_DECREF() macro uses the tp_dealloc method without
176
+ checking for a nil pointer; it should always be implemented except if
177
+ the implementation can guarantee that the reference count will never
178
+ reach zero (e.g., for statically allocated type objects).
179
+
180
+ NB: the methods for certain type groups are now contained in separate
181
+ method blocks.
182
+ */
183
+
184
+ typedef PyObject * (*unaryfunc)(PyObject *);
185
+ typedef PyObject * (*binaryfunc)(PyObject *, PyObject *);
186
+ typedef PyObject * (*ternaryfunc)(PyObject *, PyObject *, PyObject *);
187
+ typedef int (*inquiry)(PyObject *);
188
+ typedef Py_ssize_t (*lenfunc)(PyObject *);
189
+ typedef PyObject *(*ssizeargfunc)(PyObject *, Py_ssize_t);
190
+ typedef PyObject *(*ssizessizeargfunc)(PyObject *, Py_ssize_t, Py_ssize_t);
191
+ typedef int(*ssizeobjargproc)(PyObject *, Py_ssize_t, PyObject *);
192
+ typedef int(*ssizessizeobjargproc)(PyObject *, Py_ssize_t, Py_ssize_t, PyObject *);
193
+ typedef int(*objobjargproc)(PyObject *, PyObject *, PyObject *);
194
+
195
+ typedef int (*objobjproc)(PyObject *, PyObject *);
196
+ typedef int (*visitproc)(PyObject *, void *);
197
+ typedef int (*traverseproc)(PyObject *, visitproc, void *);
198
+
199
+
200
+ typedef void (*freefunc)(void *);
201
+ typedef void (*destructor)(PyObject *);
202
+ typedef PyObject *(*getattrfunc)(PyObject *, char *);
203
+ typedef PyObject *(*getattrofunc)(PyObject *, PyObject *);
204
+ typedef int (*setattrfunc)(PyObject *, char *, PyObject *);
205
+ typedef int (*setattrofunc)(PyObject *, PyObject *, PyObject *);
206
+ typedef PyObject *(*reprfunc)(PyObject *);
207
+ typedef Py_hash_t (*hashfunc)(PyObject *);
208
+ typedef PyObject *(*richcmpfunc) (PyObject *, PyObject *, int);
209
+ typedef PyObject *(*getiterfunc) (PyObject *);
210
+ typedef PyObject *(*iternextfunc) (PyObject *);
211
+ typedef PyObject *(*descrgetfunc) (PyObject *, PyObject *, PyObject *);
212
+ typedef int (*descrsetfunc) (PyObject *, PyObject *, PyObject *);
213
+ typedef int (*initproc)(PyObject *, PyObject *, PyObject *);
214
+ typedef PyObject *(*newfunc)(PyTypeObject *, PyObject *, PyObject *);
215
+ typedef PyObject *(*allocfunc)(PyTypeObject *, Py_ssize_t);
216
+
217
+ typedef struct{
218
+ int slot; /* slot id, see below */
219
+ void *pfunc; /* function pointer */
220
+ } PyType_Slot;
221
+
222
+ typedef struct{
223
+ const char* name;
224
+ int basicsize;
225
+ int itemsize;
226
+ unsigned int flags;
227
+ PyType_Slot *slots; /* terminated by slot==0. */
228
+ } PyType_Spec;
229
+
230
+ PyAPI_FUNC(PyObject*) PyType_FromSpec(PyType_Spec*);
231
+ #if !defined(Py_LIMITED_API) || Py_LIMITED_API+0 >= 0x03030000
232
+ PyAPI_FUNC(PyObject*) PyType_FromSpecWithBases(PyType_Spec*, PyObject*);
233
+ #endif
234
+ #if !defined(Py_LIMITED_API) || Py_LIMITED_API+0 >= 0x03040000
235
+ PyAPI_FUNC(void*) PyType_GetSlot(PyTypeObject*, int);
236
+ #endif
237
+ #if !defined(Py_LIMITED_API) || Py_LIMITED_API+0 >= 0x03090000
238
+ PyAPI_FUNC(PyObject*) PyType_FromModuleAndSpec(PyObject *, PyType_Spec *, PyObject *);
239
+ PyAPI_FUNC(PyObject *) PyType_GetModule(struct _typeobject *);
240
+ PyAPI_FUNC(void *) PyType_GetModuleState(struct _typeobject *);
241
+ #endif
242
+
243
+ /* Generic type check */
244
+ PyAPI_FUNC(int) PyType_IsSubtype(PyTypeObject *, PyTypeObject *);
245
+
246
+ static inline int _PyObject_TypeCheck(PyObject *ob, PyTypeObject *type) {
247
+ return Py_IS_TYPE(ob, type) || PyType_IsSubtype(Py_TYPE(ob), type);
248
+ }
249
+ #define PyObject_TypeCheck(ob, type) _PyObject_TypeCheck(_PyObject_CAST(ob), type)
250
+
251
+ PyAPI_DATA(PyTypeObject) PyType_Type; /* built-in 'type' */
252
+ PyAPI_DATA(PyTypeObject) PyBaseObject_Type; /* built-in 'object' */
253
+ PyAPI_DATA(PyTypeObject) PySuper_Type; /* built-in 'super' */
254
+
255
+ PyAPI_FUNC(unsigned long) PyType_GetFlags(PyTypeObject*);
256
+
257
+ PyAPI_FUNC(int) PyType_Ready(PyTypeObject *);
258
+ PyAPI_FUNC(PyObject *) PyType_GenericAlloc(PyTypeObject *, Py_ssize_t);
259
+ PyAPI_FUNC(PyObject *) PyType_GenericNew(PyTypeObject *,
260
+ PyObject *, PyObject *);
261
+ PyAPI_FUNC(unsigned int) PyType_ClearCache(void);
262
+ PyAPI_FUNC(void) PyType_Modified(PyTypeObject *);
263
+
264
+ /* Generic operations on objects */
265
+ PyAPI_FUNC(PyObject *) PyObject_Repr(PyObject *);
266
+ PyAPI_FUNC(PyObject *) PyObject_Str(PyObject *);
267
+ PyAPI_FUNC(PyObject *) PyObject_ASCII(PyObject *);
268
+ PyAPI_FUNC(PyObject *) PyObject_Bytes(PyObject *);
269
+ PyAPI_FUNC(PyObject *) PyObject_RichCompare(PyObject *, PyObject *, int);
270
+ PyAPI_FUNC(int) PyObject_RichCompareBool(PyObject *, PyObject *, int);
271
+ PyAPI_FUNC(PyObject *) PyObject_GetAttrString(PyObject *, const char *);
272
+ PyAPI_FUNC(int) PyObject_SetAttrString(PyObject *, const char *, PyObject *);
273
+ PyAPI_FUNC(int) PyObject_HasAttrString(PyObject *, const char *);
274
+ PyAPI_FUNC(PyObject *) PyObject_GetAttr(PyObject *, PyObject *);
275
+ PyAPI_FUNC(int) PyObject_SetAttr(PyObject *, PyObject *, PyObject *);
276
+ PyAPI_FUNC(int) PyObject_HasAttr(PyObject *, PyObject *);
277
+ PyAPI_FUNC(PyObject *) PyObject_SelfIter(PyObject *);
278
+ PyAPI_FUNC(PyObject *) PyObject_GenericGetAttr(PyObject *, PyObject *);
279
+ PyAPI_FUNC(int) PyObject_GenericSetAttr(PyObject *, PyObject *, PyObject *);
280
+ #if !defined(Py_LIMITED_API) || Py_LIMITED_API+0 >= 0x03030000
281
+ PyAPI_FUNC(int) PyObject_GenericSetDict(PyObject *, PyObject *, void *);
282
+ #endif
283
+ PyAPI_FUNC(Py_hash_t) PyObject_Hash(PyObject *);
284
+ PyAPI_FUNC(Py_hash_t) PyObject_HashNotImplemented(PyObject *);
285
+ PyAPI_FUNC(int) PyObject_IsTrue(PyObject *);
286
+ PyAPI_FUNC(int) PyObject_Not(PyObject *);
287
+ PyAPI_FUNC(int) PyCallable_Check(PyObject *);
288
+ PyAPI_FUNC(void) PyObject_ClearWeakRefs(PyObject *);
289
+
290
+ /* PyObject_Dir(obj) acts like Python builtins.dir(obj), returning a
291
+ list of strings. PyObject_Dir(NULL) is like builtins.dir(),
292
+ returning the names of the current locals. In this case, if there are
293
+ no current locals, NULL is returned, and PyErr_Occurred() is false.
294
+ */
295
+ PyAPI_FUNC(PyObject *) PyObject_Dir(PyObject *);
296
+
297
+
298
+ /* Helpers for printing recursive container types */
299
+ PyAPI_FUNC(int) Py_ReprEnter(PyObject *);
300
+ PyAPI_FUNC(void) Py_ReprLeave(PyObject *);
301
+
302
+ /* Flag bits for printing: */
303
+ #define Py_PRINT_RAW 1 /* No string quotes etc. */
304
+
305
+ /*
306
+ Type flags (tp_flags)
307
+
308
+ These flags are used to change expected features and behavior for a
309
+ particular type.
310
+
311
+ Arbitration of the flag bit positions will need to be coordinated among
312
+ all extension writers who publicly release their extensions (this will
313
+ be fewer than you might expect!).
314
+
315
+ Most flags were removed as of Python 3.0 to make room for new flags. (Some
316
+ flags are not for backwards compatibility but to indicate the presence of an
317
+ optional feature; these flags remain of course.)
318
+
319
+ Type definitions should use Py_TPFLAGS_DEFAULT for their tp_flags value.
320
+
321
+ Code can use PyType_HasFeature(type_ob, flag_value) to test whether the
322
+ given type object has a specified feature.
323
+ */
324
+
325
+ #ifndef Py_LIMITED_API
326
+ /* Set if instances of the type object are treated as sequences for pattern matching */
327
+ #define Py_TPFLAGS_SEQUENCE (1 << 5)
328
+ /* Set if instances of the type object are treated as mappings for pattern matching */
329
+ #define Py_TPFLAGS_MAPPING (1 << 6)
330
+ #endif
331
+
332
+ /* Disallow creating instances of the type: set tp_new to NULL and don't create
333
+ * the "__new__" key in the type dictionary. */
334
+ #define Py_TPFLAGS_DISALLOW_INSTANTIATION (1UL << 7)
335
+
336
+ /* Set if the type object is immutable: type attributes cannot be set nor deleted */
337
+ #define Py_TPFLAGS_IMMUTABLETYPE (1UL << 8)
338
+
339
+ /* Set if the type object is dynamically allocated */
340
+ #define Py_TPFLAGS_HEAPTYPE (1UL << 9)
341
+
342
+ /* Set if the type allows subclassing */
343
+ #define Py_TPFLAGS_BASETYPE (1UL << 10)
344
+
345
+ /* Set if the type implements the vectorcall protocol (PEP 590) */
346
+ #ifndef Py_LIMITED_API
347
+ #define Py_TPFLAGS_HAVE_VECTORCALL (1UL << 11)
348
+ // Backwards compatibility alias for API that was provisional in Python 3.8
349
+ #define _Py_TPFLAGS_HAVE_VECTORCALL Py_TPFLAGS_HAVE_VECTORCALL
350
+ #endif
351
+
352
+ /* Set if the type is 'ready' -- fully initialized */
353
+ #define Py_TPFLAGS_READY (1UL << 12)
354
+
355
+ /* Set while the type is being 'readied', to prevent recursive ready calls */
356
+ #define Py_TPFLAGS_READYING (1UL << 13)
357
+
358
+ /* Objects support garbage collection (see objimpl.h) */
359
+ #define Py_TPFLAGS_HAVE_GC (1UL << 14)
360
+
361
+ /* These two bits are preserved for Stackless Python, next after this is 17 */
362
+ #ifdef STACKLESS
363
+ #define Py_TPFLAGS_HAVE_STACKLESS_EXTENSION (3UL << 15)
364
+ #else
365
+ #define Py_TPFLAGS_HAVE_STACKLESS_EXTENSION 0
366
+ #endif
367
+
368
+ /* Objects behave like an unbound method */
369
+ #define Py_TPFLAGS_METHOD_DESCRIPTOR (1UL << 17)
370
+
371
+ /* Object has up-to-date type attribute cache */
372
+ #define Py_TPFLAGS_VALID_VERSION_TAG (1UL << 19)
373
+
374
+ /* Type is abstract and cannot be instantiated */
375
+ #define Py_TPFLAGS_IS_ABSTRACT (1UL << 20)
376
+
377
+ // This undocumented flag gives certain built-ins their unique pattern-matching
378
+ // behavior, which allows a single positional subpattern to match against the
379
+ // subject itself (rather than a mapped attribute on it):
380
+ #define _Py_TPFLAGS_MATCH_SELF (1UL << 22)
381
+
382
+ /* These flags are used to determine if a type is a subclass. */
383
+ #define Py_TPFLAGS_LONG_SUBCLASS (1UL << 24)
384
+ #define Py_TPFLAGS_LIST_SUBCLASS (1UL << 25)
385
+ #define Py_TPFLAGS_TUPLE_SUBCLASS (1UL << 26)
386
+ #define Py_TPFLAGS_BYTES_SUBCLASS (1UL << 27)
387
+ #define Py_TPFLAGS_UNICODE_SUBCLASS (1UL << 28)
388
+ #define Py_TPFLAGS_DICT_SUBCLASS (1UL << 29)
389
+ #define Py_TPFLAGS_BASE_EXC_SUBCLASS (1UL << 30)
390
+ #define Py_TPFLAGS_TYPE_SUBCLASS (1UL << 31)
391
+
392
+ #define Py_TPFLAGS_DEFAULT ( \
393
+ Py_TPFLAGS_HAVE_STACKLESS_EXTENSION | \
394
+ 0)
395
+
396
+ /* NOTE: Some of the following flags reuse lower bits (removed as part of the
397
+ * Python 3.0 transition). */
398
+
399
+ /* The following flags are kept for compatibility; in previous
400
+ * versions they indicated presence of newer tp_* fields on the
401
+ * type struct.
402
+ * Starting with 3.8, binary compatibility of C extensions across
403
+ * feature releases of Python is not supported anymore (except when
404
+ * using the stable ABI, in which all classes are created dynamically,
405
+ * using the interpreter's memory layout.)
406
+ * Note that older extensions using the stable ABI set these flags,
407
+ * so the bits must not be repurposed.
408
+ */
409
+ #define Py_TPFLAGS_HAVE_FINALIZE (1UL << 0)
410
+ #define Py_TPFLAGS_HAVE_VERSION_TAG (1UL << 18)
411
+
412
+
413
+ /*
414
+ The macros Py_INCREF(op) and Py_DECREF(op) are used to increment or decrement
415
+ reference counts. Py_DECREF calls the object's deallocator function when
416
+ the refcount falls to 0; for
417
+ objects that don't contain references to other objects or heap memory
418
+ this can be the standard function free(). Both macros can be used
419
+ wherever a void expression is allowed. The argument must not be a
420
+ NULL pointer. If it may be NULL, use Py_XINCREF/Py_XDECREF instead.
421
+ The macro _Py_NewReference(op) initialize reference counts to 1, and
422
+ in special builds (Py_REF_DEBUG, Py_TRACE_REFS) performs additional
423
+ bookkeeping appropriate to the special build.
424
+
425
+ We assume that the reference count field can never overflow; this can
426
+ be proven when the size of the field is the same as the pointer size, so
427
+ we ignore the possibility. Provided a C int is at least 32 bits (which
428
+ is implicitly assumed in many parts of this code), that's enough for
429
+ about 2**31 references to an object.
430
+
431
+ XXX The following became out of date in Python 2.2, but I'm not sure
432
+ XXX what the full truth is now. Certainly, heap-allocated type objects
433
+ XXX can and should be deallocated.
434
+ Type objects should never be deallocated; the type pointer in an object
435
+ is not considered to be a reference to the type object, to save
436
+ complications in the deallocation function. (This is actually a
437
+ decision that's up to the implementer of each new type so if you want,
438
+ you can count such references to the type object.)
439
+ */
440
+
441
+ #ifdef Py_REF_DEBUG
442
+ PyAPI_DATA(Py_ssize_t) _Py_RefTotal;
443
+ PyAPI_FUNC(void) _Py_NegativeRefcount(const char *filename, int lineno,
444
+ PyObject *op);
445
+ #endif /* Py_REF_DEBUG */
446
+
447
+ PyAPI_FUNC(void) _Py_Dealloc(PyObject *);
448
+
449
+ /*
450
+ These are provided as conveniences to Python runtime embedders, so that
451
+ they can have object code that is not dependent on Python compilation flags.
452
+ */
453
+ PyAPI_FUNC(void) Py_IncRef(PyObject *);
454
+ PyAPI_FUNC(void) Py_DecRef(PyObject *);
455
+
456
+ // Similar to Py_IncRef() and Py_DecRef() but the argument must be non-NULL.
457
+ // Private functions used by Py_INCREF() and Py_DECREF().
458
+ PyAPI_FUNC(void) _Py_IncRef(PyObject *);
459
+ PyAPI_FUNC(void) _Py_DecRef(PyObject *);
460
+
461
+ static inline void _Py_INCREF(PyObject *op)
462
+ {
463
+ #if defined(Py_REF_DEBUG) && defined(Py_LIMITED_API) && Py_LIMITED_API+0 >= 0x030A0000
464
+ // Stable ABI for Python 3.10 built in debug mode.
465
+ _Py_IncRef(op);
466
+ #else
467
+ // Non-limited C API and limited C API for Python 3.9 and older access
468
+ // directly PyObject.ob_refcnt.
469
+ #ifdef Py_REF_DEBUG
470
+ _Py_RefTotal++;
471
+ #endif
472
+ op->ob_refcnt++;
473
+ #endif
474
+ }
475
+ #define Py_INCREF(op) _Py_INCREF(_PyObject_CAST(op))
476
+
477
+ static inline void _Py_DECREF(
478
+ #if defined(Py_REF_DEBUG) && !(defined(Py_LIMITED_API) && Py_LIMITED_API+0 >= 0x030A0000)
479
+ const char *filename, int lineno,
480
+ #endif
481
+ PyObject *op)
482
+ {
483
+ #if defined(Py_REF_DEBUG) && defined(Py_LIMITED_API) && Py_LIMITED_API+0 >= 0x030A0000
484
+ // Stable ABI for Python 3.10 built in debug mode.
485
+ _Py_DecRef(op);
486
+ #else
487
+ // Non-limited C API and limited C API for Python 3.9 and older access
488
+ // directly PyObject.ob_refcnt.
489
+ #ifdef Py_REF_DEBUG
490
+ _Py_RefTotal--;
491
+ #endif
492
+ if (--op->ob_refcnt != 0) {
493
+ #ifdef Py_REF_DEBUG
494
+ if (op->ob_refcnt < 0) {
495
+ _Py_NegativeRefcount(filename, lineno, op);
496
+ }
497
+ #endif
498
+ }
499
+ else {
500
+ _Py_Dealloc(op);
501
+ }
502
+ #endif
503
+ }
504
+ #if defined(Py_REF_DEBUG) && !(defined(Py_LIMITED_API) && Py_LIMITED_API+0 >= 0x030A0000)
505
+ # define Py_DECREF(op) _Py_DECREF(__FILE__, __LINE__, _PyObject_CAST(op))
506
+ #else
507
+ # define Py_DECREF(op) _Py_DECREF(_PyObject_CAST(op))
508
+ #endif
509
+
510
+
511
+ /* Safely decref `op` and set `op` to NULL, especially useful in tp_clear
512
+ * and tp_dealloc implementations.
513
+ *
514
+ * Note that "the obvious" code can be deadly:
515
+ *
516
+ * Py_XDECREF(op);
517
+ * op = NULL;
518
+ *
519
+ * Typically, `op` is something like self->containee, and `self` is done
520
+ * using its `containee` member. In the code sequence above, suppose
521
+ * `containee` is non-NULL with a refcount of 1. Its refcount falls to
522
+ * 0 on the first line, which can trigger an arbitrary amount of code,
523
+ * possibly including finalizers (like __del__ methods or weakref callbacks)
524
+ * coded in Python, which in turn can release the GIL and allow other threads
525
+ * to run, etc. Such code may even invoke methods of `self` again, or cause
526
+ * cyclic gc to trigger, but-- oops! --self->containee still points to the
527
+ * object being torn down, and it may be in an insane state while being torn
528
+ * down. This has in fact been a rich historic source of miserable (rare &
529
+ * hard-to-diagnose) segfaulting (and other) bugs.
530
+ *
531
+ * The safe way is:
532
+ *
533
+ * Py_CLEAR(op);
534
+ *
535
+ * That arranges to set `op` to NULL _before_ decref'ing, so that any code
536
+ * triggered as a side-effect of `op` getting torn down no longer believes
537
+ * `op` points to a valid object.
538
+ *
539
+ * There are cases where it's safe to use the naive code, but they're brittle.
540
+ * For example, if `op` points to a Python integer, you know that destroying
541
+ * one of those can't cause problems -- but in part that relies on that
542
+ * Python integers aren't currently weakly referencable. Best practice is
543
+ * to use Py_CLEAR() even if you can't think of a reason for why you need to.
544
+ */
545
+ #define Py_CLEAR(op) \
546
+ do { \
547
+ PyObject *_py_tmp = _PyObject_CAST(op); \
548
+ if (_py_tmp != NULL) { \
549
+ (op) = NULL; \
550
+ Py_DECREF(_py_tmp); \
551
+ } \
552
+ } while (0)
553
+
554
+ /* Function to use in case the object pointer can be NULL: */
555
+ static inline void _Py_XINCREF(PyObject *op)
556
+ {
557
+ if (op != NULL) {
558
+ Py_INCREF(op);
559
+ }
560
+ }
561
+
562
+ #define Py_XINCREF(op) _Py_XINCREF(_PyObject_CAST(op))
563
+
564
+ static inline void _Py_XDECREF(PyObject *op)
565
+ {
566
+ if (op != NULL) {
567
+ Py_DECREF(op);
568
+ }
569
+ }
570
+
571
+ #define Py_XDECREF(op) _Py_XDECREF(_PyObject_CAST(op))
572
+
573
+ // Create a new strong reference to an object:
574
+ // increment the reference count of the object and return the object.
575
+ PyAPI_FUNC(PyObject*) Py_NewRef(PyObject *obj);
576
+
577
+ // Similar to Py_NewRef(), but the object can be NULL.
578
+ PyAPI_FUNC(PyObject*) Py_XNewRef(PyObject *obj);
579
+
580
+ static inline PyObject* _Py_NewRef(PyObject *obj)
581
+ {
582
+ Py_INCREF(obj);
583
+ return obj;
584
+ }
585
+
586
+ static inline PyObject* _Py_XNewRef(PyObject *obj)
587
+ {
588
+ Py_XINCREF(obj);
589
+ return obj;
590
+ }
591
+
592
+ // Py_NewRef() and Py_XNewRef() are exported as functions for the stable ABI.
593
+ // Names overridden with macros by static inline functions for best
594
+ // performances.
595
+ #define Py_NewRef(obj) _Py_NewRef(_PyObject_CAST(obj))
596
+ #define Py_XNewRef(obj) _Py_XNewRef(_PyObject_CAST(obj))
597
+
598
+
599
+ /*
600
+ _Py_NoneStruct is an object of undefined type which can be used in contexts
601
+ where NULL (nil) is not suitable (since NULL often means 'error').
602
+
603
+ Don't forget to apply Py_INCREF() when returning this value!!!
604
+ */
605
+ PyAPI_DATA(PyObject) _Py_NoneStruct; /* Don't use this directly */
606
+ #define Py_None (&_Py_NoneStruct)
607
+
608
+ // Test if an object is the None singleton, the same as "x is None" in Python.
609
+ PyAPI_FUNC(int) Py_IsNone(PyObject *x);
610
+ #define Py_IsNone(x) Py_Is((x), Py_None)
611
+
612
+ /* Macro for returning Py_None from a function */
613
+ #define Py_RETURN_NONE return Py_NewRef(Py_None)
614
+
615
+ /*
616
+ Py_NotImplemented is a singleton used to signal that an operation is
617
+ not implemented for a given type combination.
618
+ */
619
+ PyAPI_DATA(PyObject) _Py_NotImplementedStruct; /* Don't use this directly */
620
+ #define Py_NotImplemented (&_Py_NotImplementedStruct)
621
+
622
+ /* Macro for returning Py_NotImplemented from a function */
623
+ #define Py_RETURN_NOTIMPLEMENTED return Py_NewRef(Py_NotImplemented)
624
+
625
+ /* Rich comparison opcodes */
626
+ #define Py_LT 0
627
+ #define Py_LE 1
628
+ #define Py_EQ 2
629
+ #define Py_NE 3
630
+ #define Py_GT 4
631
+ #define Py_GE 5
632
+
633
+ #if !defined(Py_LIMITED_API) || Py_LIMITED_API+0 >= 0x030A0000
634
+ /* Result of calling PyIter_Send */
635
+ typedef enum {
636
+ PYGEN_RETURN = 0,
637
+ PYGEN_ERROR = -1,
638
+ PYGEN_NEXT = 1,
639
+ } PySendResult;
640
+ #endif
641
+
642
+ /*
643
+ * Macro for implementing rich comparisons
644
+ *
645
+ * Needs to be a macro because any C-comparable type can be used.
646
+ */
647
+ #define Py_RETURN_RICHCOMPARE(val1, val2, op) \
648
+ do { \
649
+ switch (op) { \
650
+ case Py_EQ: if ((val1) == (val2)) Py_RETURN_TRUE; Py_RETURN_FALSE; \
651
+ case Py_NE: if ((val1) != (val2)) Py_RETURN_TRUE; Py_RETURN_FALSE; \
652
+ case Py_LT: if ((val1) < (val2)) Py_RETURN_TRUE; Py_RETURN_FALSE; \
653
+ case Py_GT: if ((val1) > (val2)) Py_RETURN_TRUE; Py_RETURN_FALSE; \
654
+ case Py_LE: if ((val1) <= (val2)) Py_RETURN_TRUE; Py_RETURN_FALSE; \
655
+ case Py_GE: if ((val1) >= (val2)) Py_RETURN_TRUE; Py_RETURN_FALSE; \
656
+ default: \
657
+ Py_UNREACHABLE(); \
658
+ } \
659
+ } while (0)
660
+
661
+
662
+ /*
663
+ More conventions
664
+ ================
665
+
666
+ Argument Checking
667
+ -----------------
668
+
669
+ Functions that take objects as arguments normally don't check for nil
670
+ arguments, but they do check the type of the argument, and return an
671
+ error if the function doesn't apply to the type.
672
+
673
+ Failure Modes
674
+ -------------
675
+
676
+ Functions may fail for a variety of reasons, including running out of
677
+ memory. This is communicated to the caller in two ways: an error string
678
+ is set (see errors.h), and the function result differs: functions that
679
+ normally return a pointer return NULL for failure, functions returning
680
+ an integer return -1 (which could be a legal return value too!), and
681
+ other functions return 0 for success and -1 for failure.
682
+ Callers should always check for errors before using the result. If
683
+ an error was set, the caller must either explicitly clear it, or pass
684
+ the error on to its caller.
685
+
686
+ Reference Counts
687
+ ----------------
688
+
689
+ It takes a while to get used to the proper usage of reference counts.
690
+
691
+ Functions that create an object set the reference count to 1; such new
692
+ objects must be stored somewhere or destroyed again with Py_DECREF().
693
+ Some functions that 'store' objects, such as PyTuple_SetItem() and
694
+ PyList_SetItem(),
695
+ don't increment the reference count of the object, since the most
696
+ frequent use is to store a fresh object. Functions that 'retrieve'
697
+ objects, such as PyTuple_GetItem() and PyDict_GetItemString(), also
698
+ don't increment
699
+ the reference count, since most frequently the object is only looked at
700
+ quickly. Thus, to retrieve an object and store it again, the caller
701
+ must call Py_INCREF() explicitly.
702
+
703
+ NOTE: functions that 'consume' a reference count, like
704
+ PyList_SetItem(), consume the reference even if the object wasn't
705
+ successfully stored, to simplify error handling.
706
+
707
+ It seems attractive to make other functions that take an object as
708
+ argument consume a reference count; however, this may quickly get
709
+ confusing (even the current practice is already confusing). Consider
710
+ it carefully, it may save lots of calls to Py_INCREF() and Py_DECREF() at
711
+ times.
712
+ */
713
+
714
+ #ifndef Py_LIMITED_API
715
+ # define Py_CPYTHON_OBJECT_H
716
+ # include "cpython/object.h"
717
+ # undef Py_CPYTHON_OBJECT_H
718
+ #endif
719
+
720
+
721
+ static inline int
722
+ PyType_HasFeature(PyTypeObject *type, unsigned long feature)
723
+ {
724
+ unsigned long flags;
725
+ #ifdef Py_LIMITED_API
726
+ // PyTypeObject is opaque in the limited C API
727
+ flags = PyType_GetFlags(type);
728
+ #else
729
+ flags = type->tp_flags;
730
+ #endif
731
+ return ((flags & feature) != 0);
732
+ }
733
+
734
+ #define PyType_FastSubclass(type, flag) PyType_HasFeature(type, flag)
735
+
736
+ static inline int _PyType_Check(PyObject *op) {
737
+ return PyType_FastSubclass(Py_TYPE(op), Py_TPFLAGS_TYPE_SUBCLASS);
738
+ }
739
+ #define PyType_Check(op) _PyType_Check(_PyObject_CAST(op))
740
+
741
+ static inline int _PyType_CheckExact(PyObject *op) {
742
+ return Py_IS_TYPE(op, &PyType_Type);
743
+ }
744
+ #define PyType_CheckExact(op) _PyType_CheckExact(_PyObject_CAST(op))
745
+
746
+ #ifdef __cplusplus
747
+ }
748
+ #endif
749
+ #endif /* !Py_OBJECT_H */
evalkit_internvl/include/python3.10/objimpl.h ADDED
@@ -0,0 +1,215 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /* The PyObject_ memory family: high-level object memory interfaces.
2
+ See pymem.h for the low-level PyMem_ family.
3
+ */
4
+
5
+ #ifndef Py_OBJIMPL_H
6
+ #define Py_OBJIMPL_H
7
+
8
+ #include "pymem.h"
9
+
10
+ #ifdef __cplusplus
11
+ extern "C" {
12
+ #endif
13
+
14
+ /* BEWARE:
15
+
16
+ Each interface exports both functions and macros. Extension modules should
17
+ use the functions, to ensure binary compatibility across Python versions.
18
+ Because the Python implementation is free to change internal details, and
19
+ the macros may (or may not) expose details for speed, if you do use the
20
+ macros you must recompile your extensions with each Python release.
21
+
22
+ Never mix calls to PyObject_ memory functions with calls to the platform
23
+ malloc/realloc/ calloc/free, or with calls to PyMem_.
24
+ */
25
+
26
+ /*
27
+ Functions and macros for modules that implement new object types.
28
+
29
+ - PyObject_New(type, typeobj) allocates memory for a new object of the given
30
+ type, and initializes part of it. 'type' must be the C structure type used
31
+ to represent the object, and 'typeobj' the address of the corresponding
32
+ type object. Reference count and type pointer are filled in; the rest of
33
+ the bytes of the object are *undefined*! The resulting expression type is
34
+ 'type *'. The size of the object is determined by the tp_basicsize field
35
+ of the type object.
36
+
37
+ - PyObject_NewVar(type, typeobj, n) is similar but allocates a variable-size
38
+ object with room for n items. In addition to the refcount and type pointer
39
+ fields, this also fills in the ob_size field.
40
+
41
+ - PyObject_Free(op) releases the memory allocated for an object. It does not
42
+ run a destructor -- it only frees the memory. PyObject_Free is identical.
43
+
44
+ - PyObject_Init(op, typeobj) and PyObject_InitVar(op, typeobj, n) don't
45
+ allocate memory. Instead of a 'type' parameter, they take a pointer to a
46
+ new object (allocated by an arbitrary allocator), and initialize its object
47
+ header fields.
48
+
49
+ Note that objects created with PyObject_{New, NewVar} are allocated using the
50
+ specialized Python allocator (implemented in obmalloc.c), if WITH_PYMALLOC is
51
+ enabled. In addition, a special debugging allocator is used if Py_DEBUG
52
+ macro is also defined.
53
+
54
+ In case a specific form of memory management is needed (for example, if you
55
+ must use the platform malloc heap(s), or shared memory, or C++ local storage or
56
+ operator new), you must first allocate the object with your custom allocator,
57
+ then pass its pointer to PyObject_{Init, InitVar} for filling in its Python-
58
+ specific fields: reference count, type pointer, possibly others. You should
59
+ be aware that Python has no control over these objects because they don't
60
+ cooperate with the Python memory manager. Such objects may not be eligible
61
+ for automatic garbage collection and you have to make sure that they are
62
+ released accordingly whenever their destructor gets called (cf. the specific
63
+ form of memory management you're using).
64
+
65
+ Unless you have specific memory management requirements, use
66
+ PyObject_{New, NewVar, Del}.
67
+ */
68
+
69
+ /*
70
+ * Raw object memory interface
71
+ * ===========================
72
+ */
73
+
74
+ /* Functions to call the same malloc/realloc/free as used by Python's
75
+ object allocator. If WITH_PYMALLOC is enabled, these may differ from
76
+ the platform malloc/realloc/free. The Python object allocator is
77
+ designed for fast, cache-conscious allocation of many "small" objects,
78
+ and with low hidden memory overhead.
79
+
80
+ PyObject_Malloc(0) returns a unique non-NULL pointer if possible.
81
+
82
+ PyObject_Realloc(NULL, n) acts like PyObject_Malloc(n).
83
+ PyObject_Realloc(p != NULL, 0) does not return NULL, or free the memory
84
+ at p.
85
+
86
+ Returned pointers must be checked for NULL explicitly; no action is
87
+ performed on failure other than to return NULL (no warning it printed, no
88
+ exception is set, etc).
89
+
90
+ For allocating objects, use PyObject_{New, NewVar} instead whenever
91
+ possible. The PyObject_{Malloc, Realloc, Free} family is exposed
92
+ so that you can exploit Python's small-block allocator for non-object
93
+ uses. If you must use these routines to allocate object memory, make sure
94
+ the object gets initialized via PyObject_{Init, InitVar} after obtaining
95
+ the raw memory.
96
+ */
97
+ PyAPI_FUNC(void *) PyObject_Malloc(size_t size);
98
+ #if !defined(Py_LIMITED_API) || Py_LIMITED_API+0 >= 0x03050000
99
+ PyAPI_FUNC(void *) PyObject_Calloc(size_t nelem, size_t elsize);
100
+ #endif
101
+ PyAPI_FUNC(void *) PyObject_Realloc(void *ptr, size_t new_size);
102
+ PyAPI_FUNC(void) PyObject_Free(void *ptr);
103
+
104
+
105
+ // Deprecated aliases only kept for backward compatibility.
106
+ // PyObject_Del and PyObject_DEL are defined with no parameter to be able to
107
+ // use them as function pointers (ex: tp_free = PyObject_Del).
108
+ #define PyObject_MALLOC PyObject_Malloc
109
+ #define PyObject_REALLOC PyObject_Realloc
110
+ #define PyObject_FREE PyObject_Free
111
+ #define PyObject_Del PyObject_Free
112
+ #define PyObject_DEL PyObject_Free
113
+
114
+
115
+ /*
116
+ * Generic object allocator interface
117
+ * ==================================
118
+ */
119
+
120
+ /* Functions */
121
+ PyAPI_FUNC(PyObject *) PyObject_Init(PyObject *, PyTypeObject *);
122
+ PyAPI_FUNC(PyVarObject *) PyObject_InitVar(PyVarObject *,
123
+ PyTypeObject *, Py_ssize_t);
124
+
125
+ #define PyObject_INIT(op, typeobj) \
126
+ PyObject_Init(_PyObject_CAST(op), (typeobj))
127
+ #define PyObject_INIT_VAR(op, typeobj, size) \
128
+ PyObject_InitVar(_PyVarObject_CAST(op), (typeobj), (size))
129
+
130
+
131
+ PyAPI_FUNC(PyObject *) _PyObject_New(PyTypeObject *);
132
+ PyAPI_FUNC(PyVarObject *) _PyObject_NewVar(PyTypeObject *, Py_ssize_t);
133
+
134
+ #define PyObject_New(type, typeobj) ((type *)_PyObject_New(typeobj))
135
+
136
+ // Alias to PyObject_New(). In Python 3.8, PyObject_NEW() called directly
137
+ // PyObject_MALLOC() with _PyObject_SIZE().
138
+ #define PyObject_NEW(type, typeobj) PyObject_New(type, typeobj)
139
+
140
+ #define PyObject_NewVar(type, typeobj, n) \
141
+ ( (type *) _PyObject_NewVar((typeobj), (n)) )
142
+
143
+ // Alias to PyObject_NewVar(). In Python 3.8, PyObject_NEW_VAR() called
144
+ // directly PyObject_MALLOC() with _PyObject_VAR_SIZE().
145
+ #define PyObject_NEW_VAR(type, typeobj, n) PyObject_NewVar(type, typeobj, n)
146
+
147
+
148
+ /*
149
+ * Garbage Collection Support
150
+ * ==========================
151
+ */
152
+
153
+ /* C equivalent of gc.collect(). */
154
+ PyAPI_FUNC(Py_ssize_t) PyGC_Collect(void);
155
+ /* C API for controlling the state of the garbage collector */
156
+ PyAPI_FUNC(int) PyGC_Enable(void);
157
+ PyAPI_FUNC(int) PyGC_Disable(void);
158
+ PyAPI_FUNC(int) PyGC_IsEnabled(void);
159
+
160
+ /* Test if a type has a GC head */
161
+ #define PyType_IS_GC(t) PyType_HasFeature((t), Py_TPFLAGS_HAVE_GC)
162
+
163
+ PyAPI_FUNC(PyVarObject *) _PyObject_GC_Resize(PyVarObject *, Py_ssize_t);
164
+ #define PyObject_GC_Resize(type, op, n) \
165
+ ( (type *) _PyObject_GC_Resize(_PyVarObject_CAST(op), (n)) )
166
+
167
+
168
+
169
+ PyAPI_FUNC(PyObject *) _PyObject_GC_New(PyTypeObject *);
170
+ PyAPI_FUNC(PyVarObject *) _PyObject_GC_NewVar(PyTypeObject *, Py_ssize_t);
171
+
172
+ /* Tell the GC to track this object.
173
+ *
174
+ * See also private _PyObject_GC_TRACK() macro. */
175
+ PyAPI_FUNC(void) PyObject_GC_Track(void *);
176
+
177
+ /* Tell the GC to stop tracking this object.
178
+ *
179
+ * See also private _PyObject_GC_UNTRACK() macro. */
180
+ PyAPI_FUNC(void) PyObject_GC_UnTrack(void *);
181
+
182
+ PyAPI_FUNC(void) PyObject_GC_Del(void *);
183
+
184
+ #define PyObject_GC_New(type, typeobj) \
185
+ ( (type *) _PyObject_GC_New(typeobj) )
186
+ #define PyObject_GC_NewVar(type, typeobj, n) \
187
+ ( (type *) _PyObject_GC_NewVar((typeobj), (n)) )
188
+
189
+ PyAPI_FUNC(int) PyObject_GC_IsTracked(PyObject *);
190
+ PyAPI_FUNC(int) PyObject_GC_IsFinalized(PyObject *);
191
+
192
+ /* Utility macro to help write tp_traverse functions.
193
+ * To use this macro, the tp_traverse function must name its arguments
194
+ * "visit" and "arg". This is intended to keep tp_traverse functions
195
+ * looking as much alike as possible.
196
+ */
197
+ #define Py_VISIT(op) \
198
+ do { \
199
+ if (op) { \
200
+ int vret = visit(_PyObject_CAST(op), arg); \
201
+ if (vret) \
202
+ return vret; \
203
+ } \
204
+ } while (0)
205
+
206
+ #ifndef Py_LIMITED_API
207
+ # define Py_CPYTHON_OBJIMPL_H
208
+ # include "cpython/objimpl.h"
209
+ # undef Py_CPYTHON_OBJIMPL_H
210
+ #endif
211
+
212
+ #ifdef __cplusplus
213
+ }
214
+ #endif
215
+ #endif /* !Py_OBJIMPL_H */
evalkit_internvl/include/python3.10/osdefs.h ADDED
@@ -0,0 +1,51 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ #ifndef Py_OSDEFS_H
2
+ #define Py_OSDEFS_H
3
+ #ifdef __cplusplus
4
+ extern "C" {
5
+ #endif
6
+
7
+
8
+ /* Operating system dependencies */
9
+
10
+ #ifdef MS_WINDOWS
11
+ #define SEP L'\\'
12
+ #define ALTSEP L'/'
13
+ #define MAXPATHLEN 256
14
+ #define DELIM L';'
15
+ #endif
16
+
17
+ #ifdef __VXWORKS__
18
+ #define DELIM L';'
19
+ #endif
20
+
21
+ /* Filename separator */
22
+ #ifndef SEP
23
+ #define SEP L'/'
24
+ #endif
25
+
26
+ /* Max pathname length */
27
+ #ifdef __hpux
28
+ #include <sys/param.h>
29
+ #include <limits.h>
30
+ #ifndef PATH_MAX
31
+ #define PATH_MAX MAXPATHLEN
32
+ #endif
33
+ #endif
34
+
35
+ #ifndef MAXPATHLEN
36
+ #if defined(PATH_MAX) && PATH_MAX > 1024
37
+ #define MAXPATHLEN PATH_MAX
38
+ #else
39
+ #define MAXPATHLEN 1024
40
+ #endif
41
+ #endif
42
+
43
+ /* Search path entry delimiter */
44
+ #ifndef DELIM
45
+ #define DELIM L':'
46
+ #endif
47
+
48
+ #ifdef __cplusplus
49
+ }
50
+ #endif
51
+ #endif /* !Py_OSDEFS_H */
evalkit_internvl/include/python3.10/osmodule.h ADDED
@@ -0,0 +1,17 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+
2
+ /* os module interface */
3
+
4
+ #ifndef Py_OSMODULE_H
5
+ #define Py_OSMODULE_H
6
+ #ifdef __cplusplus
7
+ extern "C" {
8
+ #endif
9
+
10
+ #if !defined(Py_LIMITED_API) || Py_LIMITED_API+0 >= 0x03060000
11
+ PyAPI_FUNC(PyObject *) PyOS_FSPath(PyObject *path);
12
+ #endif
13
+
14
+ #ifdef __cplusplus
15
+ }
16
+ #endif
17
+ #endif /* !Py_OSMODULE_H */
evalkit_internvl/include/python3.10/py_curses.h ADDED
@@ -0,0 +1,99 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+
2
+ #ifndef Py_CURSES_H
3
+ #define Py_CURSES_H
4
+
5
+ #ifdef __APPLE__
6
+ /*
7
+ ** On Mac OS X 10.2 [n]curses.h and stdlib.h use different guards
8
+ ** against multiple definition of wchar_t.
9
+ */
10
+ #ifdef _BSD_WCHAR_T_DEFINED_
11
+ #define _WCHAR_T
12
+ #endif
13
+ #endif /* __APPLE__ */
14
+
15
+ /* On FreeBSD, [n]curses.h and stdlib.h/wchar.h use different guards
16
+ against multiple definition of wchar_t and wint_t. */
17
+ #if defined(__FreeBSD__) && defined(_XOPEN_SOURCE_EXTENDED)
18
+ # ifndef __wchar_t
19
+ # define __wchar_t
20
+ # endif
21
+ # ifndef __wint_t
22
+ # define __wint_t
23
+ # endif
24
+ #endif
25
+
26
+ #if !defined(HAVE_CURSES_IS_PAD) && defined(WINDOW_HAS_FLAGS)
27
+ /* The following definition is necessary for ncurses 5.7; without it,
28
+ some of [n]curses.h set NCURSES_OPAQUE to 1, and then Python
29
+ can't get at the WINDOW flags field. */
30
+ #define NCURSES_OPAQUE 0
31
+ #endif
32
+
33
+ #ifdef HAVE_NCURSES_H
34
+ #include <ncurses.h>
35
+ #else
36
+ #include <curses.h>
37
+ #endif
38
+
39
+ #ifdef HAVE_NCURSES_H
40
+ /* configure was checking <curses.h>, but we will
41
+ use <ncurses.h>, which has some or all these features. */
42
+ #if !defined(WINDOW_HAS_FLAGS) && !(NCURSES_OPAQUE+0)
43
+ #define WINDOW_HAS_FLAGS 1
44
+ #endif
45
+ #if !defined(HAVE_CURSES_IS_PAD) && NCURSES_VERSION_PATCH+0 >= 20090906
46
+ #define HAVE_CURSES_IS_PAD 1
47
+ #endif
48
+ #ifndef MVWDELCH_IS_EXPRESSION
49
+ #define MVWDELCH_IS_EXPRESSION 1
50
+ #endif
51
+ #endif
52
+
53
+ #ifdef __cplusplus
54
+ extern "C" {
55
+ #endif
56
+
57
+ #define PyCurses_API_pointers 4
58
+
59
+ /* Type declarations */
60
+
61
+ typedef struct {
62
+ PyObject_HEAD
63
+ WINDOW *win;
64
+ char *encoding;
65
+ } PyCursesWindowObject;
66
+
67
+ #define PyCursesWindow_Check(v) Py_IS_TYPE(v, &PyCursesWindow_Type)
68
+
69
+ #define PyCurses_CAPSULE_NAME "_curses._C_API"
70
+
71
+
72
+ #ifdef CURSES_MODULE
73
+ /* This section is used when compiling _cursesmodule.c */
74
+
75
+ #else
76
+ /* This section is used in modules that use the _cursesmodule API */
77
+
78
+ static void **PyCurses_API;
79
+
80
+ #define PyCursesWindow_Type (*(PyTypeObject *) PyCurses_API[0])
81
+ #define PyCursesSetupTermCalled {if (! ((int (*)(void))PyCurses_API[1]) () ) return NULL;}
82
+ #define PyCursesInitialised {if (! ((int (*)(void))PyCurses_API[2]) () ) return NULL;}
83
+ #define PyCursesInitialisedColor {if (! ((int (*)(void))PyCurses_API[3]) () ) return NULL;}
84
+
85
+ #define import_curses() \
86
+ PyCurses_API = (void **)PyCapsule_Import(PyCurses_CAPSULE_NAME, 1);
87
+
88
+ #endif
89
+
90
+ /* general error messages */
91
+ static const char catchall_ERR[] = "curses function returned ERR";
92
+ static const char catchall_NULL[] = "curses function returned NULL";
93
+
94
+ #ifdef __cplusplus
95
+ }
96
+ #endif
97
+
98
+ #endif /* !defined(Py_CURSES_H) */
99
+
evalkit_internvl/include/python3.10/pyconfig.h ADDED
@@ -0,0 +1,1703 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /* pyconfig.h. Generated from pyconfig.h.in by configure. */
2
+ /* pyconfig.h.in. Generated from configure.ac by autoheader. */
3
+
4
+
5
+ #ifndef Py_PYCONFIG_H
6
+ #define Py_PYCONFIG_H
7
+
8
+
9
+ /* Define if building universal (internal helper macro) */
10
+ /* #undef AC_APPLE_UNIVERSAL_BUILD */
11
+
12
+ /* BUILD_GNU_TYPE + AIX_BUILDDATE are used to construct the PEP425 tag of the
13
+ build system. */
14
+ /* #undef AIX_BUILDDATE */
15
+
16
+ /* Define for AIX if your compiler is a genuine IBM xlC/xlC_r and you want
17
+ support for AIX C++ shared extension modules. */
18
+ /* #undef AIX_GENUINE_CPLUSPLUS */
19
+
20
+ /* The normal alignment of `long', in bytes. */
21
+ #define ALIGNOF_LONG 8
22
+
23
+ /* The normal alignment of `size_t', in bytes. */
24
+ #define ALIGNOF_SIZE_T 8
25
+
26
+ /* Alternative SOABI used in debug build to load C extensions built in release
27
+ mode */
28
+ /* #undef ALT_SOABI */
29
+
30
+ /* The Android API level. */
31
+ /* #undef ANDROID_API_LEVEL */
32
+
33
+ /* Define if C doubles are 64-bit IEEE 754 binary format, stored in ARM
34
+ mixed-endian order (byte order 45670123) */
35
+ /* #undef DOUBLE_IS_ARM_MIXED_ENDIAN_IEEE754 */
36
+
37
+ /* Define if C doubles are 64-bit IEEE 754 binary format, stored with the most
38
+ significant byte first */
39
+ /* #undef DOUBLE_IS_BIG_ENDIAN_IEEE754 */
40
+
41
+ /* Define if C doubles are 64-bit IEEE 754 binary format, stored with the
42
+ least significant byte first */
43
+ #define DOUBLE_IS_LITTLE_ENDIAN_IEEE754 1
44
+
45
+ /* Define if --enable-ipv6 is specified */
46
+ #define ENABLE_IPV6 1
47
+
48
+ /* Better isolate subinterpreters, experimental build mode. */
49
+ /* #undef EXPERIMENTAL_ISOLATED_SUBINTERPRETERS */
50
+
51
+ /* Define to 1 if your system stores words within floats with the most
52
+ significant word first */
53
+ /* #undef FLOAT_WORDS_BIGENDIAN */
54
+
55
+ /* Define if flock needs to be linked with bsd library. */
56
+ /* #undef FLOCK_NEEDS_LIBBSD */
57
+
58
+ /* Define if getpgrp() must be called as getpgrp(0). */
59
+ /* #undef GETPGRP_HAVE_ARG */
60
+
61
+ /* Define to 1 if you have the `accept4' function. */
62
+ #define HAVE_ACCEPT4 1
63
+
64
+ /* Define to 1 if you have the `acosh' function. */
65
+ #define HAVE_ACOSH 1
66
+
67
+ /* struct addrinfo (netdb.h) */
68
+ #define HAVE_ADDRINFO 1
69
+
70
+ /* Define to 1 if you have the `alarm' function. */
71
+ #define HAVE_ALARM 1
72
+
73
+ /* Define if aligned memory access is required */
74
+ /* #undef HAVE_ALIGNED_REQUIRED */
75
+
76
+ /* Define to 1 if you have the <alloca.h> header file. */
77
+ #define HAVE_ALLOCA_H 1
78
+
79
+ /* Define this if your time.h defines altzone. */
80
+ /* #undef HAVE_ALTZONE */
81
+
82
+ /* Define to 1 if you have the `asinh' function. */
83
+ #define HAVE_ASINH 1
84
+
85
+ /* Define to 1 if you have the <asm/types.h> header file. */
86
+ #define HAVE_ASM_TYPES_H 1
87
+
88
+ /* Define to 1 if you have the `atanh' function. */
89
+ #define HAVE_ATANH 1
90
+
91
+ /* Define to 1 if you have the `bind_textdomain_codeset' function. */
92
+ #define HAVE_BIND_TEXTDOMAIN_CODESET 1
93
+
94
+ /* Define to 1 if you have the <bluetooth/bluetooth.h> header file. */
95
+ /* #undef HAVE_BLUETOOTH_BLUETOOTH_H */
96
+
97
+ /* Define to 1 if you have the <bluetooth.h> header file. */
98
+ /* #undef HAVE_BLUETOOTH_H */
99
+
100
+ /* Define if mbstowcs(NULL, "text", 0) does not return the number of wide
101
+ chars that would be converted. */
102
+ /* #undef HAVE_BROKEN_MBSTOWCS */
103
+
104
+ /* Define if nice() returns success/failure instead of the new priority. */
105
+ /* #undef HAVE_BROKEN_NICE */
106
+
107
+ /* Define if the system reports an invalid PIPE_BUF value. */
108
+ /* #undef HAVE_BROKEN_PIPE_BUF */
109
+
110
+ /* Define if poll() sets errno on invalid file descriptors. */
111
+ /* #undef HAVE_BROKEN_POLL */
112
+
113
+ /* Define if the Posix semaphores do not work on your system */
114
+ /* #undef HAVE_BROKEN_POSIX_SEMAPHORES */
115
+
116
+ /* Define if pthread_sigmask() does not work on your system. */
117
+ /* #undef HAVE_BROKEN_PTHREAD_SIGMASK */
118
+
119
+ /* define to 1 if your sem_getvalue is broken. */
120
+ /* #undef HAVE_BROKEN_SEM_GETVALUE */
121
+
122
+ /* Define if `unsetenv` does not return an int. */
123
+ /* #undef HAVE_BROKEN_UNSETENV */
124
+
125
+ /* Has builtin __atomic_load_n() and __atomic_store_n() functions */
126
+ #define HAVE_BUILTIN_ATOMIC 1
127
+
128
+ /* Define to 1 if you have the 'chflags' function. */
129
+ /* #undef HAVE_CHFLAGS */
130
+
131
+ /* Define to 1 if you have the `chown' function. */
132
+ #define HAVE_CHOWN 1
133
+
134
+ /* Define if you have the 'chroot' function. */
135
+ #define HAVE_CHROOT 1
136
+
137
+ /* Define to 1 if you have the `clock' function. */
138
+ #define HAVE_CLOCK 1
139
+
140
+ /* Define to 1 if you have the `clock_getres' function. */
141
+ #define HAVE_CLOCK_GETRES 1
142
+
143
+ /* Define to 1 if you have the `clock_gettime' function. */
144
+ #define HAVE_CLOCK_GETTIME 1
145
+
146
+ /* Define to 1 if you have the `clock_settime' function. */
147
+ #define HAVE_CLOCK_SETTIME 1
148
+
149
+ /* Define to 1 if you have the `close_range' function. */
150
+ /* #undef HAVE_CLOSE_RANGE */
151
+
152
+ /* Define if the C compiler supports computed gotos. */
153
+ #define HAVE_COMPUTED_GOTOS 1
154
+
155
+ /* Define to 1 if you have the `confstr' function. */
156
+ #define HAVE_CONFSTR 1
157
+
158
+ /* Define to 1 if you have the <conio.h> header file. */
159
+ /* #undef HAVE_CONIO_H */
160
+
161
+ /* Define to 1 if you have the `copysign' function. */
162
+ #define HAVE_COPYSIGN 1
163
+
164
+ /* Define to 1 if you have the `copy_file_range' function. */
165
+ /* #undef HAVE_COPY_FILE_RANGE */
166
+
167
+ /* Define to 1 if you have the <crypt.h> header file. */
168
+ #define HAVE_CRYPT_H 1
169
+
170
+ /* Define if you have the crypt_r() function. */
171
+ #define HAVE_CRYPT_R 1
172
+
173
+ /* Define to 1 if you have the `ctermid' function. */
174
+ #define HAVE_CTERMID 1
175
+
176
+ /* Define if you have the 'ctermid_r' function. */
177
+ /* #undef HAVE_CTERMID_R */
178
+
179
+ /* Define if you have the 'filter' function. */
180
+ #define HAVE_CURSES_FILTER 1
181
+
182
+ /* Define to 1 if you have the <curses.h> header file. */
183
+ #define HAVE_CURSES_H 1
184
+
185
+ /* Define if you have the 'has_key' function. */
186
+ #define HAVE_CURSES_HAS_KEY 1
187
+
188
+ /* Define if you have the 'immedok' function. */
189
+ #define HAVE_CURSES_IMMEDOK 1
190
+
191
+ /* Define if you have the 'is_pad' function or macro. */
192
+ #define HAVE_CURSES_IS_PAD 1
193
+
194
+ /* Define if you have the 'is_term_resized' function. */
195
+ #define HAVE_CURSES_IS_TERM_RESIZED 1
196
+
197
+ /* Define if you have the 'resizeterm' function. */
198
+ #define HAVE_CURSES_RESIZETERM 1
199
+
200
+ /* Define if you have the 'resize_term' function. */
201
+ #define HAVE_CURSES_RESIZE_TERM 1
202
+
203
+ /* Define if you have the 'syncok' function. */
204
+ #define HAVE_CURSES_SYNCOK 1
205
+
206
+ /* Define if you have the 'typeahead' function. */
207
+ #define HAVE_CURSES_TYPEAHEAD 1
208
+
209
+ /* Define if you have the 'use_env' function. */
210
+ #define HAVE_CURSES_USE_ENV 1
211
+
212
+ /* Define if you have the 'wchgat' function. */
213
+ #define HAVE_CURSES_WCHGAT 1
214
+
215
+ /* Define to 1 if you have the declaration of `isfinite', and to 0 if you
216
+ don't. */
217
+ #define HAVE_DECL_ISFINITE 1
218
+
219
+ /* Define to 1 if you have the declaration of `isinf', and to 0 if you don't.
220
+ */
221
+ #define HAVE_DECL_ISINF 1
222
+
223
+ /* Define to 1 if you have the declaration of `isnan', and to 0 if you don't.
224
+ */
225
+ #define HAVE_DECL_ISNAN 1
226
+
227
+ /* Define to 1 if you have the declaration of `RTLD_DEEPBIND', and to 0 if you
228
+ don't. */
229
+ #define HAVE_DECL_RTLD_DEEPBIND 1
230
+
231
+ /* Define to 1 if you have the declaration of `RTLD_GLOBAL', and to 0 if you
232
+ don't. */
233
+ #define HAVE_DECL_RTLD_GLOBAL 1
234
+
235
+ /* Define to 1 if you have the declaration of `RTLD_LAZY', and to 0 if you
236
+ don't. */
237
+ #define HAVE_DECL_RTLD_LAZY 1
238
+
239
+ /* Define to 1 if you have the declaration of `RTLD_LOCAL', and to 0 if you
240
+ don't. */
241
+ #define HAVE_DECL_RTLD_LOCAL 1
242
+
243
+ /* Define to 1 if you have the declaration of `RTLD_MEMBER', and to 0 if you
244
+ don't. */
245
+ #define HAVE_DECL_RTLD_MEMBER 0
246
+
247
+ /* Define to 1 if you have the declaration of `RTLD_NODELETE', and to 0 if you
248
+ don't. */
249
+ #define HAVE_DECL_RTLD_NODELETE 1
250
+
251
+ /* Define to 1 if you have the declaration of `RTLD_NOLOAD', and to 0 if you
252
+ don't. */
253
+ #define HAVE_DECL_RTLD_NOLOAD 1
254
+
255
+ /* Define to 1 if you have the declaration of `RTLD_NOW', and to 0 if you
256
+ don't. */
257
+ #define HAVE_DECL_RTLD_NOW 1
258
+
259
+ /* Define to 1 if you have the declaration of `tzname', and to 0 if you don't.
260
+ */
261
+ /* #undef HAVE_DECL_TZNAME */
262
+
263
+ /* Define to 1 if you have the device macros. */
264
+ #define HAVE_DEVICE_MACROS 1
265
+
266
+ /* Define to 1 if you have the /dev/ptc device file. */
267
+ /* #undef HAVE_DEV_PTC */
268
+
269
+ /* Define to 1 if you have the /dev/ptmx device file. */
270
+ #define HAVE_DEV_PTMX 1
271
+
272
+ /* Define to 1 if you have the <direct.h> header file. */
273
+ /* #undef HAVE_DIRECT_H */
274
+
275
+ /* Define to 1 if the dirent structure has a d_type field */
276
+ #define HAVE_DIRENT_D_TYPE 1
277
+
278
+ /* Define to 1 if you have the <dirent.h> header file, and it defines `DIR'.
279
+ */
280
+ #define HAVE_DIRENT_H 1
281
+
282
+ /* Define if you have the 'dirfd' function or macro. */
283
+ #define HAVE_DIRFD 1
284
+
285
+ /* Define to 1 if you have the <dlfcn.h> header file. */
286
+ #define HAVE_DLFCN_H 1
287
+
288
+ /* Define to 1 if you have the `dlopen' function. */
289
+ #define HAVE_DLOPEN 1
290
+
291
+ /* Define to 1 if you have the `dup2' function. */
292
+ #define HAVE_DUP2 1
293
+
294
+ /* Define to 1 if you have the `dup3' function. */
295
+ #define HAVE_DUP3 1
296
+
297
+ /* Define if you have the '_dyld_shared_cache_contains_path' function. */
298
+ /* #undef HAVE_DYLD_SHARED_CACHE_CONTAINS_PATH */
299
+
300
+ /* Defined when any dynamic module loading is enabled. */
301
+ #define HAVE_DYNAMIC_LOADING 1
302
+
303
+ /* Define to 1 if you have the <endian.h> header file. */
304
+ #define HAVE_ENDIAN_H 1
305
+
306
+ /* Define if you have the 'epoll' functions. */
307
+ #define HAVE_EPOLL 1
308
+
309
+ /* Define if you have the 'epoll_create1' function. */
310
+ #define HAVE_EPOLL_CREATE1 1
311
+
312
+ /* Define to 1 if you have the `erf' function. */
313
+ #define HAVE_ERF 1
314
+
315
+ /* Define to 1 if you have the `erfc' function. */
316
+ #define HAVE_ERFC 1
317
+
318
+ /* Define to 1 if you have the <errno.h> header file. */
319
+ #define HAVE_ERRNO_H 1
320
+
321
+ /* Define if you have the 'eventfd' function. */
322
+ #define HAVE_EVENTFD 1
323
+
324
+ /* Define to 1 if you have the `execv' function. */
325
+ #define HAVE_EXECV 1
326
+
327
+ /* Define to 1 if you have the `explicit_bzero' function. */
328
+ /* #undef HAVE_EXPLICIT_BZERO */
329
+
330
+ /* Define to 1 if you have the `explicit_memset' function. */
331
+ /* #undef HAVE_EXPLICIT_MEMSET */
332
+
333
+ /* Define to 1 if you have the `expm1' function. */
334
+ #define HAVE_EXPM1 1
335
+
336
+ /* Define to 1 if you have the `faccessat' function. */
337
+ #define HAVE_FACCESSAT 1
338
+
339
+ /* Define if you have the 'fchdir' function. */
340
+ #define HAVE_FCHDIR 1
341
+
342
+ /* Define to 1 if you have the `fchmod' function. */
343
+ #define HAVE_FCHMOD 1
344
+
345
+ /* Define to 1 if you have the `fchmodat' function. */
346
+ #define HAVE_FCHMODAT 1
347
+
348
+ /* Define to 1 if you have the `fchown' function. */
349
+ #define HAVE_FCHOWN 1
350
+
351
+ /* Define to 1 if you have the `fchownat' function. */
352
+ #define HAVE_FCHOWNAT 1
353
+
354
+ /* Define to 1 if you have the <fcntl.h> header file. */
355
+ #define HAVE_FCNTL_H 1
356
+
357
+ /* Define if you have the 'fdatasync' function. */
358
+ #define HAVE_FDATASYNC 1
359
+
360
+ /* Define to 1 if you have the `fdopendir' function. */
361
+ #define HAVE_FDOPENDIR 1
362
+
363
+ /* Define to 1 if you have the `fdwalk' function. */
364
+ /* #undef HAVE_FDWALK */
365
+
366
+ /* Define to 1 if you have the `fexecve' function. */
367
+ #define HAVE_FEXECVE 1
368
+
369
+ /* Define to 1 if you have the `finite' function. */
370
+ #define HAVE_FINITE 1
371
+
372
+ /* Define to 1 if you have the `flock' function. */
373
+ #define HAVE_FLOCK 1
374
+
375
+ /* Define to 1 if you have the `fork' function. */
376
+ #define HAVE_FORK 1
377
+
378
+ /* Define to 1 if you have the `forkpty' function. */
379
+ #define HAVE_FORKPTY 1
380
+
381
+ /* Define to 1 if you have the `fpathconf' function. */
382
+ #define HAVE_FPATHCONF 1
383
+
384
+ /* Define to 1 if you have the `fseek64' function. */
385
+ /* #undef HAVE_FSEEK64 */
386
+
387
+ /* Define to 1 if you have the `fseeko' function. */
388
+ #define HAVE_FSEEKO 1
389
+
390
+ /* Define to 1 if you have the `fstatat' function. */
391
+ #define HAVE_FSTATAT 1
392
+
393
+ /* Define to 1 if you have the `fstatvfs' function. */
394
+ #define HAVE_FSTATVFS 1
395
+
396
+ /* Define if you have the 'fsync' function. */
397
+ #define HAVE_FSYNC 1
398
+
399
+ /* Define to 1 if you have the `ftell64' function. */
400
+ /* #undef HAVE_FTELL64 */
401
+
402
+ /* Define to 1 if you have the `ftello' function. */
403
+ #define HAVE_FTELLO 1
404
+
405
+ /* Define to 1 if you have the `ftime' function. */
406
+ #define HAVE_FTIME 1
407
+
408
+ /* Define to 1 if you have the `ftruncate' function. */
409
+ #define HAVE_FTRUNCATE 1
410
+
411
+ /* Define to 1 if you have the `futimens' function. */
412
+ #define HAVE_FUTIMENS 1
413
+
414
+ /* Define to 1 if you have the `futimes' function. */
415
+ #define HAVE_FUTIMES 1
416
+
417
+ /* Define to 1 if you have the `futimesat' function. */
418
+ #define HAVE_FUTIMESAT 1
419
+
420
+ /* Define to 1 if you have the `gai_strerror' function. */
421
+ #define HAVE_GAI_STRERROR 1
422
+
423
+ /* Define to 1 if you have the `gamma' function. */
424
+ #define HAVE_GAMMA 1
425
+
426
+ /* Define if we can use gcc inline assembler to get and set mc68881 fpcr */
427
+ /* #undef HAVE_GCC_ASM_FOR_MC68881 */
428
+
429
+ /* Define if we can use x64 gcc inline assembler */
430
+ #define HAVE_GCC_ASM_FOR_X64 1
431
+
432
+ /* Define if we can use gcc inline assembler to get and set x87 control word
433
+ */
434
+ #define HAVE_GCC_ASM_FOR_X87 1
435
+
436
+ /* Define if your compiler provides __uint128_t */
437
+ #define HAVE_GCC_UINT128_T 1
438
+
439
+ /* Define if you have the getaddrinfo function. */
440
+ #define HAVE_GETADDRINFO 1
441
+
442
+ /* Define this if you have flockfile(), getc_unlocked(), and funlockfile() */
443
+ #define HAVE_GETC_UNLOCKED 1
444
+
445
+ /* Define to 1 if you have the `getentropy' function. */
446
+ /* #undef HAVE_GETENTROPY */
447
+
448
+ /* Define to 1 if you have the `getgrgid_r' function. */
449
+ #define HAVE_GETGRGID_R 1
450
+
451
+ /* Define to 1 if you have the `getgrnam_r' function. */
452
+ #define HAVE_GETGRNAM_R 1
453
+
454
+ /* Define to 1 if you have the `getgrouplist' function. */
455
+ #define HAVE_GETGROUPLIST 1
456
+
457
+ /* Define to 1 if you have the `getgroups' function. */
458
+ #define HAVE_GETGROUPS 1
459
+
460
+ /* Define to 1 if you have the `gethostbyname' function. */
461
+ /* #undef HAVE_GETHOSTBYNAME */
462
+
463
+ /* Define this if you have some version of gethostbyname_r() */
464
+ #define HAVE_GETHOSTBYNAME_R 1
465
+
466
+ /* Define this if you have the 3-arg version of gethostbyname_r(). */
467
+ /* #undef HAVE_GETHOSTBYNAME_R_3_ARG */
468
+
469
+ /* Define this if you have the 5-arg version of gethostbyname_r(). */
470
+ /* #undef HAVE_GETHOSTBYNAME_R_5_ARG */
471
+
472
+ /* Define this if you have the 6-arg version of gethostbyname_r(). */
473
+ #define HAVE_GETHOSTBYNAME_R_6_ARG 1
474
+
475
+ /* Define to 1 if you have the `getitimer' function. */
476
+ #define HAVE_GETITIMER 1
477
+
478
+ /* Define to 1 if you have the `getloadavg' function. */
479
+ #define HAVE_GETLOADAVG 1
480
+
481
+ /* Define to 1 if you have the `getlogin' function. */
482
+ #define HAVE_GETLOGIN 1
483
+
484
+ /* Define to 1 if you have the `getnameinfo' function. */
485
+ #define HAVE_GETNAMEINFO 1
486
+
487
+ /* Define if you have the 'getpagesize' function. */
488
+ #define HAVE_GETPAGESIZE 1
489
+
490
+ /* Define to 1 if you have the `getpeername' function. */
491
+ #define HAVE_GETPEERNAME 1
492
+
493
+ /* Define to 1 if you have the `getpgid' function. */
494
+ #define HAVE_GETPGID 1
495
+
496
+ /* Define to 1 if you have the `getpgrp' function. */
497
+ #define HAVE_GETPGRP 1
498
+
499
+ /* Define to 1 if you have the `getpid' function. */
500
+ #define HAVE_GETPID 1
501
+
502
+ /* Define to 1 if you have the `getpriority' function. */
503
+ #define HAVE_GETPRIORITY 1
504
+
505
+ /* Define to 1 if you have the `getpwent' function. */
506
+ #define HAVE_GETPWENT 1
507
+
508
+ /* Define to 1 if you have the `getpwnam_r' function. */
509
+ #define HAVE_GETPWNAM_R 1
510
+
511
+ /* Define to 1 if you have the `getpwuid_r' function. */
512
+ #define HAVE_GETPWUID_R 1
513
+
514
+ /* Define to 1 if the getrandom() function is available */
515
+ /* #undef HAVE_GETRANDOM */
516
+
517
+ /* Define to 1 if the Linux getrandom() syscall is available */
518
+ #define HAVE_GETRANDOM_SYSCALL 1
519
+
520
+ /* Define to 1 if you have the `getresgid' function. */
521
+ #define HAVE_GETRESGID 1
522
+
523
+ /* Define to 1 if you have the `getresuid' function. */
524
+ #define HAVE_GETRESUID 1
525
+
526
+ /* Define to 1 if you have the `getsid' function. */
527
+ #define HAVE_GETSID 1
528
+
529
+ /* Define to 1 if you have the `getspent' function. */
530
+ #define HAVE_GETSPENT 1
531
+
532
+ /* Define to 1 if you have the `getspnam' function. */
533
+ #define HAVE_GETSPNAM 1
534
+
535
+ /* Define to 1 if you have the `getwd' function. */
536
+ #define HAVE_GETWD 1
537
+
538
+ /* Define if glibc has incorrect _FORTIFY_SOURCE wrappers for memmove and
539
+ bcopy. */
540
+ /* #undef HAVE_GLIBC_MEMMOVE_BUG */
541
+
542
+ /* Define to 1 if you have the <grp.h> header file. */
543
+ #define HAVE_GRP_H 1
544
+
545
+ /* Define if you have the 'hstrerror' function. */
546
+ #define HAVE_HSTRERROR 1
547
+
548
+ /* Define this if you have le64toh() */
549
+ #define HAVE_HTOLE64 1
550
+
551
+ /* Define to 1 if you have the `hypot' function. */
552
+ #define HAVE_HYPOT 1
553
+
554
+ /* Define to 1 if you have the <ieeefp.h> header file. */
555
+ /* #undef HAVE_IEEEFP_H */
556
+
557
+ /* Define to 1 if you have the `if_nameindex' function. */
558
+ #define HAVE_IF_NAMEINDEX 1
559
+
560
+ /* Define if you have the 'inet_aton' function. */
561
+ #define HAVE_INET_ATON 1
562
+
563
+ /* Define if you have the 'inet_pton' function. */
564
+ #define HAVE_INET_PTON 1
565
+
566
+ /* Define to 1 if you have the `initgroups' function. */
567
+ #define HAVE_INITGROUPS 1
568
+
569
+ /* Define to 1 if you have the <inttypes.h> header file. */
570
+ #define HAVE_INTTYPES_H 1
571
+
572
+ /* Define to 1 if you have the <io.h> header file. */
573
+ /* #undef HAVE_IO_H */
574
+
575
+ /* Define if gcc has the ipa-pure-const bug. */
576
+ /* #undef HAVE_IPA_PURE_CONST_BUG */
577
+
578
+ /* Define to 1 if you have the `kill' function. */
579
+ #define HAVE_KILL 1
580
+
581
+ /* Define to 1 if you have the `killpg' function. */
582
+ #define HAVE_KILLPG 1
583
+
584
+ /* Define if you have the 'kqueue' functions. */
585
+ /* #undef HAVE_KQUEUE */
586
+
587
+ /* Define to 1 if you have the <langinfo.h> header file. */
588
+ #define HAVE_LANGINFO_H 1
589
+
590
+ /* Defined to enable large file support when an off_t is bigger than a long
591
+ and long long is at least as big as an off_t. You may need to add some
592
+ flags for configuration and compilation to enable this mode. (For Solaris
593
+ and Linux, the necessary defines are already defined.) */
594
+ /* #undef HAVE_LARGEFILE_SUPPORT */
595
+
596
+ /* Define to 1 if you have the 'lchflags' function. */
597
+ /* #undef HAVE_LCHFLAGS */
598
+
599
+ /* Define to 1 if you have the `lchmod' function. */
600
+ /* #undef HAVE_LCHMOD */
601
+
602
+ /* Define to 1 if you have the `lchown' function. */
603
+ #define HAVE_LCHOWN 1
604
+
605
+ /* Define to 1 if you have the `lgamma' function. */
606
+ #define HAVE_LGAMMA 1
607
+
608
+ /* Define to 1 if you have the `dl' library (-ldl). */
609
+ #define HAVE_LIBDL 1
610
+
611
+ /* Define to 1 if you have the `dld' library (-ldld). */
612
+ /* #undef HAVE_LIBDLD */
613
+
614
+ /* Define to 1 if you have the `ieee' library (-lieee). */
615
+ /* #undef HAVE_LIBIEEE */
616
+
617
+ /* Define to 1 if you have the <libintl.h> header file. */
618
+ #define HAVE_LIBINTL_H 1
619
+
620
+ /* Define to build the readline module. */
621
+ #define HAVE_LIBREADLINE 1
622
+
623
+ /* Define to 1 if you have the `resolv' library (-lresolv). */
624
+ /* #undef HAVE_LIBRESOLV */
625
+
626
+ /* Define to 1 if you have the `sendfile' library (-lsendfile). */
627
+ /* #undef HAVE_LIBSENDFILE */
628
+
629
+ /* Define to 1 if you have the <libutil.h> header file. */
630
+ /* #undef HAVE_LIBUTIL_H */
631
+
632
+ /* Define to 1 if you have the `uuid' library (-luuid). */
633
+ #define HAVE_LIBUUID 1
634
+
635
+ /* Define if you have the 'link' function. */
636
+ #define HAVE_LINK 1
637
+
638
+ /* Define to 1 if you have the `linkat' function. */
639
+ #define HAVE_LINKAT 1
640
+
641
+ /* Define to 1 if you have the <linux/auxvec.h> header file. */
642
+ #define HAVE_LINUX_AUXVEC_H 1
643
+
644
+ /* Define to 1 if you have the <linux/can/bcm.h> header file. */
645
+ #define HAVE_LINUX_CAN_BCM_H 1
646
+
647
+ /* Define to 1 if you have the <linux/can.h> header file. */
648
+ #define HAVE_LINUX_CAN_H 1
649
+
650
+ /* Define to 1 if you have the <linux/can/j1939.h> header file. */
651
+ /* #undef HAVE_LINUX_CAN_J1939_H */
652
+
653
+ /* Define if compiling using Linux 3.6 or later. */
654
+ #define HAVE_LINUX_CAN_RAW_FD_FRAMES 1
655
+
656
+ /* Define to 1 if you have the <linux/can/raw.h> header file. */
657
+ #define HAVE_LINUX_CAN_RAW_H 1
658
+
659
+ /* Define if compiling using Linux 4.1 or later. */
660
+ #define HAVE_LINUX_CAN_RAW_JOIN_FILTERS 1
661
+
662
+ /* Define to 1 if you have the <linux/memfd.h> header file. */
663
+ #define HAVE_LINUX_MEMFD_H 1
664
+
665
+ /* Define to 1 if you have the <linux/netlink.h> header file. */
666
+ #define HAVE_LINUX_NETLINK_H 1
667
+
668
+ /* Define to 1 if you have the <linux/qrtr.h> header file. */
669
+ /* #undef HAVE_LINUX_QRTR_H */
670
+
671
+ /* Define to 1 if you have the <linux/random.h> header file. */
672
+ #define HAVE_LINUX_RANDOM_H 1
673
+
674
+ /* Define to 1 if you have the <linux/tipc.h> header file. */
675
+ #define HAVE_LINUX_TIPC_H 1
676
+
677
+ /* Define to 1 if you have the <linux/vm_sockets.h> header file. */
678
+ #define HAVE_LINUX_VM_SOCKETS_H 1
679
+
680
+ /* Define to 1 if you have the <linux/wait.h> header file. */
681
+ #define HAVE_LINUX_WAIT_H 1
682
+
683
+ /* Define to 1 if you have the `lockf' function. */
684
+ #define HAVE_LOCKF 1
685
+
686
+ /* Define to 1 if you have the `log1p' function. */
687
+ #define HAVE_LOG1P 1
688
+
689
+ /* Define to 1 if you have the `log2' function. */
690
+ #define HAVE_LOG2 1
691
+
692
+ /* Define to 1 if the system has the type `long double'. */
693
+ #define HAVE_LONG_DOUBLE 1
694
+
695
+ /* Define to 1 if you have the `lstat' function. */
696
+ #define HAVE_LSTAT 1
697
+
698
+ /* Define to 1 if you have the `lutimes' function. */
699
+ #define HAVE_LUTIMES 1
700
+
701
+ /* Define to 1 if you have the `madvise' function. */
702
+ #define HAVE_MADVISE 1
703
+
704
+ /* Define this if you have the makedev macro. */
705
+ #define HAVE_MAKEDEV 1
706
+
707
+ /* Define to 1 if you have the `mbrtowc' function. */
708
+ #define HAVE_MBRTOWC 1
709
+
710
+ /* Define if you have the 'memfd_create' function. */
711
+ /* #undef HAVE_MEMFD_CREATE */
712
+
713
+ /* Define to 1 if you have the <memory.h> header file. */
714
+ #define HAVE_MEMORY_H 1
715
+
716
+ /* Define to 1 if you have the `memrchr' function. */
717
+ #define HAVE_MEMRCHR 1
718
+
719
+ /* Define to 1 if you have the `mkdirat' function. */
720
+ #define HAVE_MKDIRAT 1
721
+
722
+ /* Define to 1 if you have the `mkfifo' function. */
723
+ #define HAVE_MKFIFO 1
724
+
725
+ /* Define to 1 if you have the `mkfifoat' function. */
726
+ #define HAVE_MKFIFOAT 1
727
+
728
+ /* Define to 1 if you have the `mknod' function. */
729
+ #define HAVE_MKNOD 1
730
+
731
+ /* Define to 1 if you have the `mknodat' function. */
732
+ #define HAVE_MKNODAT 1
733
+
734
+ /* Define to 1 if you have the `mktime' function. */
735
+ #define HAVE_MKTIME 1
736
+
737
+ /* Define to 1 if you have the `mmap' function. */
738
+ #define HAVE_MMAP 1
739
+
740
+ /* Define to 1 if you have the `mremap' function. */
741
+ #define HAVE_MREMAP 1
742
+
743
+ /* Define to 1 if you have the <ncurses.h> header file. */
744
+ #define HAVE_NCURSES_H 1
745
+
746
+ /* Define to 1 if you have the <ndir.h> header file, and it defines `DIR'. */
747
+ /* #undef HAVE_NDIR_H */
748
+
749
+ /* Define to 1 if you have the <netpacket/packet.h> header file. */
750
+ #define HAVE_NETPACKET_PACKET_H 1
751
+
752
+ /* Define to 1 if you have the <net/if.h> header file. */
753
+ #define HAVE_NET_IF_H 1
754
+
755
+ /* Define to 1 if you have the `nice' function. */
756
+ #define HAVE_NICE 1
757
+
758
+ /* Define if the internal form of wchar_t in non-Unicode locales is not
759
+ Unicode. */
760
+ /* #undef HAVE_NON_UNICODE_WCHAR_T_REPRESENTATION */
761
+
762
+ /* Define to 1 if you have the `openat' function. */
763
+ #define HAVE_OPENAT 1
764
+
765
+ /* Define to 1 if you have the `openpty' function. */
766
+ #define HAVE_OPENPTY 1
767
+
768
+ /* Define to 1 if you have the `pathconf' function. */
769
+ #define HAVE_PATHCONF 1
770
+
771
+ /* Define to 1 if you have the `pause' function. */
772
+ #define HAVE_PAUSE 1
773
+
774
+ /* Define to 1 if you have the `pipe2' function. */
775
+ #define HAVE_PIPE2 1
776
+
777
+ /* Define to 1 if you have the `plock' function. */
778
+ /* #undef HAVE_PLOCK */
779
+
780
+ /* Define to 1 if you have the `poll' function. */
781
+ #define HAVE_POLL 1
782
+
783
+ /* Define to 1 if you have the <poll.h> header file. */
784
+ #define HAVE_POLL_H 1
785
+
786
+ /* Define to 1 if you have the `posix_fadvise' function. */
787
+ #define HAVE_POSIX_FADVISE 1
788
+
789
+ /* Define to 1 if you have the `posix_fallocate' function. */
790
+ #define HAVE_POSIX_FALLOCATE 1
791
+
792
+ /* Define to 1 if you have the `posix_spawn' function. */
793
+ #define HAVE_POSIX_SPAWN 1
794
+
795
+ /* Define to 1 if you have the `posix_spawnp' function. */
796
+ #define HAVE_POSIX_SPAWNP 1
797
+
798
+ /* Define to 1 if you have the `pread' function. */
799
+ #define HAVE_PREAD 1
800
+
801
+ /* Define to 1 if you have the `preadv' function. */
802
+ #define HAVE_PREADV 1
803
+
804
+ /* Define to 1 if you have the `preadv2' function. */
805
+ /* #undef HAVE_PREADV2 */
806
+
807
+ /* Define if you have the 'prlimit' functions. */
808
+ #define HAVE_PRLIMIT 1
809
+
810
+ /* Define to 1 if you have the <process.h> header file. */
811
+ /* #undef HAVE_PROCESS_H */
812
+
813
+ /* Define if your compiler supports function prototype */
814
+ #define HAVE_PROTOTYPES 1
815
+
816
+ /* Define to 1 if you have the `pthread_condattr_setclock' function. */
817
+ #define HAVE_PTHREAD_CONDATTR_SETCLOCK 1
818
+
819
+ /* Defined for Solaris 2.6 bug in pthread header. */
820
+ /* #undef HAVE_PTHREAD_DESTRUCTOR */
821
+
822
+ /* Define to 1 if you have the `pthread_getcpuclockid' function. */
823
+ #define HAVE_PTHREAD_GETCPUCLOCKID 1
824
+
825
+ /* Define to 1 if you have the <pthread.h> header file. */
826
+ #define HAVE_PTHREAD_H 1
827
+
828
+ /* Define to 1 if you have the `pthread_init' function. */
829
+ /* #undef HAVE_PTHREAD_INIT */
830
+
831
+ /* Define to 1 if you have the `pthread_kill' function. */
832
+ #define HAVE_PTHREAD_KILL 1
833
+
834
+ /* Define to 1 if you have the `pthread_sigmask' function. */
835
+ #define HAVE_PTHREAD_SIGMASK 1
836
+
837
+ /* Define to 1 if you have the <pty.h> header file. */
838
+ #define HAVE_PTY_H 1
839
+
840
+ /* Define to 1 if you have the `pwrite' function. */
841
+ #define HAVE_PWRITE 1
842
+
843
+ /* Define to 1 if you have the `pwritev' function. */
844
+ #define HAVE_PWRITEV 1
845
+
846
+ /* Define to 1 if you have the `pwritev2' function. */
847
+ /* #undef HAVE_PWRITEV2 */
848
+
849
+ /* Define to 1 if you have the `readlink' function. */
850
+ #define HAVE_READLINK 1
851
+
852
+ /* Define to 1 if you have the `readlinkat' function. */
853
+ #define HAVE_READLINKAT 1
854
+
855
+ /* Define to 1 if you have the `readv' function. */
856
+ #define HAVE_READV 1
857
+
858
+ /* Define to 1 if you have the `realpath' function. */
859
+ #define HAVE_REALPATH 1
860
+
861
+ /* Define to 1 if you have the `renameat' function. */
862
+ #define HAVE_RENAMEAT 1
863
+
864
+ /* Define if readline supports append_history */
865
+ #define HAVE_RL_APPEND_HISTORY 1
866
+
867
+ /* Define if you can turn off readline's signal handling. */
868
+ #define HAVE_RL_CATCH_SIGNAL 1
869
+
870
+ /* Define if you have readline 2.2 */
871
+ #define HAVE_RL_COMPLETION_APPEND_CHARACTER 1
872
+
873
+ /* Define if you have readline 4.0 */
874
+ #define HAVE_RL_COMPLETION_DISPLAY_MATCHES_HOOK 1
875
+
876
+ /* Define if you have readline 4.2 */
877
+ #define HAVE_RL_COMPLETION_MATCHES 1
878
+
879
+ /* Define if you have rl_completion_suppress_append */
880
+ #define HAVE_RL_COMPLETION_SUPPRESS_APPEND 1
881
+
882
+ /* Define if you have readline 4.0 */
883
+ #define HAVE_RL_PRE_INPUT_HOOK 1
884
+
885
+ /* Define if you have readline 4.0 */
886
+ #define HAVE_RL_RESIZE_TERMINAL 1
887
+
888
+ /* Define to 1 if you have the `round' function. */
889
+ #define HAVE_ROUND 1
890
+
891
+ /* Define to 1 if you have the `rtpSpawn' function. */
892
+ /* #undef HAVE_RTPSPAWN */
893
+
894
+ /* Define to 1 if you have the `sched_get_priority_max' function. */
895
+ #define HAVE_SCHED_GET_PRIORITY_MAX 1
896
+
897
+ /* Define to 1 if you have the <sched.h> header file. */
898
+ #define HAVE_SCHED_H 1
899
+
900
+ /* Define to 1 if you have the `sched_rr_get_interval' function. */
901
+ #define HAVE_SCHED_RR_GET_INTERVAL 1
902
+
903
+ /* Define to 1 if you have the `sched_setaffinity' function. */
904
+ #define HAVE_SCHED_SETAFFINITY 1
905
+
906
+ /* Define to 1 if you have the `sched_setparam' function. */
907
+ #define HAVE_SCHED_SETPARAM 1
908
+
909
+ /* Define to 1 if you have the `sched_setscheduler' function. */
910
+ #define HAVE_SCHED_SETSCHEDULER 1
911
+
912
+ /* Define to 1 if you have the `sem_clockwait' function. */
913
+ /* #undef HAVE_SEM_CLOCKWAIT */
914
+
915
+ /* Define to 1 if you have the `sem_getvalue' function. */
916
+ #define HAVE_SEM_GETVALUE 1
917
+
918
+ /* Define to 1 if you have the `sem_open' function. */
919
+ #define HAVE_SEM_OPEN 1
920
+
921
+ /* Define to 1 if you have the `sem_timedwait' function. */
922
+ #define HAVE_SEM_TIMEDWAIT 1
923
+
924
+ /* Define to 1 if you have the `sem_unlink' function. */
925
+ #define HAVE_SEM_UNLINK 1
926
+
927
+ /* Define to 1 if you have the `sendfile' function. */
928
+ #define HAVE_SENDFILE 1
929
+
930
+ /* Define to 1 if you have the `setegid' function. */
931
+ #define HAVE_SETEGID 1
932
+
933
+ /* Define to 1 if you have the `seteuid' function. */
934
+ #define HAVE_SETEUID 1
935
+
936
+ /* Define to 1 if you have the `setgid' function. */
937
+ #define HAVE_SETGID 1
938
+
939
+ /* Define if you have the 'setgroups' function. */
940
+ #define HAVE_SETGROUPS 1
941
+
942
+ /* Define to 1 if you have the `sethostname' function. */
943
+ #define HAVE_SETHOSTNAME 1
944
+
945
+ /* Define to 1 if you have the `setitimer' function. */
946
+ #define HAVE_SETITIMER 1
947
+
948
+ /* Define to 1 if you have the `setlocale' function. */
949
+ #define HAVE_SETLOCALE 1
950
+
951
+ /* Define to 1 if you have the `setpgid' function. */
952
+ #define HAVE_SETPGID 1
953
+
954
+ /* Define to 1 if you have the `setpgrp' function. */
955
+ #define HAVE_SETPGRP 1
956
+
957
+ /* Define to 1 if you have the `setpriority' function. */
958
+ #define HAVE_SETPRIORITY 1
959
+
960
+ /* Define to 1 if you have the `setregid' function. */
961
+ #define HAVE_SETREGID 1
962
+
963
+ /* Define to 1 if you have the `setresgid' function. */
964
+ #define HAVE_SETRESGID 1
965
+
966
+ /* Define to 1 if you have the `setresuid' function. */
967
+ #define HAVE_SETRESUID 1
968
+
969
+ /* Define to 1 if you have the `setreuid' function. */
970
+ #define HAVE_SETREUID 1
971
+
972
+ /* Define to 1 if you have the `setsid' function. */
973
+ #define HAVE_SETSID 1
974
+
975
+ /* Define to 1 if you have the `setuid' function. */
976
+ #define HAVE_SETUID 1
977
+
978
+ /* Define to 1 if you have the `setvbuf' function. */
979
+ #define HAVE_SETVBUF 1
980
+
981
+ /* Define to 1 if you have the <shadow.h> header file. */
982
+ #define HAVE_SHADOW_H 1
983
+
984
+ /* Define to 1 if you have the `shm_open' function. */
985
+ #define HAVE_SHM_OPEN 1
986
+
987
+ /* Define to 1 if you have the `shm_unlink' function. */
988
+ #define HAVE_SHM_UNLINK 1
989
+
990
+ /* Define to 1 if you have the `sigaction' function. */
991
+ #define HAVE_SIGACTION 1
992
+
993
+ /* Define to 1 if you have the `sigaltstack' function. */
994
+ #define HAVE_SIGALTSTACK 1
995
+
996
+ /* Define to 1 if you have the `sigfillset' function. */
997
+ #define HAVE_SIGFILLSET 1
998
+
999
+ /* Define to 1 if `si_band' is a member of `siginfo_t'. */
1000
+ #define HAVE_SIGINFO_T_SI_BAND 1
1001
+
1002
+ /* Define to 1 if you have the `siginterrupt' function. */
1003
+ #define HAVE_SIGINTERRUPT 1
1004
+
1005
+ /* Define to 1 if you have the <signal.h> header file. */
1006
+ #define HAVE_SIGNAL_H 1
1007
+
1008
+ /* Define to 1 if you have the `sigpending' function. */
1009
+ #define HAVE_SIGPENDING 1
1010
+
1011
+ /* Define to 1 if you have the `sigrelse' function. */
1012
+ #define HAVE_SIGRELSE 1
1013
+
1014
+ /* Define to 1 if you have the `sigtimedwait' function. */
1015
+ #define HAVE_SIGTIMEDWAIT 1
1016
+
1017
+ /* Define to 1 if you have the `sigwait' function. */
1018
+ #define HAVE_SIGWAIT 1
1019
+
1020
+ /* Define to 1 if you have the `sigwaitinfo' function. */
1021
+ #define HAVE_SIGWAITINFO 1
1022
+
1023
+ /* Define to 1 if you have the `snprintf' function. */
1024
+ #define HAVE_SNPRINTF 1
1025
+
1026
+ /* struct sockaddr_alg (linux/if_alg.h) */
1027
+ #define HAVE_SOCKADDR_ALG 1
1028
+
1029
+ /* Define if sockaddr has sa_len member */
1030
+ /* #undef HAVE_SOCKADDR_SA_LEN */
1031
+
1032
+ /* struct sockaddr_storage (sys/socket.h) */
1033
+ #define HAVE_SOCKADDR_STORAGE 1
1034
+
1035
+ /* Define if you have the 'socketpair' function. */
1036
+ #define HAVE_SOCKETPAIR 1
1037
+
1038
+ /* Define to 1 if you have the <spawn.h> header file. */
1039
+ #define HAVE_SPAWN_H 1
1040
+
1041
+ /* Define to 1 if you have the `splice' function. */
1042
+ #define HAVE_SPLICE 1
1043
+
1044
+ /* Define if your compiler provides ssize_t */
1045
+ #define HAVE_SSIZE_T 1
1046
+
1047
+ /* Define to 1 if you have the `statvfs' function. */
1048
+ #define HAVE_STATVFS 1
1049
+
1050
+ /* Define if you have struct stat.st_mtim.tv_nsec */
1051
+ #define HAVE_STAT_TV_NSEC 1
1052
+
1053
+ /* Define if you have struct stat.st_mtimensec */
1054
+ /* #undef HAVE_STAT_TV_NSEC2 */
1055
+
1056
+ /* Define if your compiler supports variable length function prototypes (e.g.
1057
+ void fprintf(FILE *, char *, ...);) *and* <stdarg.h> */
1058
+ #define HAVE_STDARG_PROTOTYPES 1
1059
+
1060
+ /* Define to 1 if you have the <stdint.h> header file. */
1061
+ #define HAVE_STDINT_H 1
1062
+
1063
+ /* Define to 1 if you have the <stdlib.h> header file. */
1064
+ #define HAVE_STDLIB_H 1
1065
+
1066
+ /* Has stdatomic.h with atomic_int and atomic_uintptr_t */
1067
+ #define HAVE_STD_ATOMIC 1
1068
+
1069
+ /* Define to 1 if you have the `strftime' function. */
1070
+ #define HAVE_STRFTIME 1
1071
+
1072
+ /* Define to 1 if you have the <strings.h> header file. */
1073
+ #define HAVE_STRINGS_H 1
1074
+
1075
+ /* Define to 1 if you have the <string.h> header file. */
1076
+ #define HAVE_STRING_H 1
1077
+
1078
+ /* Define to 1 if you have the `strlcpy' function. */
1079
+ /* #undef HAVE_STRLCPY */
1080
+
1081
+ /* Define to 1 if you have the <stropts.h> header file. */
1082
+ /* #undef HAVE_STROPTS_H */
1083
+
1084
+ /* Define to 1 if you have the `strsignal' function. */
1085
+ #define HAVE_STRSIGNAL 1
1086
+
1087
+ /* Define to 1 if `pw_gecos' is a member of `struct passwd'. */
1088
+ #define HAVE_STRUCT_PASSWD_PW_GECOS 1
1089
+
1090
+ /* Define to 1 if `pw_passwd' is a member of `struct passwd'. */
1091
+ #define HAVE_STRUCT_PASSWD_PW_PASSWD 1
1092
+
1093
+ /* Define to 1 if `st_birthtime' is a member of `struct stat'. */
1094
+ /* #undef HAVE_STRUCT_STAT_ST_BIRTHTIME */
1095
+
1096
+ /* Define to 1 if `st_blksize' is a member of `struct stat'. */
1097
+ #define HAVE_STRUCT_STAT_ST_BLKSIZE 1
1098
+
1099
+ /* Define to 1 if `st_blocks' is a member of `struct stat'. */
1100
+ #define HAVE_STRUCT_STAT_ST_BLOCKS 1
1101
+
1102
+ /* Define to 1 if `st_flags' is a member of `struct stat'. */
1103
+ /* #undef HAVE_STRUCT_STAT_ST_FLAGS */
1104
+
1105
+ /* Define to 1 if `st_gen' is a member of `struct stat'. */
1106
+ /* #undef HAVE_STRUCT_STAT_ST_GEN */
1107
+
1108
+ /* Define to 1 if `st_rdev' is a member of `struct stat'. */
1109
+ #define HAVE_STRUCT_STAT_ST_RDEV 1
1110
+
1111
+ /* Define to 1 if `tm_zone' is a member of `struct tm'. */
1112
+ #define HAVE_STRUCT_TM_TM_ZONE 1
1113
+
1114
+ /* Define if you have the 'symlink' function. */
1115
+ #define HAVE_SYMLINK 1
1116
+
1117
+ /* Define to 1 if you have the `symlinkat' function. */
1118
+ #define HAVE_SYMLINKAT 1
1119
+
1120
+ /* Define to 1 if you have the `sync' function. */
1121
+ #define HAVE_SYNC 1
1122
+
1123
+ /* Define to 1 if you have the `sysconf' function. */
1124
+ #define HAVE_SYSCONF 1
1125
+
1126
+ /* Define to 1 if you have the <sysexits.h> header file. */
1127
+ #define HAVE_SYSEXITS_H 1
1128
+
1129
+ /* Define to 1 if you have the <sys/audioio.h> header file. */
1130
+ /* #undef HAVE_SYS_AUDIOIO_H */
1131
+
1132
+ /* Define to 1 if you have the <sys/auxv.h> header file. */
1133
+ #define HAVE_SYS_AUXV_H 1
1134
+
1135
+ /* Define to 1 if you have the <sys/bsdtty.h> header file. */
1136
+ /* #undef HAVE_SYS_BSDTTY_H */
1137
+
1138
+ /* Define to 1 if you have the <sys/devpoll.h> header file. */
1139
+ /* #undef HAVE_SYS_DEVPOLL_H */
1140
+
1141
+ /* Define to 1 if you have the <sys/dir.h> header file, and it defines `DIR'.
1142
+ */
1143
+ /* #undef HAVE_SYS_DIR_H */
1144
+
1145
+ /* Define to 1 if you have the <sys/endian.h> header file. */
1146
+ /* #undef HAVE_SYS_ENDIAN_H */
1147
+
1148
+ /* Define to 1 if you have the <sys/epoll.h> header file. */
1149
+ #define HAVE_SYS_EPOLL_H 1
1150
+
1151
+ /* Define to 1 if you have the <sys/eventfd.h> header file. */
1152
+ #define HAVE_SYS_EVENTFD_H 1
1153
+
1154
+ /* Define to 1 if you have the <sys/event.h> header file. */
1155
+ /* #undef HAVE_SYS_EVENT_H */
1156
+
1157
+ /* Define to 1 if you have the <sys/file.h> header file. */
1158
+ #define HAVE_SYS_FILE_H 1
1159
+
1160
+ /* Define to 1 if you have the <sys/ioctl.h> header file. */
1161
+ #define HAVE_SYS_IOCTL_H 1
1162
+
1163
+ /* Define to 1 if you have the <sys/kern_control.h> header file. */
1164
+ /* #undef HAVE_SYS_KERN_CONTROL_H */
1165
+
1166
+ /* Define to 1 if you have the <sys/loadavg.h> header file. */
1167
+ /* #undef HAVE_SYS_LOADAVG_H */
1168
+
1169
+ /* Define to 1 if you have the <sys/lock.h> header file. */
1170
+ /* #undef HAVE_SYS_LOCK_H */
1171
+
1172
+ /* Define to 1 if you have the <sys/memfd.h> header file. */
1173
+ /* #undef HAVE_SYS_MEMFD_H */
1174
+
1175
+ /* Define to 1 if you have the <sys/mkdev.h> header file. */
1176
+ /* #undef HAVE_SYS_MKDEV_H */
1177
+
1178
+ /* Define to 1 if you have the <sys/mman.h> header file. */
1179
+ #define HAVE_SYS_MMAN_H 1
1180
+
1181
+ /* Define to 1 if you have the <sys/modem.h> header file. */
1182
+ /* #undef HAVE_SYS_MODEM_H */
1183
+
1184
+ /* Define to 1 if you have the <sys/ndir.h> header file, and it defines `DIR'.
1185
+ */
1186
+ /* #undef HAVE_SYS_NDIR_H */
1187
+
1188
+ /* Define to 1 if you have the <sys/param.h> header file. */
1189
+ #define HAVE_SYS_PARAM_H 1
1190
+
1191
+ /* Define to 1 if you have the <sys/poll.h> header file. */
1192
+ #define HAVE_SYS_POLL_H 1
1193
+
1194
+ /* Define to 1 if you have the <sys/random.h> header file. */
1195
+ /* #undef HAVE_SYS_RANDOM_H */
1196
+
1197
+ /* Define to 1 if you have the <sys/resource.h> header file. */
1198
+ #define HAVE_SYS_RESOURCE_H 1
1199
+
1200
+ /* Define to 1 if you have the <sys/select.h> header file. */
1201
+ #define HAVE_SYS_SELECT_H 1
1202
+
1203
+ /* Define to 1 if you have the <sys/sendfile.h> header file. */
1204
+ #define HAVE_SYS_SENDFILE_H 1
1205
+
1206
+ /* Define to 1 if you have the <sys/socket.h> header file. */
1207
+ #define HAVE_SYS_SOCKET_H 1
1208
+
1209
+ /* Define to 1 if you have the <sys/statvfs.h> header file. */
1210
+ #define HAVE_SYS_STATVFS_H 1
1211
+
1212
+ /* Define to 1 if you have the <sys/stat.h> header file. */
1213
+ #define HAVE_SYS_STAT_H 1
1214
+
1215
+ /* Define to 1 if you have the <sys/syscall.h> header file. */
1216
+ #define HAVE_SYS_SYSCALL_H 1
1217
+
1218
+ /* Define to 1 if you have the <sys/sysmacros.h> header file. */
1219
+ #define HAVE_SYS_SYSMACROS_H 1
1220
+
1221
+ /* Define to 1 if you have the <sys/sys_domain.h> header file. */
1222
+ /* #undef HAVE_SYS_SYS_DOMAIN_H */
1223
+
1224
+ /* Define to 1 if you have the <sys/termio.h> header file. */
1225
+ /* #undef HAVE_SYS_TERMIO_H */
1226
+
1227
+ /* Define to 1 if you have the <sys/times.h> header file. */
1228
+ #define HAVE_SYS_TIMES_H 1
1229
+
1230
+ /* Define to 1 if you have the <sys/time.h> header file. */
1231
+ #define HAVE_SYS_TIME_H 1
1232
+
1233
+ /* Define to 1 if you have the <sys/types.h> header file. */
1234
+ #define HAVE_SYS_TYPES_H 1
1235
+
1236
+ /* Define to 1 if you have the <sys/uio.h> header file. */
1237
+ #define HAVE_SYS_UIO_H 1
1238
+
1239
+ /* Define to 1 if you have the <sys/un.h> header file. */
1240
+ #define HAVE_SYS_UN_H 1
1241
+
1242
+ /* Define to 1 if you have the <sys/utsname.h> header file. */
1243
+ #define HAVE_SYS_UTSNAME_H 1
1244
+
1245
+ /* Define to 1 if you have the <sys/wait.h> header file. */
1246
+ #define HAVE_SYS_WAIT_H 1
1247
+
1248
+ /* Define to 1 if you have the <sys/xattr.h> header file. */
1249
+ #define HAVE_SYS_XATTR_H 1
1250
+
1251
+ /* Define to 1 if you have the `tcgetpgrp' function. */
1252
+ #define HAVE_TCGETPGRP 1
1253
+
1254
+ /* Define to 1 if you have the `tcsetpgrp' function. */
1255
+ #define HAVE_TCSETPGRP 1
1256
+
1257
+ /* Define to 1 if you have the `tempnam' function. */
1258
+ #define HAVE_TEMPNAM 1
1259
+
1260
+ /* Define to 1 if you have the <termios.h> header file. */
1261
+ #define HAVE_TERMIOS_H 1
1262
+
1263
+ /* Define to 1 if you have the <term.h> header file. */
1264
+ #define HAVE_TERM_H 1
1265
+
1266
+ /* Define to 1 if you have the `tgamma' function. */
1267
+ #define HAVE_TGAMMA 1
1268
+
1269
+ /* Define to 1 if you have the `timegm' function. */
1270
+ #define HAVE_TIMEGM 1
1271
+
1272
+ /* Define to 1 if you have the `times' function. */
1273
+ #define HAVE_TIMES 1
1274
+
1275
+ /* Define to 1 if you have the `tmpfile' function. */
1276
+ #define HAVE_TMPFILE 1
1277
+
1278
+ /* Define to 1 if you have the `tmpnam' function. */
1279
+ #define HAVE_TMPNAM 1
1280
+
1281
+ /* Define to 1 if you have the `tmpnam_r' function. */
1282
+ #define HAVE_TMPNAM_R 1
1283
+
1284
+ /* Define to 1 if your `struct tm' has `tm_zone'. Deprecated, use
1285
+ `HAVE_STRUCT_TM_TM_ZONE' instead. */
1286
+ #define HAVE_TM_ZONE 1
1287
+
1288
+ /* Define to 1 if you have the `truncate' function. */
1289
+ #define HAVE_TRUNCATE 1
1290
+
1291
+ /* Define to 1 if you don't have `tm_zone' but do have the external array
1292
+ `tzname'. */
1293
+ /* #undef HAVE_TZNAME */
1294
+
1295
+ /* Define this if you have tcl and TCL_UTF_MAX==6 */
1296
+ /* #undef HAVE_UCS4_TCL */
1297
+
1298
+ /* Define to 1 if you have the `uname' function. */
1299
+ #define HAVE_UNAME 1
1300
+
1301
+ /* Define to 1 if you have the <unistd.h> header file. */
1302
+ #define HAVE_UNISTD_H 1
1303
+
1304
+ /* Define to 1 if you have the `unlinkat' function. */
1305
+ #define HAVE_UNLINKAT 1
1306
+
1307
+ /* Define if you have a useable wchar_t type defined in wchar.h; useable means
1308
+ wchar_t must be an unsigned type with at least 16 bits. (see
1309
+ Include/unicodeobject.h). */
1310
+ /* #undef HAVE_USABLE_WCHAR_T */
1311
+
1312
+ /* Define to 1 if you have the <util.h> header file. */
1313
+ /* #undef HAVE_UTIL_H */
1314
+
1315
+ /* Define to 1 if you have the `utimensat' function. */
1316
+ #define HAVE_UTIMENSAT 1
1317
+
1318
+ /* Define to 1 if you have the `utimes' function. */
1319
+ #define HAVE_UTIMES 1
1320
+
1321
+ /* Define to 1 if you have the <utime.h> header file. */
1322
+ #define HAVE_UTIME_H 1
1323
+
1324
+ /* Define if uuid_create() exists. */
1325
+ /* #undef HAVE_UUID_CREATE */
1326
+
1327
+ /* Define if uuid_enc_be() exists. */
1328
+ /* #undef HAVE_UUID_ENC_BE */
1329
+
1330
+ /* Define if uuid_generate_time_safe() exists. */
1331
+ #define HAVE_UUID_GENERATE_TIME_SAFE 1
1332
+
1333
+ /* Define to 1 if you have the <uuid.h> header file. */
1334
+ #define HAVE_UUID_H 1
1335
+
1336
+ /* Define to 1 if you have the <uuid/uuid.h> header file. */
1337
+ #define HAVE_UUID_UUID_H 1
1338
+
1339
+ /* Define to 1 if you have the `vfork' function. */
1340
+ #define HAVE_VFORK 1
1341
+
1342
+ /* Define to 1 if you have the `wait3' function. */
1343
+ #define HAVE_WAIT3 1
1344
+
1345
+ /* Define to 1 if you have the `wait4' function. */
1346
+ #define HAVE_WAIT4 1
1347
+
1348
+ /* Define to 1 if you have the `waitid' function. */
1349
+ #define HAVE_WAITID 1
1350
+
1351
+ /* Define to 1 if you have the `waitpid' function. */
1352
+ #define HAVE_WAITPID 1
1353
+
1354
+ /* Define if the compiler provides a wchar.h header file. */
1355
+ #define HAVE_WCHAR_H 1
1356
+
1357
+ /* Define to 1 if you have the `wcscoll' function. */
1358
+ #define HAVE_WCSCOLL 1
1359
+
1360
+ /* Define to 1 if you have the `wcsftime' function. */
1361
+ #define HAVE_WCSFTIME 1
1362
+
1363
+ /* Define to 1 if you have the `wcsxfrm' function. */
1364
+ #define HAVE_WCSXFRM 1
1365
+
1366
+ /* Define to 1 if you have the `wmemcmp' function. */
1367
+ #define HAVE_WMEMCMP 1
1368
+
1369
+ /* Define if tzset() actually switches the local timezone in a meaningful way.
1370
+ */
1371
+ #define HAVE_WORKING_TZSET 1
1372
+
1373
+ /* Define to 1 if you have the `writev' function. */
1374
+ #define HAVE_WRITEV 1
1375
+
1376
+ /* Define if the zlib library has inflateCopy */
1377
+ #define HAVE_ZLIB_COPY 1
1378
+
1379
+ /* Define to 1 if you have the `_getpty' function. */
1380
+ /* #undef HAVE__GETPTY */
1381
+
1382
+ /* Define to 1 if `major', `minor', and `makedev' are declared in <mkdev.h>.
1383
+ */
1384
+ /* #undef MAJOR_IN_MKDEV */
1385
+
1386
+ /* Define to 1 if `major', `minor', and `makedev' are declared in
1387
+ <sysmacros.h>. */
1388
+ /* #undef MAJOR_IN_SYSMACROS */
1389
+
1390
+ /* Define if mvwdelch in curses.h is an expression. */
1391
+ #define MVWDELCH_IS_EXPRESSION 1
1392
+
1393
+ /* Define to the address where bug reports for this package should be sent. */
1394
+ /* #undef PACKAGE_BUGREPORT */
1395
+
1396
+ /* Define to the full name of this package. */
1397
+ /* #undef PACKAGE_NAME */
1398
+
1399
+ /* Define to the full name and version of this package. */
1400
+ /* #undef PACKAGE_STRING */
1401
+
1402
+ /* Define to the one symbol short name of this package. */
1403
+ /* #undef PACKAGE_TARNAME */
1404
+
1405
+ /* Define to the home page for this package. */
1406
+ /* #undef PACKAGE_URL */
1407
+
1408
+ /* Define to the version of this package. */
1409
+ /* #undef PACKAGE_VERSION */
1410
+
1411
+ /* Define if POSIX semaphores aren't enabled on your system */
1412
+ /* #undef POSIX_SEMAPHORES_NOT_ENABLED */
1413
+
1414
+ /* Define if pthread_key_t is compatible with int. */
1415
+ #define PTHREAD_KEY_T_IS_COMPATIBLE_WITH_INT 1
1416
+
1417
+ /* Defined if PTHREAD_SCOPE_SYSTEM supported. */
1418
+ #define PTHREAD_SYSTEM_SCHED_SUPPORTED 1
1419
+
1420
+ /* Define as the preferred size in bits of long digits */
1421
+ /* #undef PYLONG_BITS_IN_DIGIT */
1422
+
1423
+ /* enabled builtin hash modules */
1424
+ #define PY_BUILTIN_HASHLIB_HASHES "md5,sha1,sha256,sha512,sha3,blake2"
1425
+
1426
+ /* Define if you want to coerce the C locale to a UTF-8 based locale */
1427
+ #define PY_COERCE_C_LOCALE 1
1428
+
1429
+ /* Define to printf format modifier for Py_ssize_t */
1430
+ #define PY_FORMAT_SIZE_T "z"
1431
+
1432
+ /* Default cipher suites list for ssl module. 1: Python's preferred selection,
1433
+ 2: leave OpenSSL defaults untouched, 0: custom string */
1434
+ #define PY_SSL_DEFAULT_CIPHERS 1
1435
+
1436
+ /* Cipher suite string for PY_SSL_DEFAULT_CIPHERS=0 */
1437
+ /* #undef PY_SSL_DEFAULT_CIPHER_STRING */
1438
+
1439
+ /* Define if you want to build an interpreter with many run-time checks. */
1440
+ /* #undef Py_DEBUG */
1441
+
1442
+ /* Defined if Python is built as a shared library. */
1443
+ /* #undef Py_ENABLE_SHARED */
1444
+
1445
+ /* Define hash algorithm for str, bytes and memoryview. SipHash24: 1, FNV: 2,
1446
+ externally defined: 0 */
1447
+ /* #undef Py_HASH_ALGORITHM */
1448
+
1449
+ /* Define if you want to enable tracing references for debugging purpose */
1450
+ /* #undef Py_TRACE_REFS */
1451
+
1452
+ /* assume C89 semantics that RETSIGTYPE is always void */
1453
+ #define RETSIGTYPE void
1454
+
1455
+ /* Define if setpgrp() must be called as setpgrp(0, 0). */
1456
+ /* #undef SETPGRP_HAVE_ARG */
1457
+
1458
+ /* Define to 1 if you must link with -lrt for shm_open(). */
1459
+ #define SHM_NEEDS_LIBRT 1
1460
+
1461
+ /* Define if i>>j for signed int i does not extend the sign bit when i < 0 */
1462
+ /* #undef SIGNED_RIGHT_SHIFT_ZERO_FILLS */
1463
+
1464
+ /* The size of `double', as computed by sizeof. */
1465
+ #define SIZEOF_DOUBLE 8
1466
+
1467
+ /* The size of `float', as computed by sizeof. */
1468
+ #define SIZEOF_FLOAT 4
1469
+
1470
+ /* The size of `fpos_t', as computed by sizeof. */
1471
+ #define SIZEOF_FPOS_T 16
1472
+
1473
+ /* The size of `int', as computed by sizeof. */
1474
+ #define SIZEOF_INT 4
1475
+
1476
+ /* The size of `long', as computed by sizeof. */
1477
+ #define SIZEOF_LONG 8
1478
+
1479
+ /* The size of `long double', as computed by sizeof. */
1480
+ #define SIZEOF_LONG_DOUBLE 16
1481
+
1482
+ /* The size of `long long', as computed by sizeof. */
1483
+ #define SIZEOF_LONG_LONG 8
1484
+
1485
+ /* The size of `off_t', as computed by sizeof. */
1486
+ #define SIZEOF_OFF_T 8
1487
+
1488
+ /* The size of `pid_t', as computed by sizeof. */
1489
+ #define SIZEOF_PID_T 4
1490
+
1491
+ /* The size of `pthread_key_t', as computed by sizeof. */
1492
+ #define SIZEOF_PTHREAD_KEY_T 4
1493
+
1494
+ /* The size of `pthread_t', as computed by sizeof. */
1495
+ #define SIZEOF_PTHREAD_T 8
1496
+
1497
+ /* The size of `short', as computed by sizeof. */
1498
+ #define SIZEOF_SHORT 2
1499
+
1500
+ /* The size of `size_t', as computed by sizeof. */
1501
+ #define SIZEOF_SIZE_T 8
1502
+
1503
+ /* The size of `time_t', as computed by sizeof. */
1504
+ #define SIZEOF_TIME_T 8
1505
+
1506
+ /* The size of `uintptr_t', as computed by sizeof. */
1507
+ #define SIZEOF_UINTPTR_T 8
1508
+
1509
+ /* The size of `void *', as computed by sizeof. */
1510
+ #define SIZEOF_VOID_P 8
1511
+
1512
+ /* The size of `wchar_t', as computed by sizeof. */
1513
+ #define SIZEOF_WCHAR_T 4
1514
+
1515
+ /* The size of `_Bool', as computed by sizeof. */
1516
+ #define SIZEOF__BOOL 1
1517
+
1518
+ /* Define to 1 if you have the ANSI C header files. */
1519
+ #define STDC_HEADERS 1
1520
+
1521
+ /* Define if you can safely include both <sys/select.h> and <sys/time.h>
1522
+ (which you can't on SCO ODT 3.0). */
1523
+ #define SYS_SELECT_WITH_SYS_TIME 1
1524
+
1525
+ /* Custom thread stack size depending on chosen sanitizer runtimes. */
1526
+ /* #undef THREAD_STACK_SIZE */
1527
+
1528
+ /* Library needed by timemodule.c: librt may be needed for clock_gettime() */
1529
+ /* #undef TIMEMODULE_LIB */
1530
+
1531
+ /* Define to 1 if you can safely include both <sys/time.h> and <time.h>. */
1532
+ #define TIME_WITH_SYS_TIME 1
1533
+
1534
+ /* Define to 1 if your <sys/time.h> declares `struct tm'. */
1535
+ /* #undef TM_IN_SYS_TIME */
1536
+
1537
+ /* Define if you want to use computed gotos in ceval.c. */
1538
+ #define USE_COMPUTED_GOTOS 1
1539
+
1540
+ /* Enable extensions on AIX 3, Interix. */
1541
+ #ifndef _ALL_SOURCE
1542
+ # define _ALL_SOURCE 1
1543
+ #endif
1544
+ /* Enable GNU extensions on systems that have them. */
1545
+ #ifndef _GNU_SOURCE
1546
+ # define _GNU_SOURCE 1
1547
+ #endif
1548
+ /* Enable threading extensions on Solaris. */
1549
+ #ifndef _POSIX_PTHREAD_SEMANTICS
1550
+ # define _POSIX_PTHREAD_SEMANTICS 1
1551
+ #endif
1552
+ /* Enable extensions on HP NonStop. */
1553
+ #ifndef _TANDEM_SOURCE
1554
+ # define _TANDEM_SOURCE 1
1555
+ #endif
1556
+ /* Enable general extensions on Solaris. */
1557
+ #ifndef __EXTENSIONS__
1558
+ # define __EXTENSIONS__ 1
1559
+ #endif
1560
+
1561
+
1562
+ /* Define if WINDOW in curses.h offers a field _flags. */
1563
+ #define WINDOW_HAS_FLAGS 1
1564
+
1565
+ /* Define if you want build the _decimal module using a coroutine-local rather
1566
+ than a thread-local context */
1567
+ #define WITH_DECIMAL_CONTEXTVAR 1
1568
+
1569
+ /* Define if you want documentation strings in extension modules */
1570
+ #define WITH_DOC_STRINGS 1
1571
+
1572
+ /* Define if you want to compile in DTrace support */
1573
+ /* #undef WITH_DTRACE */
1574
+
1575
+ /* Define if you want to use the new-style (Openstep, Rhapsody, MacOS) dynamic
1576
+ linker (dyld) instead of the old-style (NextStep) dynamic linker (rld).
1577
+ Dyld is necessary to support frameworks. */
1578
+ /* #undef WITH_DYLD */
1579
+
1580
+ /* Define to build the readline module against Editline. */
1581
+ /* #undef WITH_EDITLINE */
1582
+
1583
+ /* Define to 1 if libintl is needed for locale functions. */
1584
+ /* #undef WITH_LIBINTL */
1585
+
1586
+ /* Define if you want to produce an OpenStep/Rhapsody framework (shared
1587
+ library plus accessory files). */
1588
+ /* #undef WITH_NEXT_FRAMEWORK */
1589
+
1590
+ /* Define if you want to compile in Python-specific mallocs */
1591
+ #define WITH_PYMALLOC 1
1592
+
1593
+ /* Define if you want pymalloc to be disabled when running under valgrind */
1594
+ /* #undef WITH_VALGRIND */
1595
+
1596
+ /* Define WORDS_BIGENDIAN to 1 if your processor stores words with the most
1597
+ significant byte first (like Motorola and SPARC, unlike Intel). */
1598
+ #if defined AC_APPLE_UNIVERSAL_BUILD
1599
+ # if defined __BIG_ENDIAN__
1600
+ # define WORDS_BIGENDIAN 1
1601
+ # endif
1602
+ #else
1603
+ # ifndef WORDS_BIGENDIAN
1604
+ /* # undef WORDS_BIGENDIAN */
1605
+ # endif
1606
+ #endif
1607
+
1608
+ /* Define if arithmetic is subject to x87-style double rounding issue */
1609
+ /* #undef X87_DOUBLE_ROUNDING */
1610
+
1611
+ /* Define on OpenBSD to activate all library features */
1612
+ /* #undef _BSD_SOURCE */
1613
+
1614
+ /* Define on Darwin to activate all library features */
1615
+ #define _DARWIN_C_SOURCE 1
1616
+
1617
+ /* This must be set to 64 on some systems to enable large file support. */
1618
+ #define _FILE_OFFSET_BITS 64
1619
+
1620
+ /* Define on Linux to activate all library features */
1621
+ #define _GNU_SOURCE 1
1622
+
1623
+ /* Define to include mbstate_t for mbrtowc */
1624
+ /* #undef _INCLUDE__STDC_A1_SOURCE */
1625
+
1626
+ /* This must be defined on some systems to enable large file support. */
1627
+ #define _LARGEFILE_SOURCE 1
1628
+
1629
+ /* This must be defined on AIX systems to enable large file support. */
1630
+ /* #undef _LARGE_FILES */
1631
+
1632
+ /* Define to 1 if on MINIX. */
1633
+ /* #undef _MINIX */
1634
+
1635
+ /* Define on NetBSD to activate all library features */
1636
+ #define _NETBSD_SOURCE 1
1637
+
1638
+ /* Define to 2 if the system does not provide POSIX.1 features except with
1639
+ this defined. */
1640
+ /* #undef _POSIX_1_SOURCE */
1641
+
1642
+ /* Define to activate features from IEEE Stds 1003.1-2008 */
1643
+ #define _POSIX_C_SOURCE 200809L
1644
+
1645
+ /* Define to 1 if you need to in order for `stat' and other things to work. */
1646
+ /* #undef _POSIX_SOURCE */
1647
+
1648
+ /* Define if you have POSIX threads, and your system does not define that. */
1649
+ /* #undef _POSIX_THREADS */
1650
+
1651
+ /* framework name */
1652
+ #define _PYTHONFRAMEWORK ""
1653
+
1654
+ /* Define to force use of thread-safe errno, h_errno, and other functions */
1655
+ /* #undef _REENTRANT */
1656
+
1657
+ /* Define to the level of X/Open that your system supports */
1658
+ #define _XOPEN_SOURCE 700
1659
+
1660
+ /* Define to activate Unix95-and-earlier features */
1661
+ #define _XOPEN_SOURCE_EXTENDED 1
1662
+
1663
+ /* Define on FreeBSD to activate all library features */
1664
+ #define __BSD_VISIBLE 1
1665
+
1666
+ /* Define to 'long' if <time.h> doesn't define. */
1667
+ /* #undef clock_t */
1668
+
1669
+ /* Define to empty if `const' does not conform to ANSI C. */
1670
+ /* #undef const */
1671
+
1672
+ /* Define to `int' if <sys/types.h> doesn't define. */
1673
+ /* #undef gid_t */
1674
+
1675
+ /* Define to `int' if <sys/types.h> does not define. */
1676
+ /* #undef mode_t */
1677
+
1678
+ /* Define to `long int' if <sys/types.h> does not define. */
1679
+ /* #undef off_t */
1680
+
1681
+ /* Define to `int' if <sys/types.h> does not define. */
1682
+ /* #undef pid_t */
1683
+
1684
+ /* Define to empty if the keyword does not work. */
1685
+ /* #undef signed */
1686
+
1687
+ /* Define to `unsigned int' if <sys/types.h> does not define. */
1688
+ /* #undef size_t */
1689
+
1690
+ /* Define to `int' if <sys/socket.h> does not define. */
1691
+ /* #undef socklen_t */
1692
+
1693
+ /* Define to `int' if <sys/types.h> doesn't define. */
1694
+ /* #undef uid_t */
1695
+
1696
+
1697
+ /* Define the macros needed if on a UnixWare 7.x system. */
1698
+ #if defined(__USLC__) && defined(__SCO_VERSION__)
1699
+ #define STRICT_SYSV_CURSES /* Don't use ncurses extensions */
1700
+ #endif
1701
+
1702
+ #endif /*Py_PYCONFIG_H*/
1703
+
evalkit_internvl/include/python3.10/pydtrace.h ADDED
@@ -0,0 +1,59 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /* Static DTrace probes interface */
2
+
3
+ #ifndef Py_DTRACE_H
4
+ #define Py_DTRACE_H
5
+ #ifdef __cplusplus
6
+ extern "C" {
7
+ #endif
8
+
9
+ #ifdef WITH_DTRACE
10
+
11
+ #include "pydtrace_probes.h"
12
+
13
+ /* pydtrace_probes.h, on systems with DTrace, is auto-generated to include
14
+ `PyDTrace_{PROBE}` and `PyDTrace_{PROBE}_ENABLED()` macros for every probe
15
+ defined in pydtrace_provider.d.
16
+
17
+ Calling these functions must be guarded by a `PyDTrace_{PROBE}_ENABLED()`
18
+ check to minimize performance impact when probing is off. For example:
19
+
20
+ if (PyDTrace_FUNCTION_ENTRY_ENABLED())
21
+ PyDTrace_FUNCTION_ENTRY(f);
22
+ */
23
+
24
+ #else
25
+
26
+ /* Without DTrace, compile to nothing. */
27
+
28
+ static inline void PyDTrace_LINE(const char *arg0, const char *arg1, int arg2) {}
29
+ static inline void PyDTrace_FUNCTION_ENTRY(const char *arg0, const char *arg1, int arg2) {}
30
+ static inline void PyDTrace_FUNCTION_RETURN(const char *arg0, const char *arg1, int arg2) {}
31
+ static inline void PyDTrace_GC_START(int arg0) {}
32
+ static inline void PyDTrace_GC_DONE(Py_ssize_t arg0) {}
33
+ static inline void PyDTrace_INSTANCE_NEW_START(int arg0) {}
34
+ static inline void PyDTrace_INSTANCE_NEW_DONE(int arg0) {}
35
+ static inline void PyDTrace_INSTANCE_DELETE_START(int arg0) {}
36
+ static inline void PyDTrace_INSTANCE_DELETE_DONE(int arg0) {}
37
+ static inline void PyDTrace_IMPORT_FIND_LOAD_START(const char *arg0) {}
38
+ static inline void PyDTrace_IMPORT_FIND_LOAD_DONE(const char *arg0, int arg1) {}
39
+ static inline void PyDTrace_AUDIT(const char *arg0, void *arg1) {}
40
+
41
+ static inline int PyDTrace_LINE_ENABLED(void) { return 0; }
42
+ static inline int PyDTrace_FUNCTION_ENTRY_ENABLED(void) { return 0; }
43
+ static inline int PyDTrace_FUNCTION_RETURN_ENABLED(void) { return 0; }
44
+ static inline int PyDTrace_GC_START_ENABLED(void) { return 0; }
45
+ static inline int PyDTrace_GC_DONE_ENABLED(void) { return 0; }
46
+ static inline int PyDTrace_INSTANCE_NEW_START_ENABLED(void) { return 0; }
47
+ static inline int PyDTrace_INSTANCE_NEW_DONE_ENABLED(void) { return 0; }
48
+ static inline int PyDTrace_INSTANCE_DELETE_START_ENABLED(void) { return 0; }
49
+ static inline int PyDTrace_INSTANCE_DELETE_DONE_ENABLED(void) { return 0; }
50
+ static inline int PyDTrace_IMPORT_FIND_LOAD_START_ENABLED(void) { return 0; }
51
+ static inline int PyDTrace_IMPORT_FIND_LOAD_DONE_ENABLED(void) { return 0; }
52
+ static inline int PyDTrace_AUDIT_ENABLED(void) { return 0; }
53
+
54
+ #endif /* !WITH_DTRACE */
55
+
56
+ #ifdef __cplusplus
57
+ }
58
+ #endif
59
+ #endif /* !Py_DTRACE_H */