@plone/volto 14.0.2 → 14.1.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 (212) hide show
  1. package/CHANGELOG.md +22 -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/src/actions/vocabularies/vocabularies.js +14 -3
  29. package/src/components/index.js +1 -0
  30. package/src/components/manage/Blocks/HeroImageLeft/Edit.jsx +1 -1
  31. package/src/components/manage/Blocks/Listing/getAsyncData.js +1 -1
  32. package/src/components/manage/Blocks/Text/Edit.jsx +19 -0
  33. package/src/components/manage/Form/Form.jsx +11 -1
  34. package/src/components/manage/Form/UndoToolbar.jsx +78 -0
  35. package/src/components/manage/Widgets/AlignWidget.stories.jsx +5 -21
  36. package/src/components/manage/Widgets/ArrayWidget.jsx +83 -101
  37. package/src/components/manage/Widgets/ArrayWidget.stories.jsx +29 -64
  38. package/src/components/manage/Widgets/CheckboxWidget.stories.jsx +5 -22
  39. package/src/components/manage/Widgets/DatetimeWidget.jsx +65 -74
  40. package/src/components/manage/Widgets/DatetimeWidget.stories.jsx +7 -23
  41. package/src/components/manage/Widgets/DatetimeWidget.test.jsx +17 -15
  42. package/src/components/manage/Widgets/EmailWidget.stories.jsx +5 -22
  43. package/src/components/manage/Widgets/FileWidget.stories.jsx +5 -22
  44. package/src/components/manage/Widgets/NumberWidget.stories.jsx +5 -23
  45. package/src/components/manage/Widgets/ObjectBrowserWidget.stories.js +24 -32
  46. package/src/components/manage/Widgets/ObjectListWidget.stories.js +44 -44
  47. package/src/components/manage/Widgets/ObjectWidget.stories.jsx +13 -28
  48. package/src/components/manage/Widgets/PasswordWidget.stories.jsx +5 -22
  49. package/src/components/manage/Widgets/QueryWidget.jsx +2 -2
  50. package/src/components/manage/Widgets/QueryWidget.stories.jsx +1637 -22
  51. package/src/components/manage/Widgets/SelectAutoComplete.jsx +79 -48
  52. package/src/components/manage/Widgets/SelectAutoComplete.test.jsx +16 -0
  53. package/src/components/manage/Widgets/SelectAutocompleteWidget.stories.jsx +161 -0
  54. package/src/components/manage/Widgets/SelectUtils.js +90 -30
  55. package/src/components/manage/Widgets/SelectUtils.test.jsx +76 -1
  56. package/src/components/manage/Widgets/SelectWidget.jsx +26 -37
  57. package/src/components/manage/Widgets/SelectWidget.stories.jsx +96 -28
  58. package/src/components/manage/Widgets/TextWidget.stories.jsx +5 -22
  59. package/src/components/manage/Widgets/TextareaWidget.stories.jsx +5 -22
  60. package/src/components/manage/Widgets/TokenWidget.jsx +19 -17
  61. package/src/components/manage/Widgets/TokenWidget.stories.jsx +141 -0
  62. package/src/components/manage/Widgets/UrlWidget.stories.jsx +5 -21
  63. package/src/components/manage/Widgets/VocabularyTermsWidget.stories.js +27 -64
  64. package/src/components/manage/Widgets/WysiwygWidget.stories.jsx +5 -22
  65. package/src/components/manage/Widgets/story.jsx +38 -0
  66. package/src/components/theme/ContactForm/ContactForm.jsx +1 -0
  67. package/src/components/theme/ContactForm/ContactForm.stories.jsx +126 -0
  68. package/src/components/theme/CorsError/CorsError.jsx +2 -2
  69. package/src/config/Loadables.jsx +2 -0
  70. package/src/config/index.js +1 -0
  71. package/src/helpers/UndoManager/useUndoManager.js +102 -0
  72. package/src/helpers/index.js +1 -0
  73. package/src/reducers/vocabularies/vocabularies.js +13 -2
  74. package/src/store.js +1 -1
  75. package/src/storybook.jsx +55 -0
  76. package/theme/themes/pastanaga/extras/time-picker-overrides.less +1 -1
  77. package/include/python3.8/Python-ast.h +0 -715
  78. package/include/python3.8/Python.h +0 -160
  79. package/include/python3.8/abstract.h +0 -844
  80. package/include/python3.8/asdl.h +0 -46
  81. package/include/python3.8/ast.h +0 -37
  82. package/include/python3.8/bitset.h +0 -23
  83. package/include/python3.8/bltinmodule.h +0 -14
  84. package/include/python3.8/boolobject.h +0 -34
  85. package/include/python3.8/bytearrayobject.h +0 -62
  86. package/include/python3.8/bytes_methods.h +0 -69
  87. package/include/python3.8/bytesobject.h +0 -224
  88. package/include/python3.8/cellobject.h +0 -29
  89. package/include/python3.8/ceval.h +0 -231
  90. package/include/python3.8/classobject.h +0 -59
  91. package/include/python3.8/code.h +0 -180
  92. package/include/python3.8/codecs.h +0 -240
  93. package/include/python3.8/compile.h +0 -106
  94. package/include/python3.8/complexobject.h +0 -69
  95. package/include/python3.8/context.h +0 -84
  96. package/include/python3.8/cpython/abstract.h +0 -319
  97. package/include/python3.8/cpython/dictobject.h +0 -94
  98. package/include/python3.8/cpython/fileobject.h +0 -24
  99. package/include/python3.8/cpython/initconfig.h +0 -434
  100. package/include/python3.8/cpython/interpreteridobject.h +0 -19
  101. package/include/python3.8/cpython/object.h +0 -470
  102. package/include/python3.8/cpython/objimpl.h +0 -113
  103. package/include/python3.8/cpython/pyerrors.h +0 -188
  104. package/include/python3.8/cpython/pylifecycle.h +0 -78
  105. package/include/python3.8/cpython/pymem.h +0 -108
  106. package/include/python3.8/cpython/pystate.h +0 -252
  107. package/include/python3.8/cpython/sysmodule.h +0 -21
  108. package/include/python3.8/cpython/traceback.h +0 -22
  109. package/include/python3.8/cpython/tupleobject.h +0 -36
  110. package/include/python3.8/cpython/unicodeobject.h +0 -1239
  111. package/include/python3.8/datetime.h +0 -259
  112. package/include/python3.8/descrobject.h +0 -108
  113. package/include/python3.8/dictobject.h +0 -94
  114. package/include/python3.8/dtoa.h +0 -19
  115. package/include/python3.8/dynamic_annotations.h +0 -499
  116. package/include/python3.8/enumobject.h +0 -17
  117. package/include/python3.8/errcode.h +0 -38
  118. package/include/python3.8/eval.h +0 -37
  119. package/include/python3.8/fileobject.h +0 -49
  120. package/include/python3.8/fileutils.h +0 -185
  121. package/include/python3.8/floatobject.h +0 -130
  122. package/include/python3.8/frameobject.h +0 -92
  123. package/include/python3.8/funcobject.h +0 -104
  124. package/include/python3.8/genobject.h +0 -109
  125. package/include/python3.8/graminit.h +0 -94
  126. package/include/python3.8/grammar.h +0 -77
  127. package/include/python3.8/import.h +0 -149
  128. package/include/python3.8/internal/pycore_accu.h +0 -39
  129. package/include/python3.8/internal/pycore_atomic.h +0 -558
  130. package/include/python3.8/internal/pycore_ceval.h +0 -37
  131. package/include/python3.8/internal/pycore_code.h +0 -27
  132. package/include/python3.8/internal/pycore_condvar.h +0 -95
  133. package/include/python3.8/internal/pycore_context.h +0 -42
  134. package/include/python3.8/internal/pycore_fileutils.h +0 -54
  135. package/include/python3.8/internal/pycore_getopt.h +0 -22
  136. package/include/python3.8/internal/pycore_gil.h +0 -50
  137. package/include/python3.8/internal/pycore_hamt.h +0 -116
  138. package/include/python3.8/internal/pycore_initconfig.h +0 -166
  139. package/include/python3.8/internal/pycore_object.h +0 -81
  140. package/include/python3.8/internal/pycore_pathconfig.h +0 -75
  141. package/include/python3.8/internal/pycore_pyerrors.h +0 -62
  142. package/include/python3.8/internal/pycore_pyhash.h +0 -10
  143. package/include/python3.8/internal/pycore_pylifecycle.h +0 -118
  144. package/include/python3.8/internal/pycore_pymem.h +0 -212
  145. package/include/python3.8/internal/pycore_pystate.h +0 -326
  146. package/include/python3.8/internal/pycore_traceback.h +0 -96
  147. package/include/python3.8/internal/pycore_tupleobject.h +0 -19
  148. package/include/python3.8/internal/pycore_warnings.h +0 -25
  149. package/include/python3.8/interpreteridobject.h +0 -17
  150. package/include/python3.8/intrcheck.h +0 -33
  151. package/include/python3.8/iterobject.h +0 -25
  152. package/include/python3.8/listobject.h +0 -81
  153. package/include/python3.8/longintrepr.h +0 -99
  154. package/include/python3.8/longobject.h +0 -242
  155. package/include/python3.8/marshal.h +0 -28
  156. package/include/python3.8/memoryobject.h +0 -72
  157. package/include/python3.8/methodobject.h +0 -131
  158. package/include/python3.8/modsupport.h +0 -248
  159. package/include/python3.8/moduleobject.h +0 -90
  160. package/include/python3.8/namespaceobject.h +0 -19
  161. package/include/python3.8/node.h +0 -48
  162. package/include/python3.8/object.h +0 -753
  163. package/include/python3.8/objimpl.h +0 -284
  164. package/include/python3.8/odictobject.h +0 -43
  165. package/include/python3.8/opcode.h +0 -148
  166. package/include/python3.8/osdefs.h +0 -51
  167. package/include/python3.8/osmodule.h +0 -17
  168. package/include/python3.8/parsetok.h +0 -110
  169. package/include/python3.8/patchlevel.h +0 -35
  170. package/include/python3.8/picklebufobject.h +0 -31
  171. package/include/python3.8/py_curses.h +0 -100
  172. package/include/python3.8/pyarena.h +0 -64
  173. package/include/python3.8/pycapsule.h +0 -59
  174. package/include/python3.8/pyconfig.h +0 -1665
  175. package/include/python3.8/pyctype.h +0 -39
  176. package/include/python3.8/pydebug.h +0 -40
  177. package/include/python3.8/pydtrace.h +0 -59
  178. package/include/python3.8/pydtrace_probes.h +0 -228
  179. package/include/python3.8/pyerrors.h +0 -335
  180. package/include/python3.8/pyexpat.h +0 -55
  181. package/include/python3.8/pyfpe.h +0 -12
  182. package/include/python3.8/pyhash.h +0 -145
  183. package/include/python3.8/pylifecycle.h +0 -75
  184. package/include/python3.8/pymacconfig.h +0 -102
  185. package/include/python3.8/pymacro.h +0 -106
  186. package/include/python3.8/pymath.h +0 -230
  187. package/include/python3.8/pymem.h +0 -150
  188. package/include/python3.8/pyport.h +0 -850
  189. package/include/python3.8/pystate.h +0 -136
  190. package/include/python3.8/pystrcmp.h +0 -23
  191. package/include/python3.8/pystrhex.h +0 -22
  192. package/include/python3.8/pystrtod.h +0 -45
  193. package/include/python3.8/pythonrun.h +0 -210
  194. package/include/python3.8/pythread.h +0 -161
  195. package/include/python3.8/pytime.h +0 -246
  196. package/include/python3.8/rangeobject.h +0 -27
  197. package/include/python3.8/setobject.h +0 -108
  198. package/include/python3.8/sliceobject.h +0 -65
  199. package/include/python3.8/structmember.h +0 -74
  200. package/include/python3.8/structseq.h +0 -49
  201. package/include/python3.8/symtable.h +0 -123
  202. package/include/python3.8/sysmodule.h +0 -41
  203. package/include/python3.8/token.h +0 -92
  204. package/include/python3.8/traceback.h +0 -28
  205. package/include/python3.8/tracemalloc.h +0 -38
  206. package/include/python3.8/tupleobject.h +0 -48
  207. package/include/python3.8/typeslots.h +0 -85
  208. package/include/python3.8/ucnhash.h +0 -36
  209. package/include/python3.8/unicodeobject.h +0 -1044
  210. package/include/python3.8/warnings.h +0 -67
  211. package/include/python3.8/weakrefobject.h +0 -86
  212. package/src/components/theme/ContactForm/ContactForm.stories.mdx +0 -39
