@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.
- package/CHANGELOG.md +41 -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/Add/Add.jsx +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/Edit/Edit.jsx +1 -0
- package/src/components/manage/Form/Form.jsx +32 -6
- package/src/components/manage/Form/UndoToolbar.jsx +78 -0
- package/src/components/manage/Multilingual/TranslationObject.jsx +1 -0
- package/src/components/manage/Widgets/AlignWidget.stories.jsx +5 -21
- package/src/components/manage/Widgets/ArrayWidget.jsx +88 -88
- package/src/components/manage/Widgets/ArrayWidget.stories.jsx +37 -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/Blocks.jsx +8 -1
- package/src/config/Loadables.jsx +2 -0
- package/src/config/index.js +3 -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/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,259 +0,0 @@
|
|
|
1
|
-
/* datetime.h
|
|
2
|
-
*/
|
|
3
|
-
#ifndef Py_LIMITED_API
|
|
4
|
-
#ifndef DATETIME_H
|
|
5
|
-
#define DATETIME_H
|
|
6
|
-
#ifdef __cplusplus
|
|
7
|
-
extern "C" {
|
|
8
|
-
#endif
|
|
9
|
-
|
|
10
|
-
/* Fields are packed into successive bytes, each viewed as unsigned and
|
|
11
|
-
* big-endian, unless otherwise noted:
|
|
12
|
-
*
|
|
13
|
-
* byte offset
|
|
14
|
-
* 0 year 2 bytes, 1-9999
|
|
15
|
-
* 2 month 1 byte, 1-12
|
|
16
|
-
* 3 day 1 byte, 1-31
|
|
17
|
-
* 4 hour 1 byte, 0-23
|
|
18
|
-
* 5 minute 1 byte, 0-59
|
|
19
|
-
* 6 second 1 byte, 0-59
|
|
20
|
-
* 7 usecond 3 bytes, 0-999999
|
|
21
|
-
* 10
|
|
22
|
-
*/
|
|
23
|
-
|
|
24
|
-
/* # of bytes for year, month, and day. */
|
|
25
|
-
#define _PyDateTime_DATE_DATASIZE 4
|
|
26
|
-
|
|
27
|
-
/* # of bytes for hour, minute, second, and usecond. */
|
|
28
|
-
#define _PyDateTime_TIME_DATASIZE 6
|
|
29
|
-
|
|
30
|
-
/* # of bytes for year, month, day, hour, minute, second, and usecond. */
|
|
31
|
-
#define _PyDateTime_DATETIME_DATASIZE 10
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
typedef struct
|
|
35
|
-
{
|
|
36
|
-
PyObject_HEAD
|
|
37
|
-
Py_hash_t hashcode; /* -1 when unknown */
|
|
38
|
-
int days; /* -MAX_DELTA_DAYS <= days <= MAX_DELTA_DAYS */
|
|
39
|
-
int seconds; /* 0 <= seconds < 24*3600 is invariant */
|
|
40
|
-
int microseconds; /* 0 <= microseconds < 1000000 is invariant */
|
|
41
|
-
} PyDateTime_Delta;
|
|
42
|
-
|
|
43
|
-
typedef struct
|
|
44
|
-
{
|
|
45
|
-
PyObject_HEAD /* a pure abstract base class */
|
|
46
|
-
} PyDateTime_TZInfo;
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
/* The datetime and time types have hashcodes, and an optional tzinfo member,
|
|
50
|
-
* present if and only if hastzinfo is true.
|
|
51
|
-
*/
|
|
52
|
-
#define _PyTZINFO_HEAD \
|
|
53
|
-
PyObject_HEAD \
|
|
54
|
-
Py_hash_t hashcode; \
|
|
55
|
-
char hastzinfo; /* boolean flag */
|
|
56
|
-
|
|
57
|
-
/* No _PyDateTime_BaseTZInfo is allocated; it's just to have something
|
|
58
|
-
* convenient to cast to, when getting at the hastzinfo member of objects
|
|
59
|
-
* starting with _PyTZINFO_HEAD.
|
|
60
|
-
*/
|
|
61
|
-
typedef struct
|
|
62
|
-
{
|
|
63
|
-
_PyTZINFO_HEAD
|
|
64
|
-
} _PyDateTime_BaseTZInfo;
|
|
65
|
-
|
|
66
|
-
/* All time objects are of PyDateTime_TimeType, but that can be allocated
|
|
67
|
-
* in two ways, with or without a tzinfo member. Without is the same as
|
|
68
|
-
* tzinfo == None, but consumes less memory. _PyDateTime_BaseTime is an
|
|
69
|
-
* internal struct used to allocate the right amount of space for the
|
|
70
|
-
* "without" case.
|
|
71
|
-
*/
|
|
72
|
-
#define _PyDateTime_TIMEHEAD \
|
|
73
|
-
_PyTZINFO_HEAD \
|
|
74
|
-
unsigned char data[_PyDateTime_TIME_DATASIZE];
|
|
75
|
-
|
|
76
|
-
typedef struct
|
|
77
|
-
{
|
|
78
|
-
_PyDateTime_TIMEHEAD
|
|
79
|
-
} _PyDateTime_BaseTime; /* hastzinfo false */
|
|
80
|
-
|
|
81
|
-
typedef struct
|
|
82
|
-
{
|
|
83
|
-
_PyDateTime_TIMEHEAD
|
|
84
|
-
unsigned char fold;
|
|
85
|
-
PyObject *tzinfo;
|
|
86
|
-
} PyDateTime_Time; /* hastzinfo true */
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
/* All datetime objects are of PyDateTime_DateTimeType, but that can be
|
|
90
|
-
* allocated in two ways too, just like for time objects above. In addition,
|
|
91
|
-
* the plain date type is a base class for datetime, so it must also have
|
|
92
|
-
* a hastzinfo member (although it's unused there).
|
|
93
|
-
*/
|
|
94
|
-
typedef struct
|
|
95
|
-
{
|
|
96
|
-
_PyTZINFO_HEAD
|
|
97
|
-
unsigned char data[_PyDateTime_DATE_DATASIZE];
|
|
98
|
-
} PyDateTime_Date;
|
|
99
|
-
|
|
100
|
-
#define _PyDateTime_DATETIMEHEAD \
|
|
101
|
-
_PyTZINFO_HEAD \
|
|
102
|
-
unsigned char data[_PyDateTime_DATETIME_DATASIZE];
|
|
103
|
-
|
|
104
|
-
typedef struct
|
|
105
|
-
{
|
|
106
|
-
_PyDateTime_DATETIMEHEAD
|
|
107
|
-
} _PyDateTime_BaseDateTime; /* hastzinfo false */
|
|
108
|
-
|
|
109
|
-
typedef struct
|
|
110
|
-
{
|
|
111
|
-
_PyDateTime_DATETIMEHEAD
|
|
112
|
-
unsigned char fold;
|
|
113
|
-
PyObject *tzinfo;
|
|
114
|
-
} PyDateTime_DateTime; /* hastzinfo true */
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
/* Apply for date and datetime instances. */
|
|
118
|
-
#define PyDateTime_GET_YEAR(o) ((((PyDateTime_Date*)o)->data[0] << 8) | \
|
|
119
|
-
((PyDateTime_Date*)o)->data[1])
|
|
120
|
-
#define PyDateTime_GET_MONTH(o) (((PyDateTime_Date*)o)->data[2])
|
|
121
|
-
#define PyDateTime_GET_DAY(o) (((PyDateTime_Date*)o)->data[3])
|
|
122
|
-
|
|
123
|
-
#define PyDateTime_DATE_GET_HOUR(o) (((PyDateTime_DateTime*)o)->data[4])
|
|
124
|
-
#define PyDateTime_DATE_GET_MINUTE(o) (((PyDateTime_DateTime*)o)->data[5])
|
|
125
|
-
#define PyDateTime_DATE_GET_SECOND(o) (((PyDateTime_DateTime*)o)->data[6])
|
|
126
|
-
#define PyDateTime_DATE_GET_MICROSECOND(o) \
|
|
127
|
-
((((PyDateTime_DateTime*)o)->data[7] << 16) | \
|
|
128
|
-
(((PyDateTime_DateTime*)o)->data[8] << 8) | \
|
|
129
|
-
((PyDateTime_DateTime*)o)->data[9])
|
|
130
|
-
#define PyDateTime_DATE_GET_FOLD(o) (((PyDateTime_DateTime*)o)->fold)
|
|
131
|
-
|
|
132
|
-
/* Apply for time instances. */
|
|
133
|
-
#define PyDateTime_TIME_GET_HOUR(o) (((PyDateTime_Time*)o)->data[0])
|
|
134
|
-
#define PyDateTime_TIME_GET_MINUTE(o) (((PyDateTime_Time*)o)->data[1])
|
|
135
|
-
#define PyDateTime_TIME_GET_SECOND(o) (((PyDateTime_Time*)o)->data[2])
|
|
136
|
-
#define PyDateTime_TIME_GET_MICROSECOND(o) \
|
|
137
|
-
((((PyDateTime_Time*)o)->data[3] << 16) | \
|
|
138
|
-
(((PyDateTime_Time*)o)->data[4] << 8) | \
|
|
139
|
-
((PyDateTime_Time*)o)->data[5])
|
|
140
|
-
#define PyDateTime_TIME_GET_FOLD(o) (((PyDateTime_Time*)o)->fold)
|
|
141
|
-
|
|
142
|
-
/* Apply for time delta instances */
|
|
143
|
-
#define PyDateTime_DELTA_GET_DAYS(o) (((PyDateTime_Delta*)o)->days)
|
|
144
|
-
#define PyDateTime_DELTA_GET_SECONDS(o) (((PyDateTime_Delta*)o)->seconds)
|
|
145
|
-
#define PyDateTime_DELTA_GET_MICROSECONDS(o) \
|
|
146
|
-
(((PyDateTime_Delta*)o)->microseconds)
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
/* Define structure for C API. */
|
|
150
|
-
typedef struct {
|
|
151
|
-
/* type objects */
|
|
152
|
-
PyTypeObject *DateType;
|
|
153
|
-
PyTypeObject *DateTimeType;
|
|
154
|
-
PyTypeObject *TimeType;
|
|
155
|
-
PyTypeObject *DeltaType;
|
|
156
|
-
PyTypeObject *TZInfoType;
|
|
157
|
-
|
|
158
|
-
/* singletons */
|
|
159
|
-
PyObject *TimeZone_UTC;
|
|
160
|
-
|
|
161
|
-
/* constructors */
|
|
162
|
-
PyObject *(*Date_FromDate)(int, int, int, PyTypeObject*);
|
|
163
|
-
PyObject *(*DateTime_FromDateAndTime)(int, int, int, int, int, int, int,
|
|
164
|
-
PyObject*, PyTypeObject*);
|
|
165
|
-
PyObject *(*Time_FromTime)(int, int, int, int, PyObject*, PyTypeObject*);
|
|
166
|
-
PyObject *(*Delta_FromDelta)(int, int, int, int, PyTypeObject*);
|
|
167
|
-
PyObject *(*TimeZone_FromTimeZone)(PyObject *offset, PyObject *name);
|
|
168
|
-
|
|
169
|
-
/* constructors for the DB API */
|
|
170
|
-
PyObject *(*DateTime_FromTimestamp)(PyObject*, PyObject*, PyObject*);
|
|
171
|
-
PyObject *(*Date_FromTimestamp)(PyObject*, PyObject*);
|
|
172
|
-
|
|
173
|
-
/* PEP 495 constructors */
|
|
174
|
-
PyObject *(*DateTime_FromDateAndTimeAndFold)(int, int, int, int, int, int, int,
|
|
175
|
-
PyObject*, int, PyTypeObject*);
|
|
176
|
-
PyObject *(*Time_FromTimeAndFold)(int, int, int, int, PyObject*, int, PyTypeObject*);
|
|
177
|
-
|
|
178
|
-
} PyDateTime_CAPI;
|
|
179
|
-
|
|
180
|
-
#define PyDateTime_CAPSULE_NAME "datetime.datetime_CAPI"
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
/* This block is only used as part of the public API and should not be
|
|
184
|
-
* included in _datetimemodule.c, which does not use the C API capsule.
|
|
185
|
-
* See bpo-35081 for more details.
|
|
186
|
-
* */
|
|
187
|
-
#ifndef _PY_DATETIME_IMPL
|
|
188
|
-
/* Define global variable for the C API and a macro for setting it. */
|
|
189
|
-
static PyDateTime_CAPI *PyDateTimeAPI = NULL;
|
|
190
|
-
|
|
191
|
-
#define PyDateTime_IMPORT \
|
|
192
|
-
PyDateTimeAPI = (PyDateTime_CAPI *)PyCapsule_Import(PyDateTime_CAPSULE_NAME, 0)
|
|
193
|
-
|
|
194
|
-
/* Macro for access to the UTC singleton */
|
|
195
|
-
#define PyDateTime_TimeZone_UTC PyDateTimeAPI->TimeZone_UTC
|
|
196
|
-
|
|
197
|
-
/* Macros for type checking when not building the Python core. */
|
|
198
|
-
#define PyDate_Check(op) PyObject_TypeCheck(op, PyDateTimeAPI->DateType)
|
|
199
|
-
#define PyDate_CheckExact(op) (Py_TYPE(op) == PyDateTimeAPI->DateType)
|
|
200
|
-
|
|
201
|
-
#define PyDateTime_Check(op) PyObject_TypeCheck(op, PyDateTimeAPI->DateTimeType)
|
|
202
|
-
#define PyDateTime_CheckExact(op) (Py_TYPE(op) == PyDateTimeAPI->DateTimeType)
|
|
203
|
-
|
|
204
|
-
#define PyTime_Check(op) PyObject_TypeCheck(op, PyDateTimeAPI->TimeType)
|
|
205
|
-
#define PyTime_CheckExact(op) (Py_TYPE(op) == PyDateTimeAPI->TimeType)
|
|
206
|
-
|
|
207
|
-
#define PyDelta_Check(op) PyObject_TypeCheck(op, PyDateTimeAPI->DeltaType)
|
|
208
|
-
#define PyDelta_CheckExact(op) (Py_TYPE(op) == PyDateTimeAPI->DeltaType)
|
|
209
|
-
|
|
210
|
-
#define PyTZInfo_Check(op) PyObject_TypeCheck(op, PyDateTimeAPI->TZInfoType)
|
|
211
|
-
#define PyTZInfo_CheckExact(op) (Py_TYPE(op) == PyDateTimeAPI->TZInfoType)
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
/* Macros for accessing constructors in a simplified fashion. */
|
|
215
|
-
#define PyDate_FromDate(year, month, day) \
|
|
216
|
-
PyDateTimeAPI->Date_FromDate(year, month, day, PyDateTimeAPI->DateType)
|
|
217
|
-
|
|
218
|
-
#define PyDateTime_FromDateAndTime(year, month, day, hour, min, sec, usec) \
|
|
219
|
-
PyDateTimeAPI->DateTime_FromDateAndTime(year, month, day, hour, \
|
|
220
|
-
min, sec, usec, Py_None, PyDateTimeAPI->DateTimeType)
|
|
221
|
-
|
|
222
|
-
#define PyDateTime_FromDateAndTimeAndFold(year, month, day, hour, min, sec, usec, fold) \
|
|
223
|
-
PyDateTimeAPI->DateTime_FromDateAndTimeAndFold(year, month, day, hour, \
|
|
224
|
-
min, sec, usec, Py_None, fold, PyDateTimeAPI->DateTimeType)
|
|
225
|
-
|
|
226
|
-
#define PyTime_FromTime(hour, minute, second, usecond) \
|
|
227
|
-
PyDateTimeAPI->Time_FromTime(hour, minute, second, usecond, \
|
|
228
|
-
Py_None, PyDateTimeAPI->TimeType)
|
|
229
|
-
|
|
230
|
-
#define PyTime_FromTimeAndFold(hour, minute, second, usecond, fold) \
|
|
231
|
-
PyDateTimeAPI->Time_FromTimeAndFold(hour, minute, second, usecond, \
|
|
232
|
-
Py_None, fold, PyDateTimeAPI->TimeType)
|
|
233
|
-
|
|
234
|
-
#define PyDelta_FromDSU(days, seconds, useconds) \
|
|
235
|
-
PyDateTimeAPI->Delta_FromDelta(days, seconds, useconds, 1, \
|
|
236
|
-
PyDateTimeAPI->DeltaType)
|
|
237
|
-
|
|
238
|
-
#define PyTimeZone_FromOffset(offset) \
|
|
239
|
-
PyDateTimeAPI->TimeZone_FromTimeZone(offset, NULL)
|
|
240
|
-
|
|
241
|
-
#define PyTimeZone_FromOffsetAndName(offset, name) \
|
|
242
|
-
PyDateTimeAPI->TimeZone_FromTimeZone(offset, name)
|
|
243
|
-
|
|
244
|
-
/* Macros supporting the DB API. */
|
|
245
|
-
#define PyDateTime_FromTimestamp(args) \
|
|
246
|
-
PyDateTimeAPI->DateTime_FromTimestamp( \
|
|
247
|
-
(PyObject*) (PyDateTimeAPI->DateTimeType), args, NULL)
|
|
248
|
-
|
|
249
|
-
#define PyDate_FromTimestamp(args) \
|
|
250
|
-
PyDateTimeAPI->Date_FromTimestamp( \
|
|
251
|
-
(PyObject*) (PyDateTimeAPI->DateType), args)
|
|
252
|
-
|
|
253
|
-
#endif /* !defined(_PY_DATETIME_IMPL) */
|
|
254
|
-
|
|
255
|
-
#ifdef __cplusplus
|
|
256
|
-
}
|
|
257
|
-
#endif
|
|
258
|
-
#endif
|
|
259
|
-
#endif /* !Py_LIMITED_API */
|
|
@@ -1,108 +0,0 @@
|
|
|
1
|
-
/* Descriptors */
|
|
2
|
-
#ifndef Py_DESCROBJECT_H
|
|
3
|
-
#define Py_DESCROBJECT_H
|
|
4
|
-
#ifdef __cplusplus
|
|
5
|
-
extern "C" {
|
|
6
|
-
#endif
|
|
7
|
-
|
|
8
|
-
typedef PyObject *(*getter)(PyObject *, void *);
|
|
9
|
-
typedef int (*setter)(PyObject *, PyObject *, void *);
|
|
10
|
-
|
|
11
|
-
typedef struct PyGetSetDef {
|
|
12
|
-
const char *name;
|
|
13
|
-
getter get;
|
|
14
|
-
setter set;
|
|
15
|
-
const char *doc;
|
|
16
|
-
void *closure;
|
|
17
|
-
} PyGetSetDef;
|
|
18
|
-
|
|
19
|
-
#ifndef Py_LIMITED_API
|
|
20
|
-
typedef PyObject *(*wrapperfunc)(PyObject *self, PyObject *args,
|
|
21
|
-
void *wrapped);
|
|
22
|
-
|
|
23
|
-
typedef PyObject *(*wrapperfunc_kwds)(PyObject *self, PyObject *args,
|
|
24
|
-
void *wrapped, PyObject *kwds);
|
|
25
|
-
|
|
26
|
-
struct wrapperbase {
|
|
27
|
-
const char *name;
|
|
28
|
-
int offset;
|
|
29
|
-
void *function;
|
|
30
|
-
wrapperfunc wrapper;
|
|
31
|
-
const char *doc;
|
|
32
|
-
int flags;
|
|
33
|
-
PyObject *name_strobj;
|
|
34
|
-
};
|
|
35
|
-
|
|
36
|
-
/* Flags for above struct */
|
|
37
|
-
#define PyWrapperFlag_KEYWORDS 1 /* wrapper function takes keyword args */
|
|
38
|
-
|
|
39
|
-
/* Various kinds of descriptor objects */
|
|
40
|
-
|
|
41
|
-
typedef struct {
|
|
42
|
-
PyObject_HEAD
|
|
43
|
-
PyTypeObject *d_type;
|
|
44
|
-
PyObject *d_name;
|
|
45
|
-
PyObject *d_qualname;
|
|
46
|
-
} PyDescrObject;
|
|
47
|
-
|
|
48
|
-
#define PyDescr_COMMON PyDescrObject d_common
|
|
49
|
-
|
|
50
|
-
#define PyDescr_TYPE(x) (((PyDescrObject *)(x))->d_type)
|
|
51
|
-
#define PyDescr_NAME(x) (((PyDescrObject *)(x))->d_name)
|
|
52
|
-
|
|
53
|
-
typedef struct {
|
|
54
|
-
PyDescr_COMMON;
|
|
55
|
-
PyMethodDef *d_method;
|
|
56
|
-
vectorcallfunc vectorcall;
|
|
57
|
-
} PyMethodDescrObject;
|
|
58
|
-
|
|
59
|
-
typedef struct {
|
|
60
|
-
PyDescr_COMMON;
|
|
61
|
-
struct PyMemberDef *d_member;
|
|
62
|
-
} PyMemberDescrObject;
|
|
63
|
-
|
|
64
|
-
typedef struct {
|
|
65
|
-
PyDescr_COMMON;
|
|
66
|
-
PyGetSetDef *d_getset;
|
|
67
|
-
} PyGetSetDescrObject;
|
|
68
|
-
|
|
69
|
-
typedef struct {
|
|
70
|
-
PyDescr_COMMON;
|
|
71
|
-
struct wrapperbase *d_base;
|
|
72
|
-
void *d_wrapped; /* This can be any function pointer */
|
|
73
|
-
} PyWrapperDescrObject;
|
|
74
|
-
#endif /* Py_LIMITED_API */
|
|
75
|
-
|
|
76
|
-
PyAPI_DATA(PyTypeObject) PyClassMethodDescr_Type;
|
|
77
|
-
PyAPI_DATA(PyTypeObject) PyGetSetDescr_Type;
|
|
78
|
-
PyAPI_DATA(PyTypeObject) PyMemberDescr_Type;
|
|
79
|
-
PyAPI_DATA(PyTypeObject) PyMethodDescr_Type;
|
|
80
|
-
PyAPI_DATA(PyTypeObject) PyWrapperDescr_Type;
|
|
81
|
-
PyAPI_DATA(PyTypeObject) PyDictProxy_Type;
|
|
82
|
-
#ifndef Py_LIMITED_API
|
|
83
|
-
PyAPI_DATA(PyTypeObject) _PyMethodWrapper_Type;
|
|
84
|
-
#endif /* Py_LIMITED_API */
|
|
85
|
-
|
|
86
|
-
PyAPI_FUNC(PyObject *) PyDescr_NewMethod(PyTypeObject *, PyMethodDef *);
|
|
87
|
-
PyAPI_FUNC(PyObject *) PyDescr_NewClassMethod(PyTypeObject *, PyMethodDef *);
|
|
88
|
-
struct PyMemberDef; /* forward declaration for following prototype */
|
|
89
|
-
PyAPI_FUNC(PyObject *) PyDescr_NewMember(PyTypeObject *,
|
|
90
|
-
struct PyMemberDef *);
|
|
91
|
-
PyAPI_FUNC(PyObject *) PyDescr_NewGetSet(PyTypeObject *,
|
|
92
|
-
struct PyGetSetDef *);
|
|
93
|
-
#ifndef Py_LIMITED_API
|
|
94
|
-
PyAPI_FUNC(PyObject *) PyDescr_NewWrapper(PyTypeObject *,
|
|
95
|
-
struct wrapperbase *, void *);
|
|
96
|
-
#define PyDescr_IsData(d) (Py_TYPE(d)->tp_descr_set != NULL)
|
|
97
|
-
#endif
|
|
98
|
-
|
|
99
|
-
PyAPI_FUNC(PyObject *) PyDictProxy_New(PyObject *);
|
|
100
|
-
PyAPI_FUNC(PyObject *) PyWrapper_New(PyObject *, PyObject *);
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
PyAPI_DATA(PyTypeObject) PyProperty_Type;
|
|
104
|
-
#ifdef __cplusplus
|
|
105
|
-
}
|
|
106
|
-
#endif
|
|
107
|
-
#endif /* !Py_DESCROBJECT_H */
|
|
108
|
-
|
|
@@ -1,94 +0,0 @@
|
|
|
1
|
-
#ifndef Py_DICTOBJECT_H
|
|
2
|
-
#define Py_DICTOBJECT_H
|
|
3
|
-
#ifdef __cplusplus
|
|
4
|
-
extern "C" {
|
|
5
|
-
#endif
|
|
6
|
-
|
|
7
|
-
/* Dictionary object type -- mapping from hashable object to object */
|
|
8
|
-
|
|
9
|
-
/* The distribution includes a separate file, Objects/dictnotes.txt,
|
|
10
|
-
describing explorations into dictionary design and optimization.
|
|
11
|
-
It covers typical dictionary use patterns, the parameters for
|
|
12
|
-
tuning dictionaries, and several ideas for possible optimizations.
|
|
13
|
-
*/
|
|
14
|
-
|
|
15
|
-
PyAPI_DATA(PyTypeObject) PyDict_Type;
|
|
16
|
-
|
|
17
|
-
#define PyDict_Check(op) \
|
|
18
|
-
PyType_FastSubclass(Py_TYPE(op), Py_TPFLAGS_DICT_SUBCLASS)
|
|
19
|
-
#define PyDict_CheckExact(op) (Py_TYPE(op) == &PyDict_Type)
|
|
20
|
-
|
|
21
|
-
PyAPI_FUNC(PyObject *) PyDict_New(void);
|
|
22
|
-
PyAPI_FUNC(PyObject *) PyDict_GetItem(PyObject *mp, PyObject *key);
|
|
23
|
-
PyAPI_FUNC(PyObject *) PyDict_GetItemWithError(PyObject *mp, PyObject *key);
|
|
24
|
-
PyAPI_FUNC(int) PyDict_SetItem(PyObject *mp, PyObject *key, PyObject *item);
|
|
25
|
-
PyAPI_FUNC(int) PyDict_DelItem(PyObject *mp, PyObject *key);
|
|
26
|
-
PyAPI_FUNC(void) PyDict_Clear(PyObject *mp);
|
|
27
|
-
PyAPI_FUNC(int) PyDict_Next(
|
|
28
|
-
PyObject *mp, Py_ssize_t *pos, PyObject **key, PyObject **value);
|
|
29
|
-
PyAPI_FUNC(PyObject *) PyDict_Keys(PyObject *mp);
|
|
30
|
-
PyAPI_FUNC(PyObject *) PyDict_Values(PyObject *mp);
|
|
31
|
-
PyAPI_FUNC(PyObject *) PyDict_Items(PyObject *mp);
|
|
32
|
-
PyAPI_FUNC(Py_ssize_t) PyDict_Size(PyObject *mp);
|
|
33
|
-
PyAPI_FUNC(PyObject *) PyDict_Copy(PyObject *mp);
|
|
34
|
-
PyAPI_FUNC(int) PyDict_Contains(PyObject *mp, PyObject *key);
|
|
35
|
-
|
|
36
|
-
/* PyDict_Update(mp, other) is equivalent to PyDict_Merge(mp, other, 1). */
|
|
37
|
-
PyAPI_FUNC(int) PyDict_Update(PyObject *mp, PyObject *other);
|
|
38
|
-
|
|
39
|
-
/* PyDict_Merge updates/merges from a mapping object (an object that
|
|
40
|
-
supports PyMapping_Keys() and PyObject_GetItem()). If override is true,
|
|
41
|
-
the last occurrence of a key wins, else the first. The Python
|
|
42
|
-
dict.update(other) is equivalent to PyDict_Merge(dict, other, 1).
|
|
43
|
-
*/
|
|
44
|
-
PyAPI_FUNC(int) PyDict_Merge(PyObject *mp,
|
|
45
|
-
PyObject *other,
|
|
46
|
-
int override);
|
|
47
|
-
|
|
48
|
-
/* PyDict_MergeFromSeq2 updates/merges from an iterable object producing
|
|
49
|
-
iterable objects of length 2. If override is true, the last occurrence
|
|
50
|
-
of a key wins, else the first. The Python dict constructor dict(seq2)
|
|
51
|
-
is equivalent to dict={}; PyDict_MergeFromSeq(dict, seq2, 1).
|
|
52
|
-
*/
|
|
53
|
-
PyAPI_FUNC(int) PyDict_MergeFromSeq2(PyObject *d,
|
|
54
|
-
PyObject *seq2,
|
|
55
|
-
int override);
|
|
56
|
-
|
|
57
|
-
PyAPI_FUNC(PyObject *) PyDict_GetItemString(PyObject *dp, const char *key);
|
|
58
|
-
PyAPI_FUNC(int) PyDict_SetItemString(PyObject *dp, const char *key, PyObject *item);
|
|
59
|
-
PyAPI_FUNC(int) PyDict_DelItemString(PyObject *dp, const char *key);
|
|
60
|
-
|
|
61
|
-
/* Dictionary (keys, values, items) views */
|
|
62
|
-
|
|
63
|
-
PyAPI_DATA(PyTypeObject) PyDictKeys_Type;
|
|
64
|
-
PyAPI_DATA(PyTypeObject) PyDictValues_Type;
|
|
65
|
-
PyAPI_DATA(PyTypeObject) PyDictItems_Type;
|
|
66
|
-
|
|
67
|
-
#define PyDictKeys_Check(op) PyObject_TypeCheck(op, &PyDictKeys_Type)
|
|
68
|
-
#define PyDictValues_Check(op) PyObject_TypeCheck(op, &PyDictValues_Type)
|
|
69
|
-
#define PyDictItems_Check(op) PyObject_TypeCheck(op, &PyDictItems_Type)
|
|
70
|
-
/* This excludes Values, since they are not sets. */
|
|
71
|
-
# define PyDictViewSet_Check(op) \
|
|
72
|
-
(PyDictKeys_Check(op) || PyDictItems_Check(op))
|
|
73
|
-
|
|
74
|
-
/* Dictionary (key, value, items) iterators */
|
|
75
|
-
|
|
76
|
-
PyAPI_DATA(PyTypeObject) PyDictIterKey_Type;
|
|
77
|
-
PyAPI_DATA(PyTypeObject) PyDictIterValue_Type;
|
|
78
|
-
PyAPI_DATA(PyTypeObject) PyDictIterItem_Type;
|
|
79
|
-
|
|
80
|
-
PyAPI_DATA(PyTypeObject) PyDictRevIterKey_Type;
|
|
81
|
-
PyAPI_DATA(PyTypeObject) PyDictRevIterItem_Type;
|
|
82
|
-
PyAPI_DATA(PyTypeObject) PyDictRevIterValue_Type;
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
#ifndef Py_LIMITED_API
|
|
86
|
-
# define Py_CPYTHON_DICTOBJECT_H
|
|
87
|
-
# include "cpython/dictobject.h"
|
|
88
|
-
# undef Py_CPYTHON_DICTOBJECT_H
|
|
89
|
-
#endif
|
|
90
|
-
|
|
91
|
-
#ifdef __cplusplus
|
|
92
|
-
}
|
|
93
|
-
#endif
|
|
94
|
-
#endif /* !Py_DICTOBJECT_H */
|
package/include/python3.8/dtoa.h
DELETED
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
#ifndef Py_LIMITED_API
|
|
2
|
-
#ifndef PY_NO_SHORT_FLOAT_REPR
|
|
3
|
-
#ifdef __cplusplus
|
|
4
|
-
extern "C" {
|
|
5
|
-
#endif
|
|
6
|
-
|
|
7
|
-
PyAPI_FUNC(double) _Py_dg_strtod(const char *str, char **ptr);
|
|
8
|
-
PyAPI_FUNC(char *) _Py_dg_dtoa(double d, int mode, int ndigits,
|
|
9
|
-
int *decpt, int *sign, char **rve);
|
|
10
|
-
PyAPI_FUNC(void) _Py_dg_freedtoa(char *s);
|
|
11
|
-
PyAPI_FUNC(double) _Py_dg_stdnan(int sign);
|
|
12
|
-
PyAPI_FUNC(double) _Py_dg_infinity(int sign);
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
#ifdef __cplusplus
|
|
16
|
-
}
|
|
17
|
-
#endif
|
|
18
|
-
#endif
|
|
19
|
-
#endif
|