@plone/volto 14.0.1 → 14.2.0

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.
Files changed (218) hide show
  1. package/CHANGELOG.md +41 -0
  2. package/locales/ca/LC_MESSAGES/volto.po +12 -2
  3. package/locales/ca.json +1 -1
  4. package/locales/de/LC_MESSAGES/volto.po +12 -2
  5. package/locales/de.json +1 -1
  6. package/locales/en/LC_MESSAGES/volto.po +12 -2
  7. package/locales/en.json +1 -1
  8. package/locales/es/LC_MESSAGES/volto.po +12 -2
  9. package/locales/es.json +1 -1
  10. package/locales/eu/LC_MESSAGES/volto.po +12 -2
  11. package/locales/eu.json +1 -1
  12. package/locales/fr/LC_MESSAGES/volto.po +12 -2
  13. package/locales/fr.json +1 -1
  14. package/locales/it/LC_MESSAGES/volto.po +12 -2
  15. package/locales/it.json +1 -1
  16. package/locales/ja/LC_MESSAGES/volto.po +12 -2
  17. package/locales/ja.json +1 -1
  18. package/locales/nl/LC_MESSAGES/volto.po +12 -2
  19. package/locales/nl.json +1 -1
  20. package/locales/pt/LC_MESSAGES/volto.po +12 -2
  21. package/locales/pt.json +1 -1
  22. package/locales/pt_BR/LC_MESSAGES/volto.po +12 -2
  23. package/locales/pt_BR.json +1 -1
  24. package/locales/ro/LC_MESSAGES/volto.po +12 -2
  25. package/locales/ro.json +1 -1
  26. package/locales/volto.pot +12 -2
  27. package/package.json +2 -1
  28. package/public/icon.svg +13 -0
  29. package/src/actions/vocabularies/vocabularies.js +15 -3
  30. package/src/components/index.js +1 -0
  31. package/src/components/manage/Add/Add.jsx +1 -0
  32. package/src/components/manage/Blocks/HeroImageLeft/Edit.jsx +1 -1
  33. package/src/components/manage/Blocks/Listing/getAsyncData.js +1 -1
  34. package/src/components/manage/Blocks/Text/Edit.jsx +19 -0
  35. package/src/components/manage/Edit/Edit.jsx +1 -0
  36. package/src/components/manage/Form/Form.jsx +32 -6
  37. package/src/components/manage/Form/UndoToolbar.jsx +78 -0
  38. package/src/components/manage/Multilingual/TranslationObject.jsx +1 -0
  39. package/src/components/manage/Widgets/AlignWidget.stories.jsx +5 -21
  40. package/src/components/manage/Widgets/ArrayWidget.jsx +88 -88
  41. package/src/components/manage/Widgets/ArrayWidget.stories.jsx +37 -64
  42. package/src/components/manage/Widgets/CheckboxWidget.stories.jsx +5 -22
  43. package/src/components/manage/Widgets/DatetimeWidget.jsx +65 -74
  44. package/src/components/manage/Widgets/DatetimeWidget.stories.jsx +7 -23
  45. package/src/components/manage/Widgets/DatetimeWidget.test.jsx +17 -15
  46. package/src/components/manage/Widgets/EmailWidget.stories.jsx +5 -22
  47. package/src/components/manage/Widgets/FileWidget.stories.jsx +5 -22
  48. package/src/components/manage/Widgets/NumberWidget.stories.jsx +5 -23
  49. package/src/components/manage/Widgets/ObjectBrowserWidget.stories.js +24 -32
  50. package/src/components/manage/Widgets/ObjectListWidget.stories.js +44 -44
  51. package/src/components/manage/Widgets/ObjectWidget.stories.jsx +13 -28
  52. package/src/components/manage/Widgets/PasswordWidget.stories.jsx +5 -22
  53. package/src/components/manage/Widgets/QueryWidget.jsx +2 -2
  54. package/src/components/manage/Widgets/QueryWidget.stories.jsx +1637 -22
  55. package/src/components/manage/Widgets/SelectAutoComplete.jsx +79 -48
  56. package/src/components/manage/Widgets/SelectAutoComplete.test.jsx +16 -0
  57. package/src/components/manage/Widgets/SelectAutocompleteWidget.stories.jsx +161 -0
  58. package/src/components/manage/Widgets/SelectUtils.js +90 -30
  59. package/src/components/manage/Widgets/SelectUtils.test.jsx +76 -1
  60. package/src/components/manage/Widgets/SelectWidget.jsx +26 -37
  61. package/src/components/manage/Widgets/SelectWidget.stories.jsx +96 -28
  62. package/src/components/manage/Widgets/TextWidget.stories.jsx +5 -22
  63. package/src/components/manage/Widgets/TextareaWidget.stories.jsx +5 -22
  64. package/src/components/manage/Widgets/TokenWidget.jsx +19 -17
  65. package/src/components/manage/Widgets/TokenWidget.stories.jsx +141 -0
  66. package/src/components/manage/Widgets/UrlWidget.stories.jsx +5 -21
  67. package/src/components/manage/Widgets/VocabularyTermsWidget.stories.js +27 -64
  68. package/src/components/manage/Widgets/WysiwygWidget.stories.jsx +5 -22
  69. package/src/components/manage/Widgets/story.jsx +38 -0
  70. package/src/components/theme/ContactForm/ContactForm.jsx +1 -0
  71. package/src/components/theme/ContactForm/ContactForm.stories.jsx +126 -0
  72. package/src/components/theme/CorsError/CorsError.jsx +2 -2
  73. package/src/config/Blocks.jsx +8 -1
  74. package/src/config/Loadables.jsx +2 -0
  75. package/src/config/index.js +3 -0
  76. package/src/helpers/Html/Html.jsx +2 -12
  77. package/src/helpers/UndoManager/useUndoManager.js +102 -0
  78. package/src/helpers/index.js +1 -0
  79. package/src/reducers/vocabularies/vocabularies.js +13 -2
  80. package/src/store.js +1 -1
  81. package/src/storybook.jsx +55 -0
  82. package/theme/themes/pastanaga/extras/time-picker-overrides.less +1 -1
  83. package/include/python3.8/Python-ast.h +0 -715
  84. package/include/python3.8/Python.h +0 -160
  85. package/include/python3.8/abstract.h +0 -844
  86. package/include/python3.8/asdl.h +0 -46
  87. package/include/python3.8/ast.h +0 -37
  88. package/include/python3.8/bitset.h +0 -23
  89. package/include/python3.8/bltinmodule.h +0 -14
  90. package/include/python3.8/boolobject.h +0 -34
  91. package/include/python3.8/bytearrayobject.h +0 -62
  92. package/include/python3.8/bytes_methods.h +0 -69
  93. package/include/python3.8/bytesobject.h +0 -224
  94. package/include/python3.8/cellobject.h +0 -29
  95. package/include/python3.8/ceval.h +0 -231
  96. package/include/python3.8/classobject.h +0 -59
  97. package/include/python3.8/code.h +0 -180
  98. package/include/python3.8/codecs.h +0 -240
  99. package/include/python3.8/compile.h +0 -106
  100. package/include/python3.8/complexobject.h +0 -69
  101. package/include/python3.8/context.h +0 -84
  102. package/include/python3.8/cpython/abstract.h +0 -319
  103. package/include/python3.8/cpython/dictobject.h +0 -94
  104. package/include/python3.8/cpython/fileobject.h +0 -24
  105. package/include/python3.8/cpython/initconfig.h +0 -434
  106. package/include/python3.8/cpython/interpreteridobject.h +0 -19
  107. package/include/python3.8/cpython/object.h +0 -470
  108. package/include/python3.8/cpython/objimpl.h +0 -113
  109. package/include/python3.8/cpython/pyerrors.h +0 -188
  110. package/include/python3.8/cpython/pylifecycle.h +0 -78
  111. package/include/python3.8/cpython/pymem.h +0 -108
  112. package/include/python3.8/cpython/pystate.h +0 -252
  113. package/include/python3.8/cpython/sysmodule.h +0 -21
  114. package/include/python3.8/cpython/traceback.h +0 -22
  115. package/include/python3.8/cpython/tupleobject.h +0 -36
  116. package/include/python3.8/cpython/unicodeobject.h +0 -1239
  117. package/include/python3.8/datetime.h +0 -259
  118. package/include/python3.8/descrobject.h +0 -108
  119. package/include/python3.8/dictobject.h +0 -94
  120. package/include/python3.8/dtoa.h +0 -19
  121. package/include/python3.8/dynamic_annotations.h +0 -499
  122. package/include/python3.8/enumobject.h +0 -17
  123. package/include/python3.8/errcode.h +0 -38
  124. package/include/python3.8/eval.h +0 -37
  125. package/include/python3.8/fileobject.h +0 -49
  126. package/include/python3.8/fileutils.h +0 -185
  127. package/include/python3.8/floatobject.h +0 -130
  128. package/include/python3.8/frameobject.h +0 -92
  129. package/include/python3.8/funcobject.h +0 -104
  130. package/include/python3.8/genobject.h +0 -109
  131. package/include/python3.8/graminit.h +0 -94
  132. package/include/python3.8/grammar.h +0 -77
  133. package/include/python3.8/import.h +0 -149
  134. package/include/python3.8/internal/pycore_accu.h +0 -39
  135. package/include/python3.8/internal/pycore_atomic.h +0 -558
  136. package/include/python3.8/internal/pycore_ceval.h +0 -37
  137. package/include/python3.8/internal/pycore_code.h +0 -27
  138. package/include/python3.8/internal/pycore_condvar.h +0 -95
  139. package/include/python3.8/internal/pycore_context.h +0 -42
  140. package/include/python3.8/internal/pycore_fileutils.h +0 -54
  141. package/include/python3.8/internal/pycore_getopt.h +0 -22
  142. package/include/python3.8/internal/pycore_gil.h +0 -50
  143. package/include/python3.8/internal/pycore_hamt.h +0 -116
  144. package/include/python3.8/internal/pycore_initconfig.h +0 -166
  145. package/include/python3.8/internal/pycore_object.h +0 -81
  146. package/include/python3.8/internal/pycore_pathconfig.h +0 -75
  147. package/include/python3.8/internal/pycore_pyerrors.h +0 -62
  148. package/include/python3.8/internal/pycore_pyhash.h +0 -10
  149. package/include/python3.8/internal/pycore_pylifecycle.h +0 -118
  150. package/include/python3.8/internal/pycore_pymem.h +0 -212
  151. package/include/python3.8/internal/pycore_pystate.h +0 -326
  152. package/include/python3.8/internal/pycore_traceback.h +0 -96
  153. package/include/python3.8/internal/pycore_tupleobject.h +0 -19
  154. package/include/python3.8/internal/pycore_warnings.h +0 -25
  155. package/include/python3.8/interpreteridobject.h +0 -17
  156. package/include/python3.8/intrcheck.h +0 -33
  157. package/include/python3.8/iterobject.h +0 -25
  158. package/include/python3.8/listobject.h +0 -81
  159. package/include/python3.8/longintrepr.h +0 -99
  160. package/include/python3.8/longobject.h +0 -242
  161. package/include/python3.8/marshal.h +0 -28
  162. package/include/python3.8/memoryobject.h +0 -72
  163. package/include/python3.8/methodobject.h +0 -131
  164. package/include/python3.8/modsupport.h +0 -248
  165. package/include/python3.8/moduleobject.h +0 -90
  166. package/include/python3.8/namespaceobject.h +0 -19
  167. package/include/python3.8/node.h +0 -48
  168. package/include/python3.8/object.h +0 -753
  169. package/include/python3.8/objimpl.h +0 -284
  170. package/include/python3.8/odictobject.h +0 -43
  171. package/include/python3.8/opcode.h +0 -148
  172. package/include/python3.8/osdefs.h +0 -51
  173. package/include/python3.8/osmodule.h +0 -17
  174. package/include/python3.8/parsetok.h +0 -110
  175. package/include/python3.8/patchlevel.h +0 -35
  176. package/include/python3.8/picklebufobject.h +0 -31
  177. package/include/python3.8/py_curses.h +0 -100
  178. package/include/python3.8/pyarena.h +0 -64
  179. package/include/python3.8/pycapsule.h +0 -59
  180. package/include/python3.8/pyconfig.h +0 -1665
  181. package/include/python3.8/pyctype.h +0 -39
  182. package/include/python3.8/pydebug.h +0 -40
  183. package/include/python3.8/pydtrace.h +0 -59
  184. package/include/python3.8/pydtrace_probes.h +0 -228
  185. package/include/python3.8/pyerrors.h +0 -335
  186. package/include/python3.8/pyexpat.h +0 -55
  187. package/include/python3.8/pyfpe.h +0 -12
  188. package/include/python3.8/pyhash.h +0 -145
  189. package/include/python3.8/pylifecycle.h +0 -75
  190. package/include/python3.8/pymacconfig.h +0 -102
  191. package/include/python3.8/pymacro.h +0 -106
  192. package/include/python3.8/pymath.h +0 -230
  193. package/include/python3.8/pymem.h +0 -150
  194. package/include/python3.8/pyport.h +0 -850
  195. package/include/python3.8/pystate.h +0 -136
  196. package/include/python3.8/pystrcmp.h +0 -23
  197. package/include/python3.8/pystrhex.h +0 -22
  198. package/include/python3.8/pystrtod.h +0 -45
  199. package/include/python3.8/pythonrun.h +0 -210
  200. package/include/python3.8/pythread.h +0 -161
  201. package/include/python3.8/pytime.h +0 -246
  202. package/include/python3.8/rangeobject.h +0 -27
  203. package/include/python3.8/setobject.h +0 -108
  204. package/include/python3.8/sliceobject.h +0 -65
  205. package/include/python3.8/structmember.h +0 -74
  206. package/include/python3.8/structseq.h +0 -49
  207. package/include/python3.8/symtable.h +0 -123
  208. package/include/python3.8/sysmodule.h +0 -41
  209. package/include/python3.8/token.h +0 -92
  210. package/include/python3.8/traceback.h +0 -28
  211. package/include/python3.8/tracemalloc.h +0 -38
  212. package/include/python3.8/tupleobject.h +0 -48
  213. package/include/python3.8/typeslots.h +0 -85
  214. package/include/python3.8/ucnhash.h +0 -36
  215. package/include/python3.8/unicodeobject.h +0 -1044
  216. package/include/python3.8/warnings.h +0 -67
  217. package/include/python3.8/weakrefobject.h +0 -86
  218. package/src/components/theme/ContactForm/ContactForm.stories.mdx +0 -39