@@ -1,185 +0,0 @@
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
-
16
- PyAPI_FUNC(char*) _Py_EncodeLocaleRaw(
17
- const wchar_t *text,
18
- size_t *error_pos);
19
- #endif
20
-
21
-
22
- #if !defined(Py_LIMITED_API) || Py_LIMITED_API+0 >= 0x03080000
23
- typedef enum {
24
- _Py_ERROR_UNKNOWN=0,
25
- _Py_ERROR_STRICT,
26
- _Py_ERROR_SURROGATEESCAPE,
27
- _Py_ERROR_REPLACE,
28
- _Py_ERROR_IGNORE,
29
- _Py_ERROR_BACKSLASHREPLACE,
30
- _Py_ERROR_SURROGATEPASS,
31
- _Py_ERROR_XMLCHARREFREPLACE,
32
- _Py_ERROR_OTHER
33
- } _Py_error_handler;
34
-
35
- PyAPI_FUNC(_Py_error_handler) _Py_GetErrorHandler(const char *errors);
36
-
37
- PyAPI_FUNC(int) _Py_DecodeLocaleEx(
38
- const char *arg,
39
- wchar_t **wstr,
40
- size_t *wlen,
41
- const char **reason,
42
- int current_locale,
43
- _Py_error_handler errors);
44
-
45
- PyAPI_FUNC(int) _Py_EncodeLocaleEx(
46
- const wchar_t *text,
47
- char **str,
48
- size_t *error_pos,
49
- const char **reason,
50
- int current_locale,
51
- _Py_error_handler errors);
52
- #endif
53
-
54
- #ifndef Py_LIMITED_API
55
- PyAPI_FUNC(PyObject *) _Py_device_encoding(int);
56
-
57
- #if defined(MS_WINDOWS) || defined(__APPLE__)
58
- /* On Windows, the count parameter of read() is an int (bpo-9015, bpo-9611).
59
- On macOS 10.13, read() and write() with more than INT_MAX bytes
60
- fail with EINVAL (bpo-24658). */
61
- # define _PY_READ_MAX INT_MAX
62
- # define _PY_WRITE_MAX INT_MAX
63
- #else
64
- /* write() should truncate the input to PY_SSIZE_T_MAX bytes,
65
- but it's safer to do it ourself to have a portable behaviour */
66
- # define _PY_READ_MAX PY_SSIZE_T_MAX
67
- # define _PY_WRITE_MAX PY_SSIZE_T_MAX
68
- #endif
69
-
70
- #ifdef MS_WINDOWS
71
- struct _Py_stat_struct {
72
- unsigned long st_dev;
73
- uint64_t st_ino;
74
- unsigned short st_mode;
75
- int st_nlink;
76
- int st_uid;
77
- int st_gid;
78
- unsigned long st_rdev;
79
- __int64 st_size;
80
- time_t st_atime;
81
- int st_atime_nsec;
82
- time_t st_mtime;
83
- int st_mtime_nsec;
84
- time_t st_ctime;
85
- int st_ctime_nsec;
86
- unsigned long st_file_attributes;
87
- unsigned long st_reparse_tag;
88
- };
89
- #else
90
- # define _Py_stat_struct stat
91
- #endif
92
-
93
- PyAPI_FUNC(int) _Py_fstat(
94
- int fd,
95
- struct _Py_stat_struct *status);
96
-
97
- PyAPI_FUNC(int) _Py_fstat_noraise(
98
- int fd,
99
- struct _Py_stat_struct *status);
100
-
101
- PyAPI_FUNC(int) _Py_stat(
102
- PyObject *path,
103
- struct stat *status);
104
-
105
- PyAPI_FUNC(int) _Py_open(
106
- const char *pathname,
107
- int flags);
108
-
109
- PyAPI_FUNC(int) _Py_open_noraise(
110
- const char *pathname,
111
- int flags);
112
-
113
- PyAPI_FUNC(FILE *) _Py_wfopen(
114
- const wchar_t *path,
115
- const wchar_t *mode);
116
-
117
- PyAPI_FUNC(FILE*) _Py_fopen(
118
- const char *pathname,
119
- const char *mode);
120
-
121
- PyAPI_FUNC(FILE*) _Py_fopen_obj(
122
- PyObject *path,
123
- const char *mode);
124
-
125
- PyAPI_FUNC(Py_ssize_t) _Py_read(
126
- int fd,
127
- void *buf,
128
- size_t count);
129
-
130
- PyAPI_FUNC(Py_ssize_t) _Py_write(
131
- int fd,
132
- const void *buf,
133
- size_t count);
134
-
135
- PyAPI_FUNC(Py_ssize_t) _Py_write_noraise(
136
- int fd,
137
- const void *buf,
138
- size_t count);
139
-
140
- #ifdef HAVE_READLINK
141
- PyAPI_FUNC(int) _Py_wreadlink(
142
- const wchar_t *path,
143
- wchar_t *buf,
144
- /* Number of characters of 'buf' buffer
145
- including the trailing NUL character */
146
- size_t buflen);
147
- #endif
148
-
149
- #ifdef HAVE_REALPATH
150
- PyAPI_FUNC(wchar_t*) _Py_wrealpath(
151
- const wchar_t *path,
152
- wchar_t *resolved_path,
153
- /* Number of characters of 'resolved_path' buffer
154
- including the trailing NUL character */
155
- size_t resolved_path_len);
156
- #endif
157
-
158
- PyAPI_FUNC(wchar_t*) _Py_wgetcwd(
159
- wchar_t *buf,
160
- /* Number of characters of 'buf' buffer
161
- including the trailing NUL character */
162
- size_t buflen);
163
-
164
- PyAPI_FUNC(int) _Py_get_inheritable(int fd);
165
-
166
- PyAPI_FUNC(int) _Py_set_inheritable(int fd, int inheritable,
167
- int *atomic_flag_works);
168
-
169
- PyAPI_FUNC(int) _Py_set_inheritable_async_safe(int fd, int inheritable,
170
- int *atomic_flag_works);
171
-
172
- PyAPI_FUNC(int) _Py_dup(int fd);
173
-
174
- #ifndef MS_WINDOWS
175
- PyAPI_FUNC(int) _Py_get_blocking(int fd);
176
-
177
- PyAPI_FUNC(int) _Py_set_blocking(int fd, int blocking);
178
- #endif /* !MS_WINDOWS */
179
-
180
- #endif /* Py_LIMITED_API */
181
-
182
- #ifdef __cplusplus
183
- }
184
- #endif
185
- #endif /* !Py_FILEUTILS_H */
@@ -1,130 +0,0 @@
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_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
- /* Needed for the old way for marshal to store a floating point number.
92
- Returns the string length copied into p, -1 on error.
93
- */
94
- PyAPI_FUNC(int) _PyFloat_Repr(double x, char *p, size_t len);
95
-
96
- /* Used to get the important decimal digits of a double */
97
- PyAPI_FUNC(int) _PyFloat_Digits(char *buf, double v, int *signum);
98
- PyAPI_FUNC(void) _PyFloat_DigitsInit(void);
99
-
100
- /* The unpack routines read 2, 4 or 8 bytes, starting at p. le is a bool
101
- * argument, true if the string is in little-endian format (exponent
102
- * last, at p+1, p+3 or p+7), false if big-endian (exponent first, at p).
103
- * Return value: The unpacked double. On error, this is -1.0 and
104
- * PyErr_Occurred() is true (and an exception is set, most likely
105
- * OverflowError). Note that on a non-IEEE platform this will refuse
106
- * to unpack a string that represents a NaN or infinity.
107
- */
108
- PyAPI_FUNC(double) _PyFloat_Unpack2(const unsigned char *p, int le);
109
- PyAPI_FUNC(double) _PyFloat_Unpack4(const unsigned char *p, int le);
110
- PyAPI_FUNC(double) _PyFloat_Unpack8(const unsigned char *p, int le);
111
-
112
- /* free list api */
113
- PyAPI_FUNC(int) PyFloat_ClearFreeList(void);
114
-
115
- PyAPI_FUNC(void) _PyFloat_DebugMallocStats(FILE* out);
116
-
117
- /* Format the object based on the format_spec, as defined in PEP 3101
118
- (Advanced String Formatting). */
119
- PyAPI_FUNC(int) _PyFloat_FormatAdvancedWriter(
120
- _PyUnicodeWriter *writer,
121
- PyObject *obj,
122
- PyObject *format_spec,
123
- Py_ssize_t start,
124
- Py_ssize_t end);
125
- #endif /* Py_LIMITED_API */
126
-
127
- #ifdef __cplusplus
128
- }
129
- #endif
130
- #endif /* !Py_FLOATOBJECT_H */
@@ -1,92 +0,0 @@
1
- /* Frame object interface */
2
-
3
- #ifndef Py_LIMITED_API
4
- #ifndef Py_FRAMEOBJECT_H
5
- #define Py_FRAMEOBJECT_H
6
- #ifdef __cplusplus
7
- extern "C" {
8
- #endif
9
-
10
- typedef struct {
11
- int b_type; /* what kind of block this is */
12
- int b_handler; /* where to jump to find handler */
13
- int b_level; /* value stack level to pop to */
14
- } PyTryBlock;
15
-
16
- typedef struct _frame {
17
- PyObject_VAR_HEAD
18
- struct _frame *f_back; /* previous frame, or NULL */
19
- PyCodeObject *f_code; /* code segment */
20
- PyObject *f_builtins; /* builtin symbol table (PyDictObject) */
21
- PyObject *f_globals; /* global symbol table (PyDictObject) */
22
- PyObject *f_locals; /* local symbol table (any mapping) */
23
- PyObject **f_valuestack; /* points after the last local */
24
- /* Next free slot in f_valuestack. Frame creation sets to f_valuestack.
25
- Frame evaluation usually NULLs it, but a frame that yields sets it
26
- to the current stack top. */
27
- PyObject **f_stacktop;
28
- PyObject *f_trace; /* Trace function */
29
- char f_trace_lines; /* Emit per-line trace events? */
30
- char f_trace_opcodes; /* Emit per-opcode trace events? */
31
-
32
- /* Borrowed reference to a generator, or NULL */
33
- PyObject *f_gen;
34
-
35
- int f_lasti; /* Last instruction if called */
36
- /* Call PyFrame_GetLineNumber() instead of reading this field
37
- directly. As of 2.3 f_lineno is only valid when tracing is
38
- active (i.e. when f_trace is set). At other times we use
39
- PyCode_Addr2Line to calculate the line from the current
40
- bytecode index. */
41
- int f_lineno; /* Current line number */
42
- int f_iblock; /* index in f_blockstack */
43
- char f_executing; /* whether the frame is still executing */
44
- PyTryBlock f_blockstack[CO_MAXBLOCKS]; /* for try and loop blocks */
45
- PyObject *f_localsplus[1]; /* locals+stack, dynamically sized */
46
- } PyFrameObject;
47
-
48
-
49
- /* Standard object interface */
50
-
51
- PyAPI_DATA(PyTypeObject) PyFrame_Type;
52
-
53
- #define PyFrame_Check(op) (Py_TYPE(op) == &PyFrame_Type)
54
-
55
- PyAPI_FUNC(PyFrameObject *) PyFrame_New(PyThreadState *, PyCodeObject *,
56
- PyObject *, PyObject *);
57
-
58
- /* only internal use */
59
- PyFrameObject* _PyFrame_New_NoTrack(PyThreadState *, PyCodeObject *,
60
- PyObject *, PyObject *);
61
-
62
-
63
- /* The rest of the interface is specific for frame objects */
64
-
65
- /* Block management functions */
66
-
67
- PyAPI_FUNC(void) PyFrame_BlockSetup(PyFrameObject *, int, int, int);
68
- PyAPI_FUNC(PyTryBlock *) PyFrame_BlockPop(PyFrameObject *);
69
-
70
- /* Extend the value stack */
71
-
72
- PyAPI_FUNC(PyObject **) PyFrame_ExtendStack(PyFrameObject *, int, int);
73
-
74
- /* Conversions between "fast locals" and locals in dictionary */
75
-
76
- PyAPI_FUNC(void) PyFrame_LocalsToFast(PyFrameObject *, int);
77
-
78
- PyAPI_FUNC(int) PyFrame_FastToLocalsWithError(PyFrameObject *f);
79
- PyAPI_FUNC(void) PyFrame_FastToLocals(PyFrameObject *);
80
-
81
- PyAPI_FUNC(int) PyFrame_ClearFreeList(void);
82
-
83
- PyAPI_FUNC(void) _PyFrame_DebugMallocStats(FILE *out);
84
-
85
- /* Return the line of code the frame is currently executing. */
86
- PyAPI_FUNC(int) PyFrame_GetLineNumber(PyFrameObject *);
87
-
88
- #ifdef __cplusplus
89
- }
90
- #endif
91
- #endif /* !Py_FRAMEOBJECT_H */
92
- #endif /* Py_LIMITED_API */
@@ -1,104 +0,0 @@
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
- /* Function objects and code objects should not be confused with each other:
11
- *
12
- * Function objects are created by the execution of the 'def' statement.
13
- * They reference a code object in their __code__ attribute, which is a
14
- * purely syntactic object, i.e. nothing more than a compiled version of some
15
- * source code lines. There is one code object per source code "fragment",
16
- * but each code object can be referenced by zero or many function objects
17
- * depending only on how many times the 'def' statement in the source was
18
- * executed so far.
19
- */
20
-
21
- typedef struct {
22
- PyObject_HEAD
23
- PyObject *func_code; /* A code object, the __code__ attribute */
24
- PyObject *func_globals; /* A dictionary (other mappings won't do) */
25
- PyObject *func_defaults; /* NULL or a tuple */
26
- PyObject *func_kwdefaults; /* NULL or a dict */
27
- PyObject *func_closure; /* NULL or a tuple of cell objects */
28
- PyObject *func_doc; /* The __doc__ attribute, can be anything */
29
- PyObject *func_name; /* The __name__ attribute, a string object */
30
- PyObject *func_dict; /* The __dict__ attribute, a dict or NULL */
31
- PyObject *func_weakreflist; /* List of weak references */
32
- PyObject *func_module; /* The __module__ attribute, can be anything */
33
- PyObject *func_annotations; /* Annotations, a dict or NULL */
34
- PyObject *func_qualname; /* The qualified name */
35
- vectorcallfunc vectorcall;
36
-
37
- /* Invariant:
38
- * func_closure contains the bindings for func_code->co_freevars, so
39
- * PyTuple_Size(func_closure) == PyCode_GetNumFree(func_code)
40
- * (func_closure may be NULL if PyCode_GetNumFree(func_code) == 0).
41
- */
42
- } PyFunctionObject;
43
-
44
- PyAPI_DATA(PyTypeObject) PyFunction_Type;
45
-
46
- #define PyFunction_Check(op) (Py_TYPE(op) == &PyFunction_Type)
47
-
48
- PyAPI_FUNC(PyObject *) PyFunction_New(PyObject *, PyObject *);
49
- PyAPI_FUNC(PyObject *) PyFunction_NewWithQualName(PyObject *, PyObject *, PyObject *);
50
- PyAPI_FUNC(PyObject *) PyFunction_GetCode(PyObject *);
51
- PyAPI_FUNC(PyObject *) PyFunction_GetGlobals(PyObject *);
52
- PyAPI_FUNC(PyObject *) PyFunction_GetModule(PyObject *);
53
- PyAPI_FUNC(PyObject *) PyFunction_GetDefaults(PyObject *);
54
- PyAPI_FUNC(int) PyFunction_SetDefaults(PyObject *, PyObject *);
55
- PyAPI_FUNC(PyObject *) PyFunction_GetKwDefaults(PyObject *);
56
- PyAPI_FUNC(int) PyFunction_SetKwDefaults(PyObject *, PyObject *);
57
- PyAPI_FUNC(PyObject *) PyFunction_GetClosure(PyObject *);
58
- PyAPI_FUNC(int) PyFunction_SetClosure(PyObject *, PyObject *);
59
- PyAPI_FUNC(PyObject *) PyFunction_GetAnnotations(PyObject *);
60
- PyAPI_FUNC(int) PyFunction_SetAnnotations(PyObject *, PyObject *);
61
-
62
- #ifndef Py_LIMITED_API
63
- PyAPI_FUNC(PyObject *) _PyFunction_FastCallDict(
64
- PyObject *func,
65
- PyObject *const *args,
66
- Py_ssize_t nargs,
67
- PyObject *kwargs);
68
-
69
- PyAPI_FUNC(PyObject *) _PyFunction_Vectorcall(
70
- PyObject *func,
71
- PyObject *const *stack,
72
- size_t nargsf,
73
- PyObject *kwnames);
74
- #endif
75
-
76
- /* Macros for direct access to these values. Type checks are *not*
77
- done, so use with care. */
78
- #define PyFunction_GET_CODE(func) \
79
- (((PyFunctionObject *)func) -> func_code)
80
- #define PyFunction_GET_GLOBALS(func) \
81
- (((PyFunctionObject *)func) -> func_globals)
82
- #define PyFunction_GET_MODULE(func) \
83
- (((PyFunctionObject *)func) -> func_module)
84
- #define PyFunction_GET_DEFAULTS(func) \
85
- (((PyFunctionObject *)func) -> func_defaults)
86
- #define PyFunction_GET_KW_DEFAULTS(func) \
87
- (((PyFunctionObject *)func) -> func_kwdefaults)
88
- #define PyFunction_GET_CLOSURE(func) \
89
- (((PyFunctionObject *)func) -> func_closure)
90
- #define PyFunction_GET_ANNOTATIONS(func) \
91
- (((PyFunctionObject *)func) -> func_annotations)
92
-
93
- /* The classmethod and staticmethod types lives here, too */
94
- PyAPI_DATA(PyTypeObject) PyClassMethod_Type;
95
- PyAPI_DATA(PyTypeObject) PyStaticMethod_Type;
96
-
97
- PyAPI_FUNC(PyObject *) PyClassMethod_New(PyObject *);
98
- PyAPI_FUNC(PyObject *) PyStaticMethod_New(PyObject *);
99
-
100
- #ifdef __cplusplus
101
- }
102
- #endif
103
- #endif /* !Py_FUNCOBJECT_H */
104
- #endif /* Py_LIMITED_API */
@@ -1,109 +0,0 @@
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
-
13
- struct _frame; /* Avoid including frameobject.h */
14
-
15
- /* _PyGenObject_HEAD defines the initial segment of generator
16
- and coroutine objects. */
17
- #define _PyGenObject_HEAD(prefix) \
18
- PyObject_HEAD \
19
- /* Note: gi_frame can be NULL if the generator is "finished" */ \
20
- struct _frame *prefix##_frame; \
21
- /* True if generator is being executed. */ \
22
- char prefix##_running; \
23
- /* The code object backing the generator */ \
24
- PyObject *prefix##_code; \
25
- /* List of weak reference. */ \
26
- PyObject *prefix##_weakreflist; \
27
- /* Name of the generator. */ \
28
- PyObject *prefix##_name; \
29
- /* Qualified name of the generator. */ \
30
- PyObject *prefix##_qualname; \
31
- _PyErr_StackItem prefix##_exc_state;
32
-
33
- typedef struct {
34
- /* The gi_ prefix is intended to remind of generator-iterator. */
35
- _PyGenObject_HEAD(gi)
36
- } PyGenObject;
37
-
38
- PyAPI_DATA(PyTypeObject) PyGen_Type;
39
-
40
- #define PyGen_Check(op) PyObject_TypeCheck(op, &PyGen_Type)
41
- #define PyGen_CheckExact(op) (Py_TYPE(op) == &PyGen_Type)
42
-
43
- PyAPI_FUNC(PyObject *) PyGen_New(struct _frame *);
44
- PyAPI_FUNC(PyObject *) PyGen_NewWithQualName(struct _frame *,
45
- PyObject *name, PyObject *qualname);
46
- PyAPI_FUNC(int) PyGen_NeedsFinalizing(PyGenObject *);
47
- PyAPI_FUNC(int) _PyGen_SetStopIterationValue(PyObject *);
48
- PyAPI_FUNC(int) _PyGen_FetchStopIterationValue(PyObject **);
49
- PyAPI_FUNC(PyObject *) _PyGen_Send(PyGenObject *, PyObject *);
50
- PyObject *_PyGen_yf(PyGenObject *);
51
- PyAPI_FUNC(void) _PyGen_Finalize(PyObject *self);
52
-
53
- #ifndef Py_LIMITED_API
54
- typedef struct {
55
- _PyGenObject_HEAD(cr)
56
- PyObject *cr_origin;
57
- } PyCoroObject;
58
-
59
- PyAPI_DATA(PyTypeObject) PyCoro_Type;
60
- PyAPI_DATA(PyTypeObject) _PyCoroWrapper_Type;
61
-
62
- PyAPI_DATA(PyTypeObject) _PyAIterWrapper_Type;
63
-
64
- #define PyCoro_CheckExact(op) (Py_TYPE(op) == &PyCoro_Type)
65
- PyObject *_PyCoro_GetAwaitableIter(PyObject *o);
66
- PyAPI_FUNC(PyObject *) PyCoro_New(struct _frame *,
67
- PyObject *name, PyObject *qualname);
68
-
69
- /* Asynchronous Generators */
70
-
71
- typedef struct {
72
- _PyGenObject_HEAD(ag)
73
- PyObject *ag_finalizer;
74
-
75
- /* Flag is set to 1 when hooks set up by sys.set_asyncgen_hooks
76
- were called on the generator, to avoid calling them more
77
- than once. */
78
- int ag_hooks_inited;
79
-
80
- /* Flag is set to 1 when aclose() is called for the first time, or
81
- when a StopAsyncIteration exception is raised. */
82
- int ag_closed;
83
-
84
- int ag_running_async;
85
- } PyAsyncGenObject;
86
-
87
- PyAPI_DATA(PyTypeObject) PyAsyncGen_Type;
88
- PyAPI_DATA(PyTypeObject) _PyAsyncGenASend_Type;
89
- PyAPI_DATA(PyTypeObject) _PyAsyncGenWrappedValue_Type;
90
- PyAPI_DATA(PyTypeObject) _PyAsyncGenAThrow_Type;
91
-
92
- PyAPI_FUNC(PyObject *) PyAsyncGen_New(struct _frame *,
93
- PyObject *name, PyObject *qualname);
94
-
95
- #define PyAsyncGen_CheckExact(op) (Py_TYPE(op) == &PyAsyncGen_Type)
96
-
97
- PyObject *_PyAsyncGenValueWrapperNew(PyObject *);
98
-
99
- int PyAsyncGen_ClearFreeLists(void);
100
-
101
- #endif
102
-
103
- #undef _PyGenObject_HEAD
104
-
105
- #ifdef __cplusplus
106
- }
107
- #endif
108
- #endif /* !Py_GENOBJECT_H */
109
- #endif /* Py_LIMITED_API */