@plone/volto 14.0.0 → 14.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +40 -0
- package/locales/ca/LC_MESSAGES/volto.po +12 -2
- package/locales/ca.json +1 -1
- package/locales/de/LC_MESSAGES/volto.po +12 -2
- package/locales/de.json +1 -1
- package/locales/en/LC_MESSAGES/volto.po +12 -2
- package/locales/en.json +1 -1
- package/locales/es/LC_MESSAGES/volto.po +12 -2
- package/locales/es.json +1 -1
- package/locales/eu/LC_MESSAGES/volto.po +12 -2
- package/locales/eu.json +1 -1
- package/locales/fr/LC_MESSAGES/volto.po +12 -2
- package/locales/fr.json +1 -1
- package/locales/it/LC_MESSAGES/volto.po +12 -2
- package/locales/it.json +1 -1
- package/locales/ja/LC_MESSAGES/volto.po +12 -2
- package/locales/ja.json +1 -1
- package/locales/nl/LC_MESSAGES/volto.po +12 -2
- package/locales/nl.json +1 -1
- package/locales/pt/LC_MESSAGES/volto.po +12 -2
- package/locales/pt.json +1 -1
- package/locales/pt_BR/LC_MESSAGES/volto.po +12 -2
- package/locales/pt_BR.json +1 -1
- package/locales/ro/LC_MESSAGES/volto.po +12 -2
- package/locales/ro.json +1 -1
- package/locales/volto.pot +12 -2
- package/package.json +2 -1
- package/public/icon.svg +13 -0
- package/src/actions/vocabularies/vocabularies.js +15 -3
- package/src/components/index.js +1 -0
- package/src/components/manage/Blocks/HeroImageLeft/Edit.jsx +1 -1
- package/src/components/manage/Blocks/Listing/getAsyncData.js +1 -1
- package/src/components/manage/Blocks/Text/Edit.jsx +19 -0
- package/src/components/manage/Form/Form.jsx +11 -1
- package/src/components/manage/Form/UndoToolbar.jsx +78 -0
- package/src/components/manage/Widgets/AlignWidget.stories.jsx +5 -21
- package/src/components/manage/Widgets/ArrayWidget.jsx +83 -101
- package/src/components/manage/Widgets/ArrayWidget.stories.jsx +29 -64
- package/src/components/manage/Widgets/CheckboxWidget.stories.jsx +5 -22
- package/src/components/manage/Widgets/DatetimeWidget.jsx +65 -74
- package/src/components/manage/Widgets/DatetimeWidget.stories.jsx +7 -23
- package/src/components/manage/Widgets/DatetimeWidget.test.jsx +17 -15
- package/src/components/manage/Widgets/EmailWidget.stories.jsx +5 -22
- package/src/components/manage/Widgets/FileWidget.stories.jsx +5 -22
- package/src/components/manage/Widgets/NumberWidget.stories.jsx +5 -23
- package/src/components/manage/Widgets/ObjectBrowserWidget.stories.js +24 -32
- package/src/components/manage/Widgets/ObjectListWidget.stories.js +44 -44
- package/src/components/manage/Widgets/ObjectWidget.stories.jsx +13 -28
- package/src/components/manage/Widgets/PasswordWidget.stories.jsx +5 -22
- package/src/components/manage/Widgets/QueryWidget.jsx +2 -2
- package/src/components/manage/Widgets/QueryWidget.stories.jsx +1637 -22
- package/src/components/manage/Widgets/SelectAutoComplete.jsx +79 -48
- package/src/components/manage/Widgets/SelectAutoComplete.test.jsx +16 -0
- package/src/components/manage/Widgets/SelectAutocompleteWidget.stories.jsx +161 -0
- package/src/components/manage/Widgets/SelectUtils.js +90 -30
- package/src/components/manage/Widgets/SelectUtils.test.jsx +76 -1
- package/src/components/manage/Widgets/SelectWidget.jsx +26 -37
- package/src/components/manage/Widgets/SelectWidget.stories.jsx +96 -28
- package/src/components/manage/Widgets/TextWidget.stories.jsx +5 -22
- package/src/components/manage/Widgets/TextareaWidget.stories.jsx +5 -22
- package/src/components/manage/Widgets/TokenWidget.jsx +19 -17
- package/src/components/manage/Widgets/TokenWidget.stories.jsx +141 -0
- package/src/components/manage/Widgets/UrlWidget.stories.jsx +5 -21
- package/src/components/manage/Widgets/VocabularyTermsWidget.stories.js +27 -64
- package/src/components/manage/Widgets/WysiwygWidget.stories.jsx +5 -22
- package/src/components/manage/Widgets/story.jsx +38 -0
- package/src/components/theme/ContactForm/ContactForm.jsx +1 -0
- package/src/components/theme/ContactForm/ContactForm.stories.jsx +126 -0
- package/src/components/theme/CorsError/CorsError.jsx +2 -2
- package/src/config/Loadables.jsx +2 -0
- package/src/config/index.js +1 -0
- package/src/helpers/Html/Html.jsx +2 -12
- package/src/helpers/UndoManager/useUndoManager.js +102 -0
- package/src/helpers/index.js +1 -0
- package/src/middleware/Api.test.js +57 -6
- package/src/middleware/api.js +34 -13
- package/src/reducers/vocabularies/vocabularies.js +13 -2
- package/src/store.js +1 -1
- package/src/storybook.jsx +55 -0
- package/theme/themes/pastanaga/extras/time-picker-overrides.less +1 -1
- package/include/python3.8/Python-ast.h +0 -715
- package/include/python3.8/Python.h +0 -160
- package/include/python3.8/abstract.h +0 -844
- package/include/python3.8/asdl.h +0 -46
- package/include/python3.8/ast.h +0 -37
- package/include/python3.8/bitset.h +0 -23
- package/include/python3.8/bltinmodule.h +0 -14
- package/include/python3.8/boolobject.h +0 -34
- package/include/python3.8/bytearrayobject.h +0 -62
- package/include/python3.8/bytes_methods.h +0 -69
- package/include/python3.8/bytesobject.h +0 -224
- package/include/python3.8/cellobject.h +0 -29
- package/include/python3.8/ceval.h +0 -231
- package/include/python3.8/classobject.h +0 -59
- package/include/python3.8/code.h +0 -180
- package/include/python3.8/codecs.h +0 -240
- package/include/python3.8/compile.h +0 -106
- package/include/python3.8/complexobject.h +0 -69
- package/include/python3.8/context.h +0 -84
- package/include/python3.8/cpython/abstract.h +0 -319
- package/include/python3.8/cpython/dictobject.h +0 -94
- package/include/python3.8/cpython/fileobject.h +0 -24
- package/include/python3.8/cpython/initconfig.h +0 -434
- package/include/python3.8/cpython/interpreteridobject.h +0 -19
- package/include/python3.8/cpython/object.h +0 -470
- package/include/python3.8/cpython/objimpl.h +0 -113
- package/include/python3.8/cpython/pyerrors.h +0 -188
- package/include/python3.8/cpython/pylifecycle.h +0 -78
- package/include/python3.8/cpython/pymem.h +0 -108
- package/include/python3.8/cpython/pystate.h +0 -252
- package/include/python3.8/cpython/sysmodule.h +0 -21
- package/include/python3.8/cpython/traceback.h +0 -22
- package/include/python3.8/cpython/tupleobject.h +0 -36
- package/include/python3.8/cpython/unicodeobject.h +0 -1239
- package/include/python3.8/datetime.h +0 -259
- package/include/python3.8/descrobject.h +0 -108
- package/include/python3.8/dictobject.h +0 -94
- package/include/python3.8/dtoa.h +0 -19
- package/include/python3.8/dynamic_annotations.h +0 -499
- package/include/python3.8/enumobject.h +0 -17
- package/include/python3.8/errcode.h +0 -38
- package/include/python3.8/eval.h +0 -37
- package/include/python3.8/fileobject.h +0 -49
- package/include/python3.8/fileutils.h +0 -185
- package/include/python3.8/floatobject.h +0 -130
- package/include/python3.8/frameobject.h +0 -92
- package/include/python3.8/funcobject.h +0 -104
- package/include/python3.8/genobject.h +0 -109
- package/include/python3.8/graminit.h +0 -94
- package/include/python3.8/grammar.h +0 -77
- package/include/python3.8/import.h +0 -149
- package/include/python3.8/internal/pycore_accu.h +0 -39
- package/include/python3.8/internal/pycore_atomic.h +0 -558
- package/include/python3.8/internal/pycore_ceval.h +0 -37
- package/include/python3.8/internal/pycore_code.h +0 -27
- package/include/python3.8/internal/pycore_condvar.h +0 -95
- package/include/python3.8/internal/pycore_context.h +0 -42
- package/include/python3.8/internal/pycore_fileutils.h +0 -54
- package/include/python3.8/internal/pycore_getopt.h +0 -22
- package/include/python3.8/internal/pycore_gil.h +0 -50
- package/include/python3.8/internal/pycore_hamt.h +0 -116
- package/include/python3.8/internal/pycore_initconfig.h +0 -166
- package/include/python3.8/internal/pycore_object.h +0 -81
- package/include/python3.8/internal/pycore_pathconfig.h +0 -75
- package/include/python3.8/internal/pycore_pyerrors.h +0 -62
- package/include/python3.8/internal/pycore_pyhash.h +0 -10
- package/include/python3.8/internal/pycore_pylifecycle.h +0 -118
- package/include/python3.8/internal/pycore_pymem.h +0 -212
- package/include/python3.8/internal/pycore_pystate.h +0 -326
- package/include/python3.8/internal/pycore_traceback.h +0 -96
- package/include/python3.8/internal/pycore_tupleobject.h +0 -19
- package/include/python3.8/internal/pycore_warnings.h +0 -25
- package/include/python3.8/interpreteridobject.h +0 -17
- package/include/python3.8/intrcheck.h +0 -33
- package/include/python3.8/iterobject.h +0 -25
- package/include/python3.8/listobject.h +0 -81
- package/include/python3.8/longintrepr.h +0 -99
- package/include/python3.8/longobject.h +0 -242
- package/include/python3.8/marshal.h +0 -28
- package/include/python3.8/memoryobject.h +0 -72
- package/include/python3.8/methodobject.h +0 -131
- package/include/python3.8/modsupport.h +0 -248
- package/include/python3.8/moduleobject.h +0 -90
- package/include/python3.8/namespaceobject.h +0 -19
- package/include/python3.8/node.h +0 -48
- package/include/python3.8/object.h +0 -753
- package/include/python3.8/objimpl.h +0 -284
- package/include/python3.8/odictobject.h +0 -43
- package/include/python3.8/opcode.h +0 -148
- package/include/python3.8/osdefs.h +0 -51
- package/include/python3.8/osmodule.h +0 -17
- package/include/python3.8/parsetok.h +0 -110
- package/include/python3.8/patchlevel.h +0 -35
- package/include/python3.8/picklebufobject.h +0 -31
- package/include/python3.8/py_curses.h +0 -100
- package/include/python3.8/pyarena.h +0 -64
- package/include/python3.8/pycapsule.h +0 -59
- package/include/python3.8/pyconfig.h +0 -1665
- package/include/python3.8/pyctype.h +0 -39
- package/include/python3.8/pydebug.h +0 -40
- package/include/python3.8/pydtrace.h +0 -59
- package/include/python3.8/pydtrace_probes.h +0 -228
- package/include/python3.8/pyerrors.h +0 -335
- package/include/python3.8/pyexpat.h +0 -55
- package/include/python3.8/pyfpe.h +0 -12
- package/include/python3.8/pyhash.h +0 -145
- package/include/python3.8/pylifecycle.h +0 -75
- package/include/python3.8/pymacconfig.h +0 -102
- package/include/python3.8/pymacro.h +0 -106
- package/include/python3.8/pymath.h +0 -230
- package/include/python3.8/pymem.h +0 -150
- package/include/python3.8/pyport.h +0 -850
- package/include/python3.8/pystate.h +0 -136
- package/include/python3.8/pystrcmp.h +0 -23
- package/include/python3.8/pystrhex.h +0 -22
- package/include/python3.8/pystrtod.h +0 -45
- package/include/python3.8/pythonrun.h +0 -210
- package/include/python3.8/pythread.h +0 -161
- package/include/python3.8/pytime.h +0 -246
- package/include/python3.8/rangeobject.h +0 -27
- package/include/python3.8/setobject.h +0 -108
- package/include/python3.8/sliceobject.h +0 -65
- package/include/python3.8/structmember.h +0 -74
- package/include/python3.8/structseq.h +0 -49
- package/include/python3.8/symtable.h +0 -123
- package/include/python3.8/sysmodule.h +0 -41
- package/include/python3.8/token.h +0 -92
- package/include/python3.8/traceback.h +0 -28
- package/include/python3.8/tracemalloc.h +0 -38
- package/include/python3.8/tupleobject.h +0 -48
- package/include/python3.8/typeslots.h +0 -85
- package/include/python3.8/ucnhash.h +0 -36
- package/include/python3.8/unicodeobject.h +0 -1044
- package/include/python3.8/warnings.h +0 -67
- package/include/python3.8/weakrefobject.h +0 -86
- package/src/components/theme/ContactForm/ContactForm.stories.mdx +0 -39
|
@@ -1,335 +0,0 @@
|
|
|
1
|
-
#ifndef Py_ERRORS_H
|
|
2
|
-
#define Py_ERRORS_H
|
|
3
|
-
#ifdef __cplusplus
|
|
4
|
-
extern "C" {
|
|
5
|
-
#endif
|
|
6
|
-
|
|
7
|
-
/* Error handling definitions */
|
|
8
|
-
|
|
9
|
-
PyAPI_FUNC(void) PyErr_SetNone(PyObject *);
|
|
10
|
-
PyAPI_FUNC(void) PyErr_SetObject(PyObject *, PyObject *);
|
|
11
|
-
PyAPI_FUNC(void) PyErr_SetString(
|
|
12
|
-
PyObject *exception,
|
|
13
|
-
const char *string /* decoded from utf-8 */
|
|
14
|
-
);
|
|
15
|
-
PyAPI_FUNC(PyObject *) PyErr_Occurred(void);
|
|
16
|
-
PyAPI_FUNC(void) PyErr_Clear(void);
|
|
17
|
-
PyAPI_FUNC(void) PyErr_Fetch(PyObject **, PyObject **, PyObject **);
|
|
18
|
-
PyAPI_FUNC(void) PyErr_Restore(PyObject *, PyObject *, PyObject *);
|
|
19
|
-
#if !defined(Py_LIMITED_API) || Py_LIMITED_API+0 >= 0x03030000
|
|
20
|
-
PyAPI_FUNC(void) PyErr_GetExcInfo(PyObject **, PyObject **, PyObject **);
|
|
21
|
-
PyAPI_FUNC(void) PyErr_SetExcInfo(PyObject *, PyObject *, PyObject *);
|
|
22
|
-
#endif
|
|
23
|
-
|
|
24
|
-
/* Defined in Python/pylifecycle.c */
|
|
25
|
-
PyAPI_FUNC(void) _Py_NO_RETURN Py_FatalError(const char *message);
|
|
26
|
-
|
|
27
|
-
#if defined(Py_DEBUG) || defined(Py_LIMITED_API)
|
|
28
|
-
#define _PyErr_OCCURRED() PyErr_Occurred()
|
|
29
|
-
#else
|
|
30
|
-
#define _PyErr_OCCURRED() (PyThreadState_GET()->curexc_type)
|
|
31
|
-
#endif
|
|
32
|
-
|
|
33
|
-
/* Error testing and normalization */
|
|
34
|
-
PyAPI_FUNC(int) PyErr_GivenExceptionMatches(PyObject *, PyObject *);
|
|
35
|
-
PyAPI_FUNC(int) PyErr_ExceptionMatches(PyObject *);
|
|
36
|
-
PyAPI_FUNC(void) PyErr_NormalizeException(PyObject**, PyObject**, PyObject**);
|
|
37
|
-
|
|
38
|
-
/* Traceback manipulation (PEP 3134) */
|
|
39
|
-
PyAPI_FUNC(int) PyException_SetTraceback(PyObject *, PyObject *);
|
|
40
|
-
PyAPI_FUNC(PyObject *) PyException_GetTraceback(PyObject *);
|
|
41
|
-
|
|
42
|
-
/* Cause manipulation (PEP 3134) */
|
|
43
|
-
PyAPI_FUNC(PyObject *) PyException_GetCause(PyObject *);
|
|
44
|
-
PyAPI_FUNC(void) PyException_SetCause(PyObject *, PyObject *);
|
|
45
|
-
|
|
46
|
-
/* Context manipulation (PEP 3134) */
|
|
47
|
-
PyAPI_FUNC(PyObject *) PyException_GetContext(PyObject *);
|
|
48
|
-
PyAPI_FUNC(void) PyException_SetContext(PyObject *, PyObject *);
|
|
49
|
-
|
|
50
|
-
/* */
|
|
51
|
-
|
|
52
|
-
#define PyExceptionClass_Check(x) \
|
|
53
|
-
(PyType_Check((x)) && \
|
|
54
|
-
PyType_FastSubclass((PyTypeObject*)(x), Py_TPFLAGS_BASE_EXC_SUBCLASS))
|
|
55
|
-
|
|
56
|
-
#define PyExceptionInstance_Check(x) \
|
|
57
|
-
PyType_FastSubclass((x)->ob_type, Py_TPFLAGS_BASE_EXC_SUBCLASS)
|
|
58
|
-
|
|
59
|
-
PyAPI_FUNC(const char *) PyExceptionClass_Name(PyObject *);
|
|
60
|
-
|
|
61
|
-
#define PyExceptionInstance_Class(x) ((PyObject*)((x)->ob_type))
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
/* Predefined exceptions */
|
|
65
|
-
|
|
66
|
-
PyAPI_DATA(PyObject *) PyExc_BaseException;
|
|
67
|
-
PyAPI_DATA(PyObject *) PyExc_Exception;
|
|
68
|
-
#if !defined(Py_LIMITED_API) || Py_LIMITED_API+0 >= 0x03050000
|
|
69
|
-
PyAPI_DATA(PyObject *) PyExc_StopAsyncIteration;
|
|
70
|
-
#endif
|
|
71
|
-
PyAPI_DATA(PyObject *) PyExc_StopIteration;
|
|
72
|
-
PyAPI_DATA(PyObject *) PyExc_GeneratorExit;
|
|
73
|
-
PyAPI_DATA(PyObject *) PyExc_ArithmeticError;
|
|
74
|
-
PyAPI_DATA(PyObject *) PyExc_LookupError;
|
|
75
|
-
|
|
76
|
-
PyAPI_DATA(PyObject *) PyExc_AssertionError;
|
|
77
|
-
PyAPI_DATA(PyObject *) PyExc_AttributeError;
|
|
78
|
-
PyAPI_DATA(PyObject *) PyExc_BufferError;
|
|
79
|
-
PyAPI_DATA(PyObject *) PyExc_EOFError;
|
|
80
|
-
PyAPI_DATA(PyObject *) PyExc_FloatingPointError;
|
|
81
|
-
PyAPI_DATA(PyObject *) PyExc_OSError;
|
|
82
|
-
PyAPI_DATA(PyObject *) PyExc_ImportError;
|
|
83
|
-
#if !defined(Py_LIMITED_API) || Py_LIMITED_API+0 >= 0x03060000
|
|
84
|
-
PyAPI_DATA(PyObject *) PyExc_ModuleNotFoundError;
|
|
85
|
-
#endif
|
|
86
|
-
PyAPI_DATA(PyObject *) PyExc_IndexError;
|
|
87
|
-
PyAPI_DATA(PyObject *) PyExc_KeyError;
|
|
88
|
-
PyAPI_DATA(PyObject *) PyExc_KeyboardInterrupt;
|
|
89
|
-
PyAPI_DATA(PyObject *) PyExc_MemoryError;
|
|
90
|
-
PyAPI_DATA(PyObject *) PyExc_NameError;
|
|
91
|
-
PyAPI_DATA(PyObject *) PyExc_OverflowError;
|
|
92
|
-
PyAPI_DATA(PyObject *) PyExc_RuntimeError;
|
|
93
|
-
#if !defined(Py_LIMITED_API) || Py_LIMITED_API+0 >= 0x03050000
|
|
94
|
-
PyAPI_DATA(PyObject *) PyExc_RecursionError;
|
|
95
|
-
#endif
|
|
96
|
-
PyAPI_DATA(PyObject *) PyExc_NotImplementedError;
|
|
97
|
-
PyAPI_DATA(PyObject *) PyExc_SyntaxError;
|
|
98
|
-
PyAPI_DATA(PyObject *) PyExc_IndentationError;
|
|
99
|
-
PyAPI_DATA(PyObject *) PyExc_TabError;
|
|
100
|
-
PyAPI_DATA(PyObject *) PyExc_ReferenceError;
|
|
101
|
-
PyAPI_DATA(PyObject *) PyExc_SystemError;
|
|
102
|
-
PyAPI_DATA(PyObject *) PyExc_SystemExit;
|
|
103
|
-
PyAPI_DATA(PyObject *) PyExc_TypeError;
|
|
104
|
-
PyAPI_DATA(PyObject *) PyExc_UnboundLocalError;
|
|
105
|
-
PyAPI_DATA(PyObject *) PyExc_UnicodeError;
|
|
106
|
-
PyAPI_DATA(PyObject *) PyExc_UnicodeEncodeError;
|
|
107
|
-
PyAPI_DATA(PyObject *) PyExc_UnicodeDecodeError;
|
|
108
|
-
PyAPI_DATA(PyObject *) PyExc_UnicodeTranslateError;
|
|
109
|
-
PyAPI_DATA(PyObject *) PyExc_ValueError;
|
|
110
|
-
PyAPI_DATA(PyObject *) PyExc_ZeroDivisionError;
|
|
111
|
-
|
|
112
|
-
#if !defined(Py_LIMITED_API) || Py_LIMITED_API+0 >= 0x03030000
|
|
113
|
-
PyAPI_DATA(PyObject *) PyExc_BlockingIOError;
|
|
114
|
-
PyAPI_DATA(PyObject *) PyExc_BrokenPipeError;
|
|
115
|
-
PyAPI_DATA(PyObject *) PyExc_ChildProcessError;
|
|
116
|
-
PyAPI_DATA(PyObject *) PyExc_ConnectionError;
|
|
117
|
-
PyAPI_DATA(PyObject *) PyExc_ConnectionAbortedError;
|
|
118
|
-
PyAPI_DATA(PyObject *) PyExc_ConnectionRefusedError;
|
|
119
|
-
PyAPI_DATA(PyObject *) PyExc_ConnectionResetError;
|
|
120
|
-
PyAPI_DATA(PyObject *) PyExc_FileExistsError;
|
|
121
|
-
PyAPI_DATA(PyObject *) PyExc_FileNotFoundError;
|
|
122
|
-
PyAPI_DATA(PyObject *) PyExc_InterruptedError;
|
|
123
|
-
PyAPI_DATA(PyObject *) PyExc_IsADirectoryError;
|
|
124
|
-
PyAPI_DATA(PyObject *) PyExc_NotADirectoryError;
|
|
125
|
-
PyAPI_DATA(PyObject *) PyExc_PermissionError;
|
|
126
|
-
PyAPI_DATA(PyObject *) PyExc_ProcessLookupError;
|
|
127
|
-
PyAPI_DATA(PyObject *) PyExc_TimeoutError;
|
|
128
|
-
#endif
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
/* Compatibility aliases */
|
|
132
|
-
PyAPI_DATA(PyObject *) PyExc_EnvironmentError;
|
|
133
|
-
PyAPI_DATA(PyObject *) PyExc_IOError;
|
|
134
|
-
#ifdef MS_WINDOWS
|
|
135
|
-
PyAPI_DATA(PyObject *) PyExc_WindowsError;
|
|
136
|
-
#endif
|
|
137
|
-
|
|
138
|
-
/* Predefined warning categories */
|
|
139
|
-
PyAPI_DATA(PyObject *) PyExc_Warning;
|
|
140
|
-
PyAPI_DATA(PyObject *) PyExc_UserWarning;
|
|
141
|
-
PyAPI_DATA(PyObject *) PyExc_DeprecationWarning;
|
|
142
|
-
PyAPI_DATA(PyObject *) PyExc_PendingDeprecationWarning;
|
|
143
|
-
PyAPI_DATA(PyObject *) PyExc_SyntaxWarning;
|
|
144
|
-
PyAPI_DATA(PyObject *) PyExc_RuntimeWarning;
|
|
145
|
-
PyAPI_DATA(PyObject *) PyExc_FutureWarning;
|
|
146
|
-
PyAPI_DATA(PyObject *) PyExc_ImportWarning;
|
|
147
|
-
PyAPI_DATA(PyObject *) PyExc_UnicodeWarning;
|
|
148
|
-
PyAPI_DATA(PyObject *) PyExc_BytesWarning;
|
|
149
|
-
PyAPI_DATA(PyObject *) PyExc_ResourceWarning;
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
/* Convenience functions */
|
|
153
|
-
|
|
154
|
-
PyAPI_FUNC(int) PyErr_BadArgument(void);
|
|
155
|
-
PyAPI_FUNC(PyObject *) PyErr_NoMemory(void);
|
|
156
|
-
PyAPI_FUNC(PyObject *) PyErr_SetFromErrno(PyObject *);
|
|
157
|
-
PyAPI_FUNC(PyObject *) PyErr_SetFromErrnoWithFilenameObject(
|
|
158
|
-
PyObject *, PyObject *);
|
|
159
|
-
#if !defined(Py_LIMITED_API) || Py_LIMITED_API+0 >= 0x03040000
|
|
160
|
-
PyAPI_FUNC(PyObject *) PyErr_SetFromErrnoWithFilenameObjects(
|
|
161
|
-
PyObject *, PyObject *, PyObject *);
|
|
162
|
-
#endif
|
|
163
|
-
PyAPI_FUNC(PyObject *) PyErr_SetFromErrnoWithFilename(
|
|
164
|
-
PyObject *exc,
|
|
165
|
-
const char *filename /* decoded from the filesystem encoding */
|
|
166
|
-
);
|
|
167
|
-
|
|
168
|
-
PyAPI_FUNC(PyObject *) PyErr_Format(
|
|
169
|
-
PyObject *exception,
|
|
170
|
-
const char *format, /* ASCII-encoded string */
|
|
171
|
-
...
|
|
172
|
-
);
|
|
173
|
-
#if !defined(Py_LIMITED_API) || Py_LIMITED_API+0 >= 0x03050000
|
|
174
|
-
PyAPI_FUNC(PyObject *) PyErr_FormatV(
|
|
175
|
-
PyObject *exception,
|
|
176
|
-
const char *format,
|
|
177
|
-
va_list vargs);
|
|
178
|
-
#endif
|
|
179
|
-
|
|
180
|
-
#ifdef MS_WINDOWS
|
|
181
|
-
PyAPI_FUNC(PyObject *) PyErr_SetFromWindowsErrWithFilename(
|
|
182
|
-
int ierr,
|
|
183
|
-
const char *filename /* decoded from the filesystem encoding */
|
|
184
|
-
);
|
|
185
|
-
PyAPI_FUNC(PyObject *) PyErr_SetFromWindowsErr(int);
|
|
186
|
-
PyAPI_FUNC(PyObject *) PyErr_SetExcFromWindowsErrWithFilenameObject(
|
|
187
|
-
PyObject *,int, PyObject *);
|
|
188
|
-
#if !defined(Py_LIMITED_API) || Py_LIMITED_API+0 >= 0x03040000
|
|
189
|
-
PyAPI_FUNC(PyObject *) PyErr_SetExcFromWindowsErrWithFilenameObjects(
|
|
190
|
-
PyObject *,int, PyObject *, PyObject *);
|
|
191
|
-
#endif
|
|
192
|
-
PyAPI_FUNC(PyObject *) PyErr_SetExcFromWindowsErrWithFilename(
|
|
193
|
-
PyObject *exc,
|
|
194
|
-
int ierr,
|
|
195
|
-
const char *filename /* decoded from the filesystem encoding */
|
|
196
|
-
);
|
|
197
|
-
PyAPI_FUNC(PyObject *) PyErr_SetExcFromWindowsErr(PyObject *, int);
|
|
198
|
-
#endif /* MS_WINDOWS */
|
|
199
|
-
|
|
200
|
-
#if !defined(Py_LIMITED_API) || Py_LIMITED_API+0 >= 0x03060000
|
|
201
|
-
PyAPI_FUNC(PyObject *) PyErr_SetImportErrorSubclass(PyObject *, PyObject *,
|
|
202
|
-
PyObject *, PyObject *);
|
|
203
|
-
#endif
|
|
204
|
-
#if !defined(Py_LIMITED_API) || Py_LIMITED_API+0 >= 0x03030000
|
|
205
|
-
PyAPI_FUNC(PyObject *) PyErr_SetImportError(PyObject *, PyObject *,
|
|
206
|
-
PyObject *);
|
|
207
|
-
#endif
|
|
208
|
-
|
|
209
|
-
/* Export the old function so that the existing API remains available: */
|
|
210
|
-
PyAPI_FUNC(void) PyErr_BadInternalCall(void);
|
|
211
|
-
PyAPI_FUNC(void) _PyErr_BadInternalCall(const char *filename, int lineno);
|
|
212
|
-
/* Mask the old API with a call to the new API for code compiled under
|
|
213
|
-
Python 2.0: */
|
|
214
|
-
#define PyErr_BadInternalCall() _PyErr_BadInternalCall(__FILE__, __LINE__)
|
|
215
|
-
|
|
216
|
-
/* Function to create a new exception */
|
|
217
|
-
PyAPI_FUNC(PyObject *) PyErr_NewException(
|
|
218
|
-
const char *name, PyObject *base, PyObject *dict);
|
|
219
|
-
PyAPI_FUNC(PyObject *) PyErr_NewExceptionWithDoc(
|
|
220
|
-
const char *name, const char *doc, PyObject *base, PyObject *dict);
|
|
221
|
-
PyAPI_FUNC(void) PyErr_WriteUnraisable(PyObject *);
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
/* In signalmodule.c */
|
|
225
|
-
PyAPI_FUNC(int) PyErr_CheckSignals(void);
|
|
226
|
-
PyAPI_FUNC(void) PyErr_SetInterrupt(void);
|
|
227
|
-
|
|
228
|
-
/* Support for adding program text to SyntaxErrors */
|
|
229
|
-
PyAPI_FUNC(void) PyErr_SyntaxLocation(
|
|
230
|
-
const char *filename, /* decoded from the filesystem encoding */
|
|
231
|
-
int lineno);
|
|
232
|
-
PyAPI_FUNC(void) PyErr_SyntaxLocationEx(
|
|
233
|
-
const char *filename, /* decoded from the filesystem encoding */
|
|
234
|
-
int lineno,
|
|
235
|
-
int col_offset);
|
|
236
|
-
PyAPI_FUNC(PyObject *) PyErr_ProgramText(
|
|
237
|
-
const char *filename, /* decoded from the filesystem encoding */
|
|
238
|
-
int lineno);
|
|
239
|
-
|
|
240
|
-
/* The following functions are used to create and modify unicode
|
|
241
|
-
exceptions from C */
|
|
242
|
-
|
|
243
|
-
/* create a UnicodeDecodeError object */
|
|
244
|
-
PyAPI_FUNC(PyObject *) PyUnicodeDecodeError_Create(
|
|
245
|
-
const char *encoding, /* UTF-8 encoded string */
|
|
246
|
-
const char *object,
|
|
247
|
-
Py_ssize_t length,
|
|
248
|
-
Py_ssize_t start,
|
|
249
|
-
Py_ssize_t end,
|
|
250
|
-
const char *reason /* UTF-8 encoded string */
|
|
251
|
-
);
|
|
252
|
-
|
|
253
|
-
/* get the encoding attribute */
|
|
254
|
-
PyAPI_FUNC(PyObject *) PyUnicodeEncodeError_GetEncoding(PyObject *);
|
|
255
|
-
PyAPI_FUNC(PyObject *) PyUnicodeDecodeError_GetEncoding(PyObject *);
|
|
256
|
-
|
|
257
|
-
/* get the object attribute */
|
|
258
|
-
PyAPI_FUNC(PyObject *) PyUnicodeEncodeError_GetObject(PyObject *);
|
|
259
|
-
PyAPI_FUNC(PyObject *) PyUnicodeDecodeError_GetObject(PyObject *);
|
|
260
|
-
PyAPI_FUNC(PyObject *) PyUnicodeTranslateError_GetObject(PyObject *);
|
|
261
|
-
|
|
262
|
-
/* get the value of the start attribute (the int * may not be NULL)
|
|
263
|
-
return 0 on success, -1 on failure */
|
|
264
|
-
PyAPI_FUNC(int) PyUnicodeEncodeError_GetStart(PyObject *, Py_ssize_t *);
|
|
265
|
-
PyAPI_FUNC(int) PyUnicodeDecodeError_GetStart(PyObject *, Py_ssize_t *);
|
|
266
|
-
PyAPI_FUNC(int) PyUnicodeTranslateError_GetStart(PyObject *, Py_ssize_t *);
|
|
267
|
-
|
|
268
|
-
/* assign a new value to the start attribute
|
|
269
|
-
return 0 on success, -1 on failure */
|
|
270
|
-
PyAPI_FUNC(int) PyUnicodeEncodeError_SetStart(PyObject *, Py_ssize_t);
|
|
271
|
-
PyAPI_FUNC(int) PyUnicodeDecodeError_SetStart(PyObject *, Py_ssize_t);
|
|
272
|
-
PyAPI_FUNC(int) PyUnicodeTranslateError_SetStart(PyObject *, Py_ssize_t);
|
|
273
|
-
|
|
274
|
-
/* get the value of the end attribute (the int *may not be NULL)
|
|
275
|
-
return 0 on success, -1 on failure */
|
|
276
|
-
PyAPI_FUNC(int) PyUnicodeEncodeError_GetEnd(PyObject *, Py_ssize_t *);
|
|
277
|
-
PyAPI_FUNC(int) PyUnicodeDecodeError_GetEnd(PyObject *, Py_ssize_t *);
|
|
278
|
-
PyAPI_FUNC(int) PyUnicodeTranslateError_GetEnd(PyObject *, Py_ssize_t *);
|
|
279
|
-
|
|
280
|
-
/* assign a new value to the end attribute
|
|
281
|
-
return 0 on success, -1 on failure */
|
|
282
|
-
PyAPI_FUNC(int) PyUnicodeEncodeError_SetEnd(PyObject *, Py_ssize_t);
|
|
283
|
-
PyAPI_FUNC(int) PyUnicodeDecodeError_SetEnd(PyObject *, Py_ssize_t);
|
|
284
|
-
PyAPI_FUNC(int) PyUnicodeTranslateError_SetEnd(PyObject *, Py_ssize_t);
|
|
285
|
-
|
|
286
|
-
/* get the value of the reason attribute */
|
|
287
|
-
PyAPI_FUNC(PyObject *) PyUnicodeEncodeError_GetReason(PyObject *);
|
|
288
|
-
PyAPI_FUNC(PyObject *) PyUnicodeDecodeError_GetReason(PyObject *);
|
|
289
|
-
PyAPI_FUNC(PyObject *) PyUnicodeTranslateError_GetReason(PyObject *);
|
|
290
|
-
|
|
291
|
-
/* assign a new value to the reason attribute
|
|
292
|
-
return 0 on success, -1 on failure */
|
|
293
|
-
PyAPI_FUNC(int) PyUnicodeEncodeError_SetReason(
|
|
294
|
-
PyObject *exc,
|
|
295
|
-
const char *reason /* UTF-8 encoded string */
|
|
296
|
-
);
|
|
297
|
-
PyAPI_FUNC(int) PyUnicodeDecodeError_SetReason(
|
|
298
|
-
PyObject *exc,
|
|
299
|
-
const char *reason /* UTF-8 encoded string */
|
|
300
|
-
);
|
|
301
|
-
PyAPI_FUNC(int) PyUnicodeTranslateError_SetReason(
|
|
302
|
-
PyObject *exc,
|
|
303
|
-
const char *reason /* UTF-8 encoded string */
|
|
304
|
-
);
|
|
305
|
-
|
|
306
|
-
/* These APIs aren't really part of the error implementation, but
|
|
307
|
-
often needed to format error messages; the native C lib APIs are
|
|
308
|
-
not available on all platforms, which is why we provide emulations
|
|
309
|
-
for those platforms in Python/mysnprintf.c,
|
|
310
|
-
WARNING: The return value of snprintf varies across platforms; do
|
|
311
|
-
not rely on any particular behavior; eventually the C99 defn may
|
|
312
|
-
be reliable.
|
|
313
|
-
*/
|
|
314
|
-
#if defined(MS_WIN32) && !defined(HAVE_SNPRINTF)
|
|
315
|
-
# define HAVE_SNPRINTF
|
|
316
|
-
# define snprintf _snprintf
|
|
317
|
-
# define vsnprintf _vsnprintf
|
|
318
|
-
#endif
|
|
319
|
-
|
|
320
|
-
#include <stdarg.h>
|
|
321
|
-
PyAPI_FUNC(int) PyOS_snprintf(char *str, size_t size, const char *format, ...)
|
|
322
|
-
Py_GCC_ATTRIBUTE((format(printf, 3, 4)));
|
|
323
|
-
PyAPI_FUNC(int) PyOS_vsnprintf(char *str, size_t size, const char *format, va_list va)
|
|
324
|
-
Py_GCC_ATTRIBUTE((format(printf, 3, 0)));
|
|
325
|
-
|
|
326
|
-
#ifndef Py_LIMITED_API
|
|
327
|
-
# define Py_CPYTHON_ERRORS_H
|
|
328
|
-
# include "cpython/pyerrors.h"
|
|
329
|
-
# undef Py_CPYTHON_ERRORS_H
|
|
330
|
-
#endif
|
|
331
|
-
|
|
332
|
-
#ifdef __cplusplus
|
|
333
|
-
}
|
|
334
|
-
#endif
|
|
335
|
-
#endif /* !Py_ERRORS_H */
|
|
@@ -1,55 +0,0 @@
|
|
|
1
|
-
/* Stuff to export relevant 'expat' entry points from pyexpat to other
|
|
2
|
-
* parser modules, such as cElementTree. */
|
|
3
|
-
|
|
4
|
-
/* note: you must import expat.h before importing this module! */
|
|
5
|
-
|
|
6
|
-
#define PyExpat_CAPI_MAGIC "pyexpat.expat_CAPI 1.1"
|
|
7
|
-
#define PyExpat_CAPSULE_NAME "pyexpat.expat_CAPI"
|
|
8
|
-
|
|
9
|
-
struct PyExpat_CAPI
|
|
10
|
-
{
|
|
11
|
-
char* magic; /* set to PyExpat_CAPI_MAGIC */
|
|
12
|
-
int size; /* set to sizeof(struct PyExpat_CAPI) */
|
|
13
|
-
int MAJOR_VERSION;
|
|
14
|
-
int MINOR_VERSION;
|
|
15
|
-
int MICRO_VERSION;
|
|
16
|
-
/* pointers to selected expat functions. add new functions at
|
|
17
|
-
the end, if needed */
|
|
18
|
-
const XML_LChar * (*ErrorString)(enum XML_Error code);
|
|
19
|
-
enum XML_Error (*GetErrorCode)(XML_Parser parser);
|
|
20
|
-
XML_Size (*GetErrorColumnNumber)(XML_Parser parser);
|
|
21
|
-
XML_Size (*GetErrorLineNumber)(XML_Parser parser);
|
|
22
|
-
enum XML_Status (*Parse)(
|
|
23
|
-
XML_Parser parser, const char *s, int len, int isFinal);
|
|
24
|
-
XML_Parser (*ParserCreate_MM)(
|
|
25
|
-
const XML_Char *encoding, const XML_Memory_Handling_Suite *memsuite,
|
|
26
|
-
const XML_Char *namespaceSeparator);
|
|
27
|
-
void (*ParserFree)(XML_Parser parser);
|
|
28
|
-
void (*SetCharacterDataHandler)(
|
|
29
|
-
XML_Parser parser, XML_CharacterDataHandler handler);
|
|
30
|
-
void (*SetCommentHandler)(
|
|
31
|
-
XML_Parser parser, XML_CommentHandler handler);
|
|
32
|
-
void (*SetDefaultHandlerExpand)(
|
|
33
|
-
XML_Parser parser, XML_DefaultHandler handler);
|
|
34
|
-
void (*SetElementHandler)(
|
|
35
|
-
XML_Parser parser, XML_StartElementHandler start,
|
|
36
|
-
XML_EndElementHandler end);
|
|
37
|
-
void (*SetNamespaceDeclHandler)(
|
|
38
|
-
XML_Parser parser, XML_StartNamespaceDeclHandler start,
|
|
39
|
-
XML_EndNamespaceDeclHandler end);
|
|
40
|
-
void (*SetProcessingInstructionHandler)(
|
|
41
|
-
XML_Parser parser, XML_ProcessingInstructionHandler handler);
|
|
42
|
-
void (*SetUnknownEncodingHandler)(
|
|
43
|
-
XML_Parser parser, XML_UnknownEncodingHandler handler,
|
|
44
|
-
void *encodingHandlerData);
|
|
45
|
-
void (*SetUserData)(XML_Parser parser, void *userData);
|
|
46
|
-
void (*SetStartDoctypeDeclHandler)(XML_Parser parser,
|
|
47
|
-
XML_StartDoctypeDeclHandler start);
|
|
48
|
-
enum XML_Status (*SetEncoding)(XML_Parser parser, const XML_Char *encoding);
|
|
49
|
-
int (*DefaultUnknownEncodingHandler)(
|
|
50
|
-
void *encodingHandlerData, const XML_Char *name, XML_Encoding *info);
|
|
51
|
-
/* might be none for expat < 2.1.0 */
|
|
52
|
-
int (*SetHashSalt)(XML_Parser parser, unsigned long hash_salt);
|
|
53
|
-
/* always add new stuff to the end! */
|
|
54
|
-
};
|
|
55
|
-
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
#ifndef Py_PYFPE_H
|
|
2
|
-
#define Py_PYFPE_H
|
|
3
|
-
|
|
4
|
-
/* These macros used to do something when Python was built with --with-fpectl,
|
|
5
|
-
* but support for that was dropped in 3.7. We continue to define them though,
|
|
6
|
-
* to avoid breaking API users.
|
|
7
|
-
*/
|
|
8
|
-
|
|
9
|
-
#define PyFPE_START_PROTECT(err_string, leave_stmt)
|
|
10
|
-
#define PyFPE_END_PROTECT(v)
|
|
11
|
-
|
|
12
|
-
#endif /* !Py_PYFPE_H */
|
|
@@ -1,145 +0,0 @@
|
|
|
1
|
-
#ifndef Py_HASH_H
|
|
2
|
-
|
|
3
|
-
#define Py_HASH_H
|
|
4
|
-
#ifdef __cplusplus
|
|
5
|
-
extern "C" {
|
|
6
|
-
#endif
|
|
7
|
-
|
|
8
|
-
/* Helpers for hash functions */
|
|
9
|
-
#ifndef Py_LIMITED_API
|
|
10
|
-
PyAPI_FUNC(Py_hash_t) _Py_HashDouble(double);
|
|
11
|
-
PyAPI_FUNC(Py_hash_t) _Py_HashPointer(void*);
|
|
12
|
-
PyAPI_FUNC(Py_hash_t) _Py_HashBytes(const void*, Py_ssize_t);
|
|
13
|
-
#endif
|
|
14
|
-
|
|
15
|
-
/* Prime multiplier used in string and various other hashes. */
|
|
16
|
-
#define _PyHASH_MULTIPLIER 1000003UL /* 0xf4243 */
|
|
17
|
-
|
|
18
|
-
/* Parameters used for the numeric hash implementation. See notes for
|
|
19
|
-
_Py_HashDouble in Python/pyhash.c. Numeric hashes are based on
|
|
20
|
-
reduction modulo the prime 2**_PyHASH_BITS - 1. */
|
|
21
|
-
|
|
22
|
-
#if SIZEOF_VOID_P >= 8
|
|
23
|
-
# define _PyHASH_BITS 61
|
|
24
|
-
#else
|
|
25
|
-
# define _PyHASH_BITS 31
|
|
26
|
-
#endif
|
|
27
|
-
|
|
28
|
-
#define _PyHASH_MODULUS (((size_t)1 << _PyHASH_BITS) - 1)
|
|
29
|
-
#define _PyHASH_INF 314159
|
|
30
|
-
#define _PyHASH_NAN 0
|
|
31
|
-
#define _PyHASH_IMAG _PyHASH_MULTIPLIER
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
/* hash secret
|
|
35
|
-
*
|
|
36
|
-
* memory layout on 64 bit systems
|
|
37
|
-
* cccccccc cccccccc cccccccc uc -- unsigned char[24]
|
|
38
|
-
* pppppppp ssssssss ........ fnv -- two Py_hash_t
|
|
39
|
-
* k0k0k0k0 k1k1k1k1 ........ siphash -- two uint64_t
|
|
40
|
-
* ........ ........ ssssssss djbx33a -- 16 bytes padding + one Py_hash_t
|
|
41
|
-
* ........ ........ eeeeeeee pyexpat XML hash salt
|
|
42
|
-
*
|
|
43
|
-
* memory layout on 32 bit systems
|
|
44
|
-
* cccccccc cccccccc cccccccc uc
|
|
45
|
-
* ppppssss ........ ........ fnv -- two Py_hash_t
|
|
46
|
-
* k0k0k0k0 k1k1k1k1 ........ siphash -- two uint64_t (*)
|
|
47
|
-
* ........ ........ ssss.... djbx33a -- 16 bytes padding + one Py_hash_t
|
|
48
|
-
* ........ ........ eeee.... pyexpat XML hash salt
|
|
49
|
-
*
|
|
50
|
-
* (*) The siphash member may not be available on 32 bit platforms without
|
|
51
|
-
* an unsigned int64 data type.
|
|
52
|
-
*/
|
|
53
|
-
#ifndef Py_LIMITED_API
|
|
54
|
-
typedef union {
|
|
55
|
-
/* ensure 24 bytes */
|
|
56
|
-
unsigned char uc[24];
|
|
57
|
-
/* two Py_hash_t for FNV */
|
|
58
|
-
struct {
|
|
59
|
-
Py_hash_t prefix;
|
|
60
|
-
Py_hash_t suffix;
|
|
61
|
-
} fnv;
|
|
62
|
-
/* two uint64 for SipHash24 */
|
|
63
|
-
struct {
|
|
64
|
-
uint64_t k0;
|
|
65
|
-
uint64_t k1;
|
|
66
|
-
} siphash;
|
|
67
|
-
/* a different (!) Py_hash_t for small string optimization */
|
|
68
|
-
struct {
|
|
69
|
-
unsigned char padding[16];
|
|
70
|
-
Py_hash_t suffix;
|
|
71
|
-
} djbx33a;
|
|
72
|
-
struct {
|
|
73
|
-
unsigned char padding[16];
|
|
74
|
-
Py_hash_t hashsalt;
|
|
75
|
-
} expat;
|
|
76
|
-
} _Py_HashSecret_t;
|
|
77
|
-
PyAPI_DATA(_Py_HashSecret_t) _Py_HashSecret;
|
|
78
|
-
#endif
|
|
79
|
-
|
|
80
|
-
#ifdef Py_DEBUG
|
|
81
|
-
PyAPI_DATA(int) _Py_HashSecret_Initialized;
|
|
82
|
-
#endif
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
/* hash function definition */
|
|
86
|
-
#ifndef Py_LIMITED_API
|
|
87
|
-
typedef struct {
|
|
88
|
-
Py_hash_t (*const hash)(const void *, Py_ssize_t);
|
|
89
|
-
const char *name;
|
|
90
|
-
const int hash_bits;
|
|
91
|
-
const int seed_bits;
|
|
92
|
-
} PyHash_FuncDef;
|
|
93
|
-
|
|
94
|
-
PyAPI_FUNC(PyHash_FuncDef*) PyHash_GetFuncDef(void);
|
|
95
|
-
#endif
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
/* cutoff for small string DJBX33A optimization in range [1, cutoff).
|
|
99
|
-
*
|
|
100
|
-
* About 50% of the strings in a typical Python application are smaller than
|
|
101
|
-
* 6 to 7 chars. However DJBX33A is vulnerable to hash collision attacks.
|
|
102
|
-
* NEVER use DJBX33A for long strings!
|
|
103
|
-
*
|
|
104
|
-
* A Py_HASH_CUTOFF of 0 disables small string optimization. 32 bit platforms
|
|
105
|
-
* should use a smaller cutoff because it is easier to create colliding
|
|
106
|
-
* strings. A cutoff of 7 on 64bit platforms and 5 on 32bit platforms should
|
|
107
|
-
* provide a decent safety margin.
|
|
108
|
-
*/
|
|
109
|
-
#ifndef Py_HASH_CUTOFF
|
|
110
|
-
# define Py_HASH_CUTOFF 0
|
|
111
|
-
#elif (Py_HASH_CUTOFF > 7 || Py_HASH_CUTOFF < 0)
|
|
112
|
-
# error Py_HASH_CUTOFF must in range 0...7.
|
|
113
|
-
#endif /* Py_HASH_CUTOFF */
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
/* hash algorithm selection
|
|
117
|
-
*
|
|
118
|
-
* The values for Py_HASH_SIPHASH24 and Py_HASH_FNV are hard-coded in the
|
|
119
|
-
* configure script.
|
|
120
|
-
*
|
|
121
|
-
* - FNV is available on all platforms and architectures.
|
|
122
|
-
* - SIPHASH24 only works on platforms that don't require aligned memory for integers.
|
|
123
|
-
* - With EXTERNAL embedders can provide an alternative implementation with::
|
|
124
|
-
*
|
|
125
|
-
* PyHash_FuncDef PyHash_Func = {...};
|
|
126
|
-
*
|
|
127
|
-
* XXX: Figure out __declspec() for extern PyHash_FuncDef.
|
|
128
|
-
*/
|
|
129
|
-
#define Py_HASH_EXTERNAL 0
|
|
130
|
-
#define Py_HASH_SIPHASH24 1
|
|
131
|
-
#define Py_HASH_FNV 2
|
|
132
|
-
|
|
133
|
-
#ifndef Py_HASH_ALGORITHM
|
|
134
|
-
# ifndef HAVE_ALIGNED_REQUIRED
|
|
135
|
-
# define Py_HASH_ALGORITHM Py_HASH_SIPHASH24
|
|
136
|
-
# else
|
|
137
|
-
# define Py_HASH_ALGORITHM Py_HASH_FNV
|
|
138
|
-
# endif /* uint64_t && uint32_t && aligned */
|
|
139
|
-
#endif /* Py_HASH_ALGORITHM */
|
|
140
|
-
|
|
141
|
-
#ifdef __cplusplus
|
|
142
|
-
}
|
|
143
|
-
#endif
|
|
144
|
-
|
|
145
|
-
#endif /* !Py_HASH_H */
|
|
@@ -1,75 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
/* Interfaces to configure, query, create & destroy the Python runtime */
|
|
3
|
-
|
|
4
|
-
#ifndef Py_PYLIFECYCLE_H
|
|
5
|
-
#define Py_PYLIFECYCLE_H
|
|
6
|
-
#ifdef __cplusplus
|
|
7
|
-
extern "C" {
|
|
8
|
-
#endif
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
/* Initialization and finalization */
|
|
12
|
-
PyAPI_FUNC(void) Py_Initialize(void);
|
|
13
|
-
PyAPI_FUNC(void) Py_InitializeEx(int);
|
|
14
|
-
PyAPI_FUNC(void) Py_Finalize(void);
|
|
15
|
-
#if !defined(Py_LIMITED_API) || Py_LIMITED_API+0 >= 0x03060000
|
|
16
|
-
PyAPI_FUNC(int) Py_FinalizeEx(void);
|
|
17
|
-
#endif
|
|
18
|
-
PyAPI_FUNC(int) Py_IsInitialized(void);
|
|
19
|
-
|
|
20
|
-
/* Subinterpreter support */
|
|
21
|
-
PyAPI_FUNC(PyThreadState *) Py_NewInterpreter(void);
|
|
22
|
-
PyAPI_FUNC(void) Py_EndInterpreter(PyThreadState *);
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
/* Py_PyAtExit is for the atexit module, Py_AtExit is for low-level
|
|
26
|
-
* exit functions.
|
|
27
|
-
*/
|
|
28
|
-
PyAPI_FUNC(int) Py_AtExit(void (*func)(void));
|
|
29
|
-
|
|
30
|
-
PyAPI_FUNC(void) _Py_NO_RETURN Py_Exit(int);
|
|
31
|
-
|
|
32
|
-
/* Bootstrap __main__ (defined in Modules/main.c) */
|
|
33
|
-
PyAPI_FUNC(int) Py_Main(int argc, wchar_t **argv);
|
|
34
|
-
|
|
35
|
-
PyAPI_FUNC(int) Py_BytesMain(int argc, char **argv);
|
|
36
|
-
|
|
37
|
-
/* In pathconfig.c */
|
|
38
|
-
PyAPI_FUNC(void) Py_SetProgramName(const wchar_t *);
|
|
39
|
-
PyAPI_FUNC(wchar_t *) Py_GetProgramName(void);
|
|
40
|
-
|
|
41
|
-
PyAPI_FUNC(void) Py_SetPythonHome(const wchar_t *);
|
|
42
|
-
PyAPI_FUNC(wchar_t *) Py_GetPythonHome(void);
|
|
43
|
-
|
|
44
|
-
PyAPI_FUNC(wchar_t *) Py_GetProgramFullPath(void);
|
|
45
|
-
|
|
46
|
-
PyAPI_FUNC(wchar_t *) Py_GetPrefix(void);
|
|
47
|
-
PyAPI_FUNC(wchar_t *) Py_GetExecPrefix(void);
|
|
48
|
-
PyAPI_FUNC(wchar_t *) Py_GetPath(void);
|
|
49
|
-
PyAPI_FUNC(void) Py_SetPath(const wchar_t *);
|
|
50
|
-
#ifdef MS_WINDOWS
|
|
51
|
-
int _Py_CheckPython3(void);
|
|
52
|
-
#endif
|
|
53
|
-
|
|
54
|
-
/* In their own files */
|
|
55
|
-
PyAPI_FUNC(const char *) Py_GetVersion(void);
|
|
56
|
-
PyAPI_FUNC(const char *) Py_GetPlatform(void);
|
|
57
|
-
PyAPI_FUNC(const char *) Py_GetCopyright(void);
|
|
58
|
-
PyAPI_FUNC(const char *) Py_GetCompiler(void);
|
|
59
|
-
PyAPI_FUNC(const char *) Py_GetBuildInfo(void);
|
|
60
|
-
|
|
61
|
-
/* Signals */
|
|
62
|
-
typedef void (*PyOS_sighandler_t)(int);
|
|
63
|
-
PyAPI_FUNC(PyOS_sighandler_t) PyOS_getsig(int);
|
|
64
|
-
PyAPI_FUNC(PyOS_sighandler_t) PyOS_setsig(int, PyOS_sighandler_t);
|
|
65
|
-
|
|
66
|
-
#ifndef Py_LIMITED_API
|
|
67
|
-
# define Py_CPYTHON_PYLIFECYCLE_H
|
|
68
|
-
# include "cpython/pylifecycle.h"
|
|
69
|
-
# undef Py_CPYTHON_PYLIFECYCLE_H
|
|
70
|
-
#endif
|
|
71
|
-
|
|
72
|
-
#ifdef __cplusplus
|
|
73
|
-
}
|
|
74
|
-
#endif
|
|
75
|
-
#endif /* !Py_PYLIFECYCLE_H */
|