@@ -1,319 +0,0 @@
1
- #ifndef Py_CPYTHON_ABSTRACTOBJECT_H
2
- # error "this header file must not be included directly"
3
- #endif
4
-
5
- #ifdef __cplusplus
6
- extern "C" {
7
- #endif
8
-
9
- /* === Object Protocol ================================================== */
10
-
11
- #ifdef PY_SSIZE_T_CLEAN
12
- # define _PyObject_CallMethodId _PyObject_CallMethodId_SizeT
13
- #endif
14
-
15
- /* Convert keyword arguments from the FASTCALL (stack: C array, kwnames: tuple)
16
- format to a Python dictionary ("kwargs" dict).
17
-
18
- The type of kwnames keys is not checked. The final function getting
19
- arguments is responsible to check if all keys are strings, for example using
20
- PyArg_ParseTupleAndKeywords() or PyArg_ValidateKeywordArguments().
21
-
22
- Duplicate keys are merged using the last value. If duplicate keys must raise
23
- an exception, the caller is responsible to implement an explicit keys on
24
- kwnames. */
25
- PyAPI_FUNC(PyObject *) _PyStack_AsDict(
26
- PyObject *const *values,
27
- PyObject *kwnames);
28
-
29
- /* Convert (args, nargs, kwargs: dict) into a (stack, nargs, kwnames: tuple).
30
-
31
- Return 0 on success, raise an exception and return -1 on error.
32
-
33
- Write the new stack into *p_stack. If *p_stack is differen than args, it
34
- must be released by PyMem_Free().
35
-
36
- The stack uses borrowed references.
37
-
38
- The type of keyword keys is not checked, these checks should be done
39
- later (ex: _PyArg_ParseStackAndKeywords). */
40
- PyAPI_FUNC(int) _PyStack_UnpackDict(
41
- PyObject *const *args,
42
- Py_ssize_t nargs,
43
- PyObject *kwargs,
44
- PyObject *const **p_stack,
45
- PyObject **p_kwnames);
46
-
47
- /* Suggested size (number of positional arguments) for arrays of PyObject*
48
- allocated on a C stack to avoid allocating memory on the heap memory. Such
49
- array is used to pass positional arguments to call functions of the
50
- _PyObject_Vectorcall() family.
51
-
52
- The size is chosen to not abuse the C stack and so limit the risk of stack
53
- overflow. The size is also chosen to allow using the small stack for most
54
- function calls of the Python standard library. On 64-bit CPU, it allocates
55
- 40 bytes on the stack. */
56
- #define _PY_FASTCALL_SMALL_STACK 5
57
-
58
- PyAPI_FUNC(PyObject *) _Py_CheckFunctionResult(PyObject *callable,
59
- PyObject *result,
60
- const char *where);
61
-
62
- /* === Vectorcall protocol (PEP 590) ============================= */
63
-
64
- /* Call callable using tp_call. Arguments are like _PyObject_Vectorcall()
65
- or _PyObject_FastCallDict() (both forms are supported),
66
- except that nargs is plainly the number of arguments without flags. */
67
- PyAPI_FUNC(PyObject *) _PyObject_MakeTpCall(
68
- PyObject *callable,
69
- PyObject *const *args, Py_ssize_t nargs,
70
- PyObject *keywords);
71
-
72
- #define PY_VECTORCALL_ARGUMENTS_OFFSET ((size_t)1 << (8 * sizeof(size_t) - 1))
73
-
74
- static inline Py_ssize_t
75
- PyVectorcall_NARGS(size_t n)
76
- {
77
- return n & ~PY_VECTORCALL_ARGUMENTS_OFFSET;
78
- }
79
-
80
- static inline vectorcallfunc
81
- _PyVectorcall_Function(PyObject *callable)
82
- {
83
- PyTypeObject *tp = Py_TYPE(callable);
84
- Py_ssize_t offset = tp->tp_vectorcall_offset;
85
- vectorcallfunc ptr;
86
- if (!PyType_HasFeature(tp, _Py_TPFLAGS_HAVE_VECTORCALL)) {
87
- return NULL;
88
- }
89
- assert(PyCallable_Check(callable));
90
- assert(offset > 0);
91
- memcpy(&ptr, (char *) callable + offset, sizeof(ptr));
92
- return ptr;
93
- }
94
-
95
- /* Call the callable object 'callable' with the "vectorcall" calling
96
- convention.
97
-
98
- args is a C array for positional arguments.
99
-
100
- nargsf is the number of positional arguments plus optionally the flag
101
- PY_VECTORCALL_ARGUMENTS_OFFSET which means that the caller is allowed to
102
- modify args[-1].
103
-
104
- kwnames is a tuple of keyword names. The values of the keyword arguments
105
- are stored in "args" after the positional arguments (note that the number
106
- of keyword arguments does not change nargsf). kwnames can also be NULL if
107
- there are no keyword arguments.
108
-
109
- keywords must only contains str strings (no subclass), and all keys must
110
- be unique.
111
-
112
- Return the result on success. Raise an exception and return NULL on
113
- error. */
114
- static inline PyObject *
115
- _PyObject_Vectorcall(PyObject *callable, PyObject *const *args,
116
- size_t nargsf, PyObject *kwnames)
117
- {
118
- PyObject *res;
119
- vectorcallfunc func;
120
- assert(kwnames == NULL || PyTuple_Check(kwnames));
121
- assert(args != NULL || PyVectorcall_NARGS(nargsf) == 0);
122
- func = _PyVectorcall_Function(callable);
123
- if (func == NULL) {
124
- Py_ssize_t nargs = PyVectorcall_NARGS(nargsf);
125
- return _PyObject_MakeTpCall(callable, args, nargs, kwnames);
126
- }
127
- res = func(callable, args, nargsf, kwnames);
128
- return _Py_CheckFunctionResult(callable, res, NULL);
129
- }
130
-
131
- /* Same as _PyObject_Vectorcall except that keyword arguments are passed as
132
- dict, which may be NULL if there are no keyword arguments. */
133
- PyAPI_FUNC(PyObject *) _PyObject_FastCallDict(
134
- PyObject *callable,
135
- PyObject *const *args,
136
- size_t nargsf,
137
- PyObject *kwargs);
138
-
139
- /* Call "callable" (which must support vectorcall) with positional arguments
140
- "tuple" and keyword arguments "dict". "dict" may also be NULL */
141
- PyAPI_FUNC(PyObject *) PyVectorcall_Call(PyObject *callable, PyObject *tuple, PyObject *dict);
142
-
143
- /* Same as _PyObject_Vectorcall except without keyword arguments */
144
- static inline PyObject *
145
- _PyObject_FastCall(PyObject *func, PyObject *const *args, Py_ssize_t nargs)
146
- {
147
- return _PyObject_Vectorcall(func, args, (size_t)nargs, NULL);
148
- }
149
-
150
- /* Call a callable without any arguments */
151
- static inline PyObject *
152
- _PyObject_CallNoArg(PyObject *func) {
153
- return _PyObject_Vectorcall(func, NULL, 0, NULL);
154
- }
155
-
156
- PyAPI_FUNC(PyObject *) _PyObject_Call_Prepend(
157
- PyObject *callable,
158
- PyObject *obj,
159
- PyObject *args,
160
- PyObject *kwargs);
161
-
162
- PyAPI_FUNC(PyObject *) _PyObject_FastCall_Prepend(
163
- PyObject *callable,
164
- PyObject *obj,
165
- PyObject *const *args,
166
- Py_ssize_t nargs);
167
-
168
- /* Like PyObject_CallMethod(), but expect a _Py_Identifier*
169
- as the method name. */
170
- PyAPI_FUNC(PyObject *) _PyObject_CallMethodId(PyObject *obj,
171
- _Py_Identifier *name,
172
- const char *format, ...);
173
-
174
- PyAPI_FUNC(PyObject *) _PyObject_CallMethodId_SizeT(PyObject *obj,
175
- _Py_Identifier *name,
176
- const char *format,
177
- ...);
178
-
179
- PyAPI_FUNC(PyObject *) _PyObject_CallMethodIdObjArgs(
180
- PyObject *obj,
181
- struct _Py_Identifier *name,
182
- ...);
183
-
184
- PyAPI_FUNC(int) _PyObject_HasLen(PyObject *o);
185
-
186
- /* Guess the size of object 'o' using len(o) or o.__length_hint__().
187
- If neither of those return a non-negative value, then return the default
188
- value. If one of the calls fails, this function returns -1. */
189
- PyAPI_FUNC(Py_ssize_t) PyObject_LengthHint(PyObject *o, Py_ssize_t);
190
-
191
- /* === New Buffer API ============================================ */
192
-
193
- /* Return 1 if the getbuffer function is available, otherwise return 0. */
194
- #define PyObject_CheckBuffer(obj) \
195
- (((obj)->ob_type->tp_as_buffer != NULL) && \
196
- ((obj)->ob_type->tp_as_buffer->bf_getbuffer != NULL))
197
-
198
- /* This is a C-API version of the getbuffer function call. It checks
199
- to make sure object has the required function pointer and issues the
200
- call.
201
-
202
- Returns -1 and raises an error on failure and returns 0 on success. */
203
- PyAPI_FUNC(int) PyObject_GetBuffer(PyObject *obj, Py_buffer *view,
204
- int flags);
205
-
206
- /* Get the memory area pointed to by the indices for the buffer given.
207
- Note that view->ndim is the assumed size of indices. */
208
- PyAPI_FUNC(void *) PyBuffer_GetPointer(Py_buffer *view, Py_ssize_t *indices);
209
-
210
- /* Return the implied itemsize of the data-format area from a
211
- struct-style description. */
212
- PyAPI_FUNC(int) PyBuffer_SizeFromFormat(const char *);
213
-
214
- /* Implementation in memoryobject.c */
215
- PyAPI_FUNC(int) PyBuffer_ToContiguous(void *buf, Py_buffer *view,
216
- Py_ssize_t len, char order);
217
-
218
- PyAPI_FUNC(int) PyBuffer_FromContiguous(Py_buffer *view, void *buf,
219
- Py_ssize_t len, char order);
220
-
221
- /* Copy len bytes of data from the contiguous chunk of memory
222
- pointed to by buf into the buffer exported by obj. Return
223
- 0 on success and return -1 and raise a PyBuffer_Error on
224
- error (i.e. the object does not have a buffer interface or
225
- it is not working).
226
-
227
- If fort is 'F', then if the object is multi-dimensional,
228
- then the data will be copied into the array in
229
- Fortran-style (first dimension varies the fastest). If
230
- fort is 'C', then the data will be copied into the array
231
- in C-style (last dimension varies the fastest). If fort
232
- is 'A', then it does not matter and the copy will be made
233
- in whatever way is more efficient. */
234
- PyAPI_FUNC(int) PyObject_CopyData(PyObject *dest, PyObject *src);
235
-
236
- /* Copy the data from the src buffer to the buffer of destination. */
237
- PyAPI_FUNC(int) PyBuffer_IsContiguous(const Py_buffer *view, char fort);
238
-
239
- /*Fill the strides array with byte-strides of a contiguous
240
- (Fortran-style if fort is 'F' or C-style otherwise)
241
- array of the given shape with the given number of bytes
242
- per element. */
243
- PyAPI_FUNC(void) PyBuffer_FillContiguousStrides(int ndims,
244
- Py_ssize_t *shape,
245
- Py_ssize_t *strides,
246
- int itemsize,
247
- char fort);
248
-
249
- /* Fills in a buffer-info structure correctly for an exporter
250
- that can only share a contiguous chunk of memory of
251
- "unsigned bytes" of the given length.
252
-
253
- Returns 0 on success and -1 (with raising an error) on error. */
254
- PyAPI_FUNC(int) PyBuffer_FillInfo(Py_buffer *view, PyObject *o, void *buf,
255
- Py_ssize_t len, int readonly,
256
- int flags);
257
-
258
- /* Releases a Py_buffer obtained from getbuffer ParseTuple's "s*". */
259
- PyAPI_FUNC(void) PyBuffer_Release(Py_buffer *view);
260
-
261
- /* ==== Iterators ================================================ */
262
-
263
- #define PyIter_Check(obj) \
264
- ((obj)->ob_type->tp_iternext != NULL && \
265
- (obj)->ob_type->tp_iternext != &_PyObject_NextNotImplemented)
266
-
267
- /* === Number Protocol ================================================== */
268
-
269
- #define PyIndex_Check(obj) \
270
- ((obj)->ob_type->tp_as_number != NULL && \
271
- (obj)->ob_type->tp_as_number->nb_index != NULL)
272
-
273
- /* === Sequence protocol ================================================ */
274
-
275
- /* Assume tp_as_sequence and sq_item exist and that 'i' does not
276
- need to be corrected for a negative index. */
277
- #define PySequence_ITEM(o, i)\
278
- ( Py_TYPE(o)->tp_as_sequence->sq_item(o, i) )
279
-
280
- #define PY_ITERSEARCH_COUNT 1
281
- #define PY_ITERSEARCH_INDEX 2
282
- #define PY_ITERSEARCH_CONTAINS 3
283
-
284
- /* Iterate over seq.
285
-
286
- Result depends on the operation:
287
-
288
- PY_ITERSEARCH_COUNT: return # of times obj appears in seq; -1 if
289
- error.
290
- PY_ITERSEARCH_INDEX: return 0-based index of first occurrence of
291
- obj in seq; set ValueError and return -1 if none found;
292
- also return -1 on error.
293
- PY_ITERSEARCH_CONTAINS: return 1 if obj in seq, else 0; -1 on
294
- error. */
295
- PyAPI_FUNC(Py_ssize_t) _PySequence_IterSearch(PyObject *seq,
296
- PyObject *obj, int operation);
297
-
298
- /* === Mapping protocol ================================================= */
299
-
300
- PyAPI_FUNC(int) _PyObject_RealIsInstance(PyObject *inst, PyObject *cls);
301
-
302
- PyAPI_FUNC(int) _PyObject_RealIsSubclass(PyObject *derived, PyObject *cls);
303
-
304
- PyAPI_FUNC(char *const *) _PySequence_BytesToCharpArray(PyObject* self);
305
-
306
- PyAPI_FUNC(void) _Py_FreeCharPArray(char *const array[]);
307
-
308
- /* For internal use by buffer API functions */
309
- PyAPI_FUNC(void) _Py_add_one_to_index_F(int nd, Py_ssize_t *index,
310
- const Py_ssize_t *shape);
311
- PyAPI_FUNC(void) _Py_add_one_to_index_C(int nd, Py_ssize_t *index,
312
- const Py_ssize_t *shape);
313
-
314
- /* Convert Python int to Py_ssize_t. Do nothing if the argument is None. */
315
- PyAPI_FUNC(int) _Py_convert_optional_to_ssize_t(PyObject *, void *);
316
-
317
- #ifdef __cplusplus
318
- }
319
- #endif
@@ -1,94 +0,0 @@
1
- #ifndef Py_CPYTHON_DICTOBJECT_H
2
- # error "this header file must not be included directly"
3
- #endif
4
-
5
- #ifdef __cplusplus
6
- extern "C" {
7
- #endif
8
-
9
- typedef struct _dictkeysobject PyDictKeysObject;
10
-
11
- /* The ma_values pointer is NULL for a combined table
12
- * or points to an array of PyObject* for a split table
13
- */
14
- typedef struct {
15
- PyObject_HEAD
16
-
17
- /* Number of items in the dictionary */
18
- Py_ssize_t ma_used;
19
-
20
- /* Dictionary version: globally unique, value change each time
21
- the dictionary is modified */
22
- uint64_t ma_version_tag;
23
-
24
- PyDictKeysObject *ma_keys;
25
-
26
- /* If ma_values is NULL, the table is "combined": keys and values
27
- are stored in ma_keys.
28
-
29
- If ma_values is not NULL, the table is splitted:
30
- keys are stored in ma_keys and values are stored in ma_values */
31
- PyObject **ma_values;
32
- } PyDictObject;
33
-
34
- PyAPI_FUNC(PyObject *) _PyDict_GetItem_KnownHash(PyObject *mp, PyObject *key,
35
- Py_hash_t hash);
36
- PyAPI_FUNC(PyObject *) _PyDict_GetItemIdWithError(PyObject *dp,
37
- struct _Py_Identifier *key);
38
- PyAPI_FUNC(PyObject *) _PyDict_GetItemStringWithError(PyObject *, const char *);
39
- PyAPI_FUNC(PyObject *) PyDict_SetDefault(
40
- PyObject *mp, PyObject *key, PyObject *defaultobj);
41
- PyAPI_FUNC(int) _PyDict_SetItem_KnownHash(PyObject *mp, PyObject *key,
42
- PyObject *item, Py_hash_t hash);
43
- PyAPI_FUNC(int) _PyDict_DelItem_KnownHash(PyObject *mp, PyObject *key,
44
- Py_hash_t hash);
45
- PyAPI_FUNC(int) _PyDict_DelItemIf(PyObject *mp, PyObject *key,
46
- int (*predicate)(PyObject *value));
47
- PyDictKeysObject *_PyDict_NewKeysForClass(void);
48
- PyAPI_FUNC(PyObject *) PyObject_GenericGetDict(PyObject *, void *);
49
- PyAPI_FUNC(int) _PyDict_Next(
50
- PyObject *mp, Py_ssize_t *pos, PyObject **key, PyObject **value, Py_hash_t *hash);
51
-
52
- /* Get the number of items of a dictionary. */
53
- #define PyDict_GET_SIZE(mp) (assert(PyDict_Check(mp)),((PyDictObject *)mp)->ma_used)
54
- PyAPI_FUNC(int) _PyDict_Contains(PyObject *mp, PyObject *key, Py_hash_t hash);
55
- PyAPI_FUNC(PyObject *) _PyDict_NewPresized(Py_ssize_t minused);
56
- PyAPI_FUNC(void) _PyDict_MaybeUntrack(PyObject *mp);
57
- PyAPI_FUNC(int) _PyDict_HasOnlyStringKeys(PyObject *mp);
58
- Py_ssize_t _PyDict_KeysSize(PyDictKeysObject *keys);
59
- PyAPI_FUNC(Py_ssize_t) _PyDict_SizeOf(PyDictObject *);
60
- PyAPI_FUNC(PyObject *) _PyDict_Pop(PyObject *, PyObject *, PyObject *);
61
- PyObject *_PyDict_Pop_KnownHash(PyObject *, PyObject *, Py_hash_t, PyObject *);
62
- PyObject *_PyDict_FromKeys(PyObject *, PyObject *, PyObject *);
63
- #define _PyDict_HasSplitTable(d) ((d)->ma_values != NULL)
64
-
65
- PyAPI_FUNC(int) PyDict_ClearFreeList(void);
66
-
67
- /* Like PyDict_Merge, but override can be 0, 1 or 2. If override is 0,
68
- the first occurrence of a key wins, if override is 1, the last occurrence
69
- of a key wins, if override is 2, a KeyError with conflicting key as
70
- argument is raised.
71
- */
72
- PyAPI_FUNC(int) _PyDict_MergeEx(PyObject *mp, PyObject *other, int override);
73
- PyAPI_FUNC(PyObject *) _PyDict_GetItemId(PyObject *dp, struct _Py_Identifier *key);
74
- PyAPI_FUNC(int) _PyDict_SetItemId(PyObject *dp, struct _Py_Identifier *key, PyObject *item);
75
-
76
- PyAPI_FUNC(int) _PyDict_DelItemId(PyObject *mp, struct _Py_Identifier *key);
77
- PyAPI_FUNC(void) _PyDict_DebugMallocStats(FILE *out);
78
-
79
- int _PyObjectDict_SetItem(PyTypeObject *tp, PyObject **dictptr, PyObject *name, PyObject *value);
80
- PyObject *_PyDict_LoadGlobal(PyDictObject *, PyDictObject *, PyObject *);
81
-
82
- /* _PyDictView */
83
-
84
- typedef struct {
85
- PyObject_HEAD
86
- PyDictObject *dv_dict;
87
- } _PyDictViewObject;
88
-
89
- PyAPI_FUNC(PyObject *) _PyDictView_New(PyObject *, PyTypeObject *);
90
- PyAPI_FUNC(PyObject *) _PyDictView_Intersect(PyObject* self, PyObject *other);
91
-
92
- #ifdef __cplusplus
93
- }
94
- #endif
@@ -1,24 +0,0 @@
1
- #ifndef Py_CPYTHON_FILEOBJECT_H
2
- # error "this header file must not be included directly"
3
- #endif
4
-
5
- #ifdef __cplusplus
6
- extern "C" {
7
- #endif
8
-
9
- PyAPI_FUNC(char *) Py_UniversalNewlineFgets(char *, int, FILE*, PyObject *);
10
-
11
- /* The std printer acts as a preliminary sys.stderr until the new io
12
- infrastructure is in place. */
13
- PyAPI_FUNC(PyObject *) PyFile_NewStdPrinter(int);
14
- PyAPI_DATA(PyTypeObject) PyStdPrinter_Type;
15
-
16
- typedef PyObject * (*Py_OpenCodeHookFunction)(PyObject *, void *);
17
-
18
- PyAPI_FUNC(PyObject *) PyFile_OpenCode(const char *utf8path);
19
- PyAPI_FUNC(PyObject *) PyFile_OpenCodeObject(PyObject *path);
20
- PyAPI_FUNC(int) PyFile_SetOpenCodeHook(Py_OpenCodeHookFunction hook, void *userData);
21
-
22
- #ifdef __cplusplus
23
- }
24
- #endif