@plone/volto 14.0.0 → 14.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +40 -0
- package/locales/ca/LC_MESSAGES/volto.po +12 -2
- package/locales/ca.json +1 -1
- package/locales/de/LC_MESSAGES/volto.po +12 -2
- package/locales/de.json +1 -1
- package/locales/en/LC_MESSAGES/volto.po +12 -2
- package/locales/en.json +1 -1
- package/locales/es/LC_MESSAGES/volto.po +12 -2
- package/locales/es.json +1 -1
- package/locales/eu/LC_MESSAGES/volto.po +12 -2
- package/locales/eu.json +1 -1
- package/locales/fr/LC_MESSAGES/volto.po +12 -2
- package/locales/fr.json +1 -1
- package/locales/it/LC_MESSAGES/volto.po +12 -2
- package/locales/it.json +1 -1
- package/locales/ja/LC_MESSAGES/volto.po +12 -2
- package/locales/ja.json +1 -1
- package/locales/nl/LC_MESSAGES/volto.po +12 -2
- package/locales/nl.json +1 -1
- package/locales/pt/LC_MESSAGES/volto.po +12 -2
- package/locales/pt.json +1 -1
- package/locales/pt_BR/LC_MESSAGES/volto.po +12 -2
- package/locales/pt_BR.json +1 -1
- package/locales/ro/LC_MESSAGES/volto.po +12 -2
- package/locales/ro.json +1 -1
- package/locales/volto.pot +12 -2
- package/package.json +2 -1
- package/public/icon.svg +13 -0
- package/src/actions/vocabularies/vocabularies.js +15 -3
- package/src/components/index.js +1 -0
- package/src/components/manage/Blocks/HeroImageLeft/Edit.jsx +1 -1
- package/src/components/manage/Blocks/Listing/getAsyncData.js +1 -1
- package/src/components/manage/Blocks/Text/Edit.jsx +19 -0
- package/src/components/manage/Form/Form.jsx +11 -1
- package/src/components/manage/Form/UndoToolbar.jsx +78 -0
- package/src/components/manage/Widgets/AlignWidget.stories.jsx +5 -21
- package/src/components/manage/Widgets/ArrayWidget.jsx +83 -101
- package/src/components/manage/Widgets/ArrayWidget.stories.jsx +29 -64
- package/src/components/manage/Widgets/CheckboxWidget.stories.jsx +5 -22
- package/src/components/manage/Widgets/DatetimeWidget.jsx +65 -74
- package/src/components/manage/Widgets/DatetimeWidget.stories.jsx +7 -23
- package/src/components/manage/Widgets/DatetimeWidget.test.jsx +17 -15
- package/src/components/manage/Widgets/EmailWidget.stories.jsx +5 -22
- package/src/components/manage/Widgets/FileWidget.stories.jsx +5 -22
- package/src/components/manage/Widgets/NumberWidget.stories.jsx +5 -23
- package/src/components/manage/Widgets/ObjectBrowserWidget.stories.js +24 -32
- package/src/components/manage/Widgets/ObjectListWidget.stories.js +44 -44
- package/src/components/manage/Widgets/ObjectWidget.stories.jsx +13 -28
- package/src/components/manage/Widgets/PasswordWidget.stories.jsx +5 -22
- package/src/components/manage/Widgets/QueryWidget.jsx +2 -2
- package/src/components/manage/Widgets/QueryWidget.stories.jsx +1637 -22
- package/src/components/manage/Widgets/SelectAutoComplete.jsx +79 -48
- package/src/components/manage/Widgets/SelectAutoComplete.test.jsx +16 -0
- package/src/components/manage/Widgets/SelectAutocompleteWidget.stories.jsx +161 -0
- package/src/components/manage/Widgets/SelectUtils.js +90 -30
- package/src/components/manage/Widgets/SelectUtils.test.jsx +76 -1
- package/src/components/manage/Widgets/SelectWidget.jsx +26 -37
- package/src/components/manage/Widgets/SelectWidget.stories.jsx +96 -28
- package/src/components/manage/Widgets/TextWidget.stories.jsx +5 -22
- package/src/components/manage/Widgets/TextareaWidget.stories.jsx +5 -22
- package/src/components/manage/Widgets/TokenWidget.jsx +19 -17
- package/src/components/manage/Widgets/TokenWidget.stories.jsx +141 -0
- package/src/components/manage/Widgets/UrlWidget.stories.jsx +5 -21
- package/src/components/manage/Widgets/VocabularyTermsWidget.stories.js +27 -64
- package/src/components/manage/Widgets/WysiwygWidget.stories.jsx +5 -22
- package/src/components/manage/Widgets/story.jsx +38 -0
- package/src/components/theme/ContactForm/ContactForm.jsx +1 -0
- package/src/components/theme/ContactForm/ContactForm.stories.jsx +126 -0
- package/src/components/theme/CorsError/CorsError.jsx +2 -2
- package/src/config/Loadables.jsx +2 -0
- package/src/config/index.js +1 -0
- package/src/helpers/Html/Html.jsx +2 -12
- package/src/helpers/UndoManager/useUndoManager.js +102 -0
- package/src/helpers/index.js +1 -0
- package/src/middleware/Api.test.js +57 -6
- package/src/middleware/api.js +34 -13
- package/src/reducers/vocabularies/vocabularies.js +13 -2
- package/src/store.js +1 -1
- package/src/storybook.jsx +55 -0
- package/theme/themes/pastanaga/extras/time-picker-overrides.less +1 -1
- package/include/python3.8/Python-ast.h +0 -715
- package/include/python3.8/Python.h +0 -160
- package/include/python3.8/abstract.h +0 -844
- package/include/python3.8/asdl.h +0 -46
- package/include/python3.8/ast.h +0 -37
- package/include/python3.8/bitset.h +0 -23
- package/include/python3.8/bltinmodule.h +0 -14
- package/include/python3.8/boolobject.h +0 -34
- package/include/python3.8/bytearrayobject.h +0 -62
- package/include/python3.8/bytes_methods.h +0 -69
- package/include/python3.8/bytesobject.h +0 -224
- package/include/python3.8/cellobject.h +0 -29
- package/include/python3.8/ceval.h +0 -231
- package/include/python3.8/classobject.h +0 -59
- package/include/python3.8/code.h +0 -180
- package/include/python3.8/codecs.h +0 -240
- package/include/python3.8/compile.h +0 -106
- package/include/python3.8/complexobject.h +0 -69
- package/include/python3.8/context.h +0 -84
- package/include/python3.8/cpython/abstract.h +0 -319
- package/include/python3.8/cpython/dictobject.h +0 -94
- package/include/python3.8/cpython/fileobject.h +0 -24
- package/include/python3.8/cpython/initconfig.h +0 -434
- package/include/python3.8/cpython/interpreteridobject.h +0 -19
- package/include/python3.8/cpython/object.h +0 -470
- package/include/python3.8/cpython/objimpl.h +0 -113
- package/include/python3.8/cpython/pyerrors.h +0 -188
- package/include/python3.8/cpython/pylifecycle.h +0 -78
- package/include/python3.8/cpython/pymem.h +0 -108
- package/include/python3.8/cpython/pystate.h +0 -252
- package/include/python3.8/cpython/sysmodule.h +0 -21
- package/include/python3.8/cpython/traceback.h +0 -22
- package/include/python3.8/cpython/tupleobject.h +0 -36
- package/include/python3.8/cpython/unicodeobject.h +0 -1239
- package/include/python3.8/datetime.h +0 -259
- package/include/python3.8/descrobject.h +0 -108
- package/include/python3.8/dictobject.h +0 -94
- package/include/python3.8/dtoa.h +0 -19
- package/include/python3.8/dynamic_annotations.h +0 -499
- package/include/python3.8/enumobject.h +0 -17
- package/include/python3.8/errcode.h +0 -38
- package/include/python3.8/eval.h +0 -37
- package/include/python3.8/fileobject.h +0 -49
- package/include/python3.8/fileutils.h +0 -185
- package/include/python3.8/floatobject.h +0 -130
- package/include/python3.8/frameobject.h +0 -92
- package/include/python3.8/funcobject.h +0 -104
- package/include/python3.8/genobject.h +0 -109
- package/include/python3.8/graminit.h +0 -94
- package/include/python3.8/grammar.h +0 -77
- package/include/python3.8/import.h +0 -149
- package/include/python3.8/internal/pycore_accu.h +0 -39
- package/include/python3.8/internal/pycore_atomic.h +0 -558
- package/include/python3.8/internal/pycore_ceval.h +0 -37
- package/include/python3.8/internal/pycore_code.h +0 -27
- package/include/python3.8/internal/pycore_condvar.h +0 -95
- package/include/python3.8/internal/pycore_context.h +0 -42
- package/include/python3.8/internal/pycore_fileutils.h +0 -54
- package/include/python3.8/internal/pycore_getopt.h +0 -22
- package/include/python3.8/internal/pycore_gil.h +0 -50
- package/include/python3.8/internal/pycore_hamt.h +0 -116
- package/include/python3.8/internal/pycore_initconfig.h +0 -166
- package/include/python3.8/internal/pycore_object.h +0 -81
- package/include/python3.8/internal/pycore_pathconfig.h +0 -75
- package/include/python3.8/internal/pycore_pyerrors.h +0 -62
- package/include/python3.8/internal/pycore_pyhash.h +0 -10
- package/include/python3.8/internal/pycore_pylifecycle.h +0 -118
- package/include/python3.8/internal/pycore_pymem.h +0 -212
- package/include/python3.8/internal/pycore_pystate.h +0 -326
- package/include/python3.8/internal/pycore_traceback.h +0 -96
- package/include/python3.8/internal/pycore_tupleobject.h +0 -19
- package/include/python3.8/internal/pycore_warnings.h +0 -25
- package/include/python3.8/interpreteridobject.h +0 -17
- package/include/python3.8/intrcheck.h +0 -33
- package/include/python3.8/iterobject.h +0 -25
- package/include/python3.8/listobject.h +0 -81
- package/include/python3.8/longintrepr.h +0 -99
- package/include/python3.8/longobject.h +0 -242
- package/include/python3.8/marshal.h +0 -28
- package/include/python3.8/memoryobject.h +0 -72
- package/include/python3.8/methodobject.h +0 -131
- package/include/python3.8/modsupport.h +0 -248
- package/include/python3.8/moduleobject.h +0 -90
- package/include/python3.8/namespaceobject.h +0 -19
- package/include/python3.8/node.h +0 -48
- package/include/python3.8/object.h +0 -753
- package/include/python3.8/objimpl.h +0 -284
- package/include/python3.8/odictobject.h +0 -43
- package/include/python3.8/opcode.h +0 -148
- package/include/python3.8/osdefs.h +0 -51
- package/include/python3.8/osmodule.h +0 -17
- package/include/python3.8/parsetok.h +0 -110
- package/include/python3.8/patchlevel.h +0 -35
- package/include/python3.8/picklebufobject.h +0 -31
- package/include/python3.8/py_curses.h +0 -100
- package/include/python3.8/pyarena.h +0 -64
- package/include/python3.8/pycapsule.h +0 -59
- package/include/python3.8/pyconfig.h +0 -1665
- package/include/python3.8/pyctype.h +0 -39
- package/include/python3.8/pydebug.h +0 -40
- package/include/python3.8/pydtrace.h +0 -59
- package/include/python3.8/pydtrace_probes.h +0 -228
- package/include/python3.8/pyerrors.h +0 -335
- package/include/python3.8/pyexpat.h +0 -55
- package/include/python3.8/pyfpe.h +0 -12
- package/include/python3.8/pyhash.h +0 -145
- package/include/python3.8/pylifecycle.h +0 -75
- package/include/python3.8/pymacconfig.h +0 -102
- package/include/python3.8/pymacro.h +0 -106
- package/include/python3.8/pymath.h +0 -230
- package/include/python3.8/pymem.h +0 -150
- package/include/python3.8/pyport.h +0 -850
- package/include/python3.8/pystate.h +0 -136
- package/include/python3.8/pystrcmp.h +0 -23
- package/include/python3.8/pystrhex.h +0 -22
- package/include/python3.8/pystrtod.h +0 -45
- package/include/python3.8/pythonrun.h +0 -210
- package/include/python3.8/pythread.h +0 -161
- package/include/python3.8/pytime.h +0 -246
- package/include/python3.8/rangeobject.h +0 -27
- package/include/python3.8/setobject.h +0 -108
- package/include/python3.8/sliceobject.h +0 -65
- package/include/python3.8/structmember.h +0 -74
- package/include/python3.8/structseq.h +0 -49
- package/include/python3.8/symtable.h +0 -123
- package/include/python3.8/sysmodule.h +0 -41
- package/include/python3.8/token.h +0 -92
- package/include/python3.8/traceback.h +0 -28
- package/include/python3.8/tracemalloc.h +0 -38
- package/include/python3.8/tupleobject.h +0 -48
- package/include/python3.8/typeslots.h +0 -85
- package/include/python3.8/ucnhash.h +0 -36
- package/include/python3.8/unicodeobject.h +0 -1044
- package/include/python3.8/warnings.h +0 -67
- package/include/python3.8/weakrefobject.h +0 -86
- package/src/components/theme/ContactForm/ContactForm.stories.mdx +0 -39
package/include/python3.8/asdl.h
DELETED
|
@@ -1,46 +0,0 @@
|
|
|
1
|
-
#ifndef Py_ASDL_H
|
|
2
|
-
#define Py_ASDL_H
|
|
3
|
-
|
|
4
|
-
typedef PyObject * identifier;
|
|
5
|
-
typedef PyObject * string;
|
|
6
|
-
typedef PyObject * bytes;
|
|
7
|
-
typedef PyObject * object;
|
|
8
|
-
typedef PyObject * singleton;
|
|
9
|
-
typedef PyObject * constant;
|
|
10
|
-
|
|
11
|
-
/* It would be nice if the code generated by asdl_c.py was completely
|
|
12
|
-
independent of Python, but it is a goal the requires too much work
|
|
13
|
-
at this stage. So, for example, I'll represent identifiers as
|
|
14
|
-
interned Python strings.
|
|
15
|
-
*/
|
|
16
|
-
|
|
17
|
-
/* XXX A sequence should be typed so that its use can be typechecked. */
|
|
18
|
-
|
|
19
|
-
typedef struct {
|
|
20
|
-
Py_ssize_t size;
|
|
21
|
-
void *elements[1];
|
|
22
|
-
} asdl_seq;
|
|
23
|
-
|
|
24
|
-
typedef struct {
|
|
25
|
-
Py_ssize_t size;
|
|
26
|
-
int elements[1];
|
|
27
|
-
} asdl_int_seq;
|
|
28
|
-
|
|
29
|
-
asdl_seq *_Py_asdl_seq_new(Py_ssize_t size, PyArena *arena);
|
|
30
|
-
asdl_int_seq *_Py_asdl_int_seq_new(Py_ssize_t size, PyArena *arena);
|
|
31
|
-
|
|
32
|
-
#define asdl_seq_GET(S, I) (S)->elements[(I)]
|
|
33
|
-
#define asdl_seq_LEN(S) ((S) == NULL ? 0 : (S)->size)
|
|
34
|
-
#ifdef Py_DEBUG
|
|
35
|
-
#define asdl_seq_SET(S, I, V) \
|
|
36
|
-
do { \
|
|
37
|
-
Py_ssize_t _asdl_i = (I); \
|
|
38
|
-
assert((S) != NULL); \
|
|
39
|
-
assert(0 <= _asdl_i && _asdl_i < (S)->size); \
|
|
40
|
-
(S)->elements[_asdl_i] = (V); \
|
|
41
|
-
} while (0)
|
|
42
|
-
#else
|
|
43
|
-
#define asdl_seq_SET(S, I, V) (S)->elements[I] = (V)
|
|
44
|
-
#endif
|
|
45
|
-
|
|
46
|
-
#endif /* !Py_ASDL_H */
|
package/include/python3.8/ast.h
DELETED
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
#ifndef Py_AST_H
|
|
2
|
-
#define Py_AST_H
|
|
3
|
-
#ifdef __cplusplus
|
|
4
|
-
extern "C" {
|
|
5
|
-
#endif
|
|
6
|
-
|
|
7
|
-
#include "Python-ast.h" /* mod_ty */
|
|
8
|
-
#include "node.h" /* node */
|
|
9
|
-
|
|
10
|
-
PyAPI_FUNC(int) PyAST_Validate(mod_ty);
|
|
11
|
-
PyAPI_FUNC(mod_ty) PyAST_FromNode(
|
|
12
|
-
const node *n,
|
|
13
|
-
PyCompilerFlags *flags,
|
|
14
|
-
const char *filename, /* decoded from the filesystem encoding */
|
|
15
|
-
PyArena *arena);
|
|
16
|
-
PyAPI_FUNC(mod_ty) PyAST_FromNodeObject(
|
|
17
|
-
const node *n,
|
|
18
|
-
PyCompilerFlags *flags,
|
|
19
|
-
PyObject *filename,
|
|
20
|
-
PyArena *arena);
|
|
21
|
-
|
|
22
|
-
#ifndef Py_LIMITED_API
|
|
23
|
-
|
|
24
|
-
/* _PyAST_ExprAsUnicode is defined in ast_unparse.c */
|
|
25
|
-
PyAPI_FUNC(PyObject *) _PyAST_ExprAsUnicode(expr_ty);
|
|
26
|
-
|
|
27
|
-
/* Return the borrowed reference to the first literal string in the
|
|
28
|
-
sequence of statemnts or NULL if it doesn't start from a literal string.
|
|
29
|
-
Doesn't set exception. */
|
|
30
|
-
PyAPI_FUNC(PyObject *) _PyAST_GetDocString(asdl_seq *);
|
|
31
|
-
|
|
32
|
-
#endif /* !Py_LIMITED_API */
|
|
33
|
-
|
|
34
|
-
#ifdef __cplusplus
|
|
35
|
-
}
|
|
36
|
-
#endif
|
|
37
|
-
#endif /* !Py_AST_H */
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
#ifndef Py_BITSET_H
|
|
3
|
-
#define Py_BITSET_H
|
|
4
|
-
#ifdef __cplusplus
|
|
5
|
-
extern "C" {
|
|
6
|
-
#endif
|
|
7
|
-
|
|
8
|
-
/* Bitset interface */
|
|
9
|
-
|
|
10
|
-
#define BYTE char
|
|
11
|
-
typedef BYTE *bitset;
|
|
12
|
-
|
|
13
|
-
#define testbit(ss, ibit) (((ss)[BIT2BYTE(ibit)] & BIT2MASK(ibit)) != 0)
|
|
14
|
-
|
|
15
|
-
#define BITSPERBYTE (8*sizeof(BYTE))
|
|
16
|
-
#define BIT2BYTE(ibit) ((ibit) / BITSPERBYTE)
|
|
17
|
-
#define BIT2SHIFT(ibit) ((ibit) % BITSPERBYTE)
|
|
18
|
-
#define BIT2MASK(ibit) (1 << BIT2SHIFT(ibit))
|
|
19
|
-
|
|
20
|
-
#ifdef __cplusplus
|
|
21
|
-
}
|
|
22
|
-
#endif
|
|
23
|
-
#endif /* !Py_BITSET_H */
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
#ifndef Py_BLTINMODULE_H
|
|
2
|
-
#define Py_BLTINMODULE_H
|
|
3
|
-
#ifdef __cplusplus
|
|
4
|
-
extern "C" {
|
|
5
|
-
#endif
|
|
6
|
-
|
|
7
|
-
PyAPI_DATA(PyTypeObject) PyFilter_Type;
|
|
8
|
-
PyAPI_DATA(PyTypeObject) PyMap_Type;
|
|
9
|
-
PyAPI_DATA(PyTypeObject) PyZip_Type;
|
|
10
|
-
|
|
11
|
-
#ifdef __cplusplus
|
|
12
|
-
}
|
|
13
|
-
#endif
|
|
14
|
-
#endif /* !Py_BLTINMODULE_H */
|
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
/* Boolean object interface */
|
|
2
|
-
|
|
3
|
-
#ifndef Py_BOOLOBJECT_H
|
|
4
|
-
#define Py_BOOLOBJECT_H
|
|
5
|
-
#ifdef __cplusplus
|
|
6
|
-
extern "C" {
|
|
7
|
-
#endif
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
PyAPI_DATA(PyTypeObject) PyBool_Type;
|
|
11
|
-
|
|
12
|
-
#define PyBool_Check(x) (Py_TYPE(x) == &PyBool_Type)
|
|
13
|
-
|
|
14
|
-
/* Py_False and Py_True are the only two bools in existence.
|
|
15
|
-
Don't forget to apply Py_INCREF() when returning either!!! */
|
|
16
|
-
|
|
17
|
-
/* Don't use these directly */
|
|
18
|
-
PyAPI_DATA(struct _longobject) _Py_FalseStruct, _Py_TrueStruct;
|
|
19
|
-
|
|
20
|
-
/* Use these macros */
|
|
21
|
-
#define Py_False ((PyObject *) &_Py_FalseStruct)
|
|
22
|
-
#define Py_True ((PyObject *) &_Py_TrueStruct)
|
|
23
|
-
|
|
24
|
-
/* Macros for returning Py_True or Py_False, respectively */
|
|
25
|
-
#define Py_RETURN_TRUE return Py_INCREF(Py_True), Py_True
|
|
26
|
-
#define Py_RETURN_FALSE return Py_INCREF(Py_False), Py_False
|
|
27
|
-
|
|
28
|
-
/* Function to return a bool from a C long */
|
|
29
|
-
PyAPI_FUNC(PyObject *) PyBool_FromLong(long);
|
|
30
|
-
|
|
31
|
-
#ifdef __cplusplus
|
|
32
|
-
}
|
|
33
|
-
#endif
|
|
34
|
-
#endif /* !Py_BOOLOBJECT_H */
|
|
@@ -1,62 +0,0 @@
|
|
|
1
|
-
/* ByteArray object interface */
|
|
2
|
-
|
|
3
|
-
#ifndef Py_BYTEARRAYOBJECT_H
|
|
4
|
-
#define Py_BYTEARRAYOBJECT_H
|
|
5
|
-
#ifdef __cplusplus
|
|
6
|
-
extern "C" {
|
|
7
|
-
#endif
|
|
8
|
-
|
|
9
|
-
#include <stdarg.h>
|
|
10
|
-
|
|
11
|
-
/* Type PyByteArrayObject represents a mutable array of bytes.
|
|
12
|
-
* The Python API is that of a sequence;
|
|
13
|
-
* the bytes are mapped to ints in [0, 256).
|
|
14
|
-
* Bytes are not characters; they may be used to encode characters.
|
|
15
|
-
* The only way to go between bytes and str/unicode is via encoding
|
|
16
|
-
* and decoding.
|
|
17
|
-
* For the convenience of C programmers, the bytes type is considered
|
|
18
|
-
* to contain a char pointer, not an unsigned char pointer.
|
|
19
|
-
*/
|
|
20
|
-
|
|
21
|
-
/* Object layout */
|
|
22
|
-
#ifndef Py_LIMITED_API
|
|
23
|
-
typedef struct {
|
|
24
|
-
PyObject_VAR_HEAD
|
|
25
|
-
Py_ssize_t ob_alloc; /* How many bytes allocated in ob_bytes */
|
|
26
|
-
char *ob_bytes; /* Physical backing buffer */
|
|
27
|
-
char *ob_start; /* Logical start inside ob_bytes */
|
|
28
|
-
/* XXX(nnorwitz): should ob_exports be Py_ssize_t? */
|
|
29
|
-
int ob_exports; /* How many buffer exports */
|
|
30
|
-
} PyByteArrayObject;
|
|
31
|
-
#endif
|
|
32
|
-
|
|
33
|
-
/* Type object */
|
|
34
|
-
PyAPI_DATA(PyTypeObject) PyByteArray_Type;
|
|
35
|
-
PyAPI_DATA(PyTypeObject) PyByteArrayIter_Type;
|
|
36
|
-
|
|
37
|
-
/* Type check macros */
|
|
38
|
-
#define PyByteArray_Check(self) PyObject_TypeCheck(self, &PyByteArray_Type)
|
|
39
|
-
#define PyByteArray_CheckExact(self) (Py_TYPE(self) == &PyByteArray_Type)
|
|
40
|
-
|
|
41
|
-
/* Direct API functions */
|
|
42
|
-
PyAPI_FUNC(PyObject *) PyByteArray_FromObject(PyObject *);
|
|
43
|
-
PyAPI_FUNC(PyObject *) PyByteArray_Concat(PyObject *, PyObject *);
|
|
44
|
-
PyAPI_FUNC(PyObject *) PyByteArray_FromStringAndSize(const char *, Py_ssize_t);
|
|
45
|
-
PyAPI_FUNC(Py_ssize_t) PyByteArray_Size(PyObject *);
|
|
46
|
-
PyAPI_FUNC(char *) PyByteArray_AsString(PyObject *);
|
|
47
|
-
PyAPI_FUNC(int) PyByteArray_Resize(PyObject *, Py_ssize_t);
|
|
48
|
-
|
|
49
|
-
/* Macros, trading safety for speed */
|
|
50
|
-
#ifndef Py_LIMITED_API
|
|
51
|
-
#define PyByteArray_AS_STRING(self) \
|
|
52
|
-
(assert(PyByteArray_Check(self)), \
|
|
53
|
-
Py_SIZE(self) ? ((PyByteArrayObject *)(self))->ob_start : _PyByteArray_empty_string)
|
|
54
|
-
#define PyByteArray_GET_SIZE(self) (assert(PyByteArray_Check(self)), Py_SIZE(self))
|
|
55
|
-
|
|
56
|
-
PyAPI_DATA(char) _PyByteArray_empty_string[];
|
|
57
|
-
#endif
|
|
58
|
-
|
|
59
|
-
#ifdef __cplusplus
|
|
60
|
-
}
|
|
61
|
-
#endif
|
|
62
|
-
#endif /* !Py_BYTEARRAYOBJECT_H */
|
|
@@ -1,69 +0,0 @@
|
|
|
1
|
-
#ifndef Py_LIMITED_API
|
|
2
|
-
#ifndef Py_BYTES_CTYPE_H
|
|
3
|
-
#define Py_BYTES_CTYPE_H
|
|
4
|
-
|
|
5
|
-
/*
|
|
6
|
-
* The internal implementation behind PyBytes (bytes) and PyByteArray (bytearray)
|
|
7
|
-
* methods of the given names, they operate on ASCII byte strings.
|
|
8
|
-
*/
|
|
9
|
-
extern PyObject* _Py_bytes_isspace(const char *cptr, Py_ssize_t len);
|
|
10
|
-
extern PyObject* _Py_bytes_isalpha(const char *cptr, Py_ssize_t len);
|
|
11
|
-
extern PyObject* _Py_bytes_isalnum(const char *cptr, Py_ssize_t len);
|
|
12
|
-
extern PyObject* _Py_bytes_isascii(const char *cptr, Py_ssize_t len);
|
|
13
|
-
extern PyObject* _Py_bytes_isdigit(const char *cptr, Py_ssize_t len);
|
|
14
|
-
extern PyObject* _Py_bytes_islower(const char *cptr, Py_ssize_t len);
|
|
15
|
-
extern PyObject* _Py_bytes_isupper(const char *cptr, Py_ssize_t len);
|
|
16
|
-
extern PyObject* _Py_bytes_istitle(const char *cptr, Py_ssize_t len);
|
|
17
|
-
|
|
18
|
-
/* These store their len sized answer in the given preallocated *result arg. */
|
|
19
|
-
extern void _Py_bytes_lower(char *result, const char *cptr, Py_ssize_t len);
|
|
20
|
-
extern void _Py_bytes_upper(char *result, const char *cptr, Py_ssize_t len);
|
|
21
|
-
extern void _Py_bytes_title(char *result, const char *s, Py_ssize_t len);
|
|
22
|
-
extern void _Py_bytes_capitalize(char *result, const char *s, Py_ssize_t len);
|
|
23
|
-
extern void _Py_bytes_swapcase(char *result, const char *s, Py_ssize_t len);
|
|
24
|
-
|
|
25
|
-
extern PyObject *_Py_bytes_find(const char *str, Py_ssize_t len, PyObject *args);
|
|
26
|
-
extern PyObject *_Py_bytes_index(const char *str, Py_ssize_t len, PyObject *args);
|
|
27
|
-
extern PyObject *_Py_bytes_rfind(const char *str, Py_ssize_t len, PyObject *args);
|
|
28
|
-
extern PyObject *_Py_bytes_rindex(const char *str, Py_ssize_t len, PyObject *args);
|
|
29
|
-
extern PyObject *_Py_bytes_count(const char *str, Py_ssize_t len, PyObject *args);
|
|
30
|
-
extern int _Py_bytes_contains(const char *str, Py_ssize_t len, PyObject *arg);
|
|
31
|
-
extern PyObject *_Py_bytes_startswith(const char *str, Py_ssize_t len, PyObject *args);
|
|
32
|
-
extern PyObject *_Py_bytes_endswith(const char *str, Py_ssize_t len, PyObject *args);
|
|
33
|
-
|
|
34
|
-
/* The maketrans() static method. */
|
|
35
|
-
extern PyObject* _Py_bytes_maketrans(Py_buffer *frm, Py_buffer *to);
|
|
36
|
-
|
|
37
|
-
/* Shared __doc__ strings. */
|
|
38
|
-
extern const char _Py_isspace__doc__[];
|
|
39
|
-
extern const char _Py_isalpha__doc__[];
|
|
40
|
-
extern const char _Py_isalnum__doc__[];
|
|
41
|
-
extern const char _Py_isascii__doc__[];
|
|
42
|
-
extern const char _Py_isdigit__doc__[];
|
|
43
|
-
extern const char _Py_islower__doc__[];
|
|
44
|
-
extern const char _Py_isupper__doc__[];
|
|
45
|
-
extern const char _Py_istitle__doc__[];
|
|
46
|
-
extern const char _Py_lower__doc__[];
|
|
47
|
-
extern const char _Py_upper__doc__[];
|
|
48
|
-
extern const char _Py_title__doc__[];
|
|
49
|
-
extern const char _Py_capitalize__doc__[];
|
|
50
|
-
extern const char _Py_swapcase__doc__[];
|
|
51
|
-
extern const char _Py_count__doc__[];
|
|
52
|
-
extern const char _Py_find__doc__[];
|
|
53
|
-
extern const char _Py_index__doc__[];
|
|
54
|
-
extern const char _Py_rfind__doc__[];
|
|
55
|
-
extern const char _Py_rindex__doc__[];
|
|
56
|
-
extern const char _Py_startswith__doc__[];
|
|
57
|
-
extern const char _Py_endswith__doc__[];
|
|
58
|
-
extern const char _Py_maketrans__doc__[];
|
|
59
|
-
extern const char _Py_expandtabs__doc__[];
|
|
60
|
-
extern const char _Py_ljust__doc__[];
|
|
61
|
-
extern const char _Py_rjust__doc__[];
|
|
62
|
-
extern const char _Py_center__doc__[];
|
|
63
|
-
extern const char _Py_zfill__doc__[];
|
|
64
|
-
|
|
65
|
-
/* this is needed because some docs are shared from the .o, not static */
|
|
66
|
-
#define PyDoc_STRVAR_shared(name,str) const char name[] = PyDoc_STR(str)
|
|
67
|
-
|
|
68
|
-
#endif /* !Py_BYTES_CTYPE_H */
|
|
69
|
-
#endif /* !Py_LIMITED_API */
|
|
@@ -1,224 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
/* Bytes (String) object interface */
|
|
3
|
-
|
|
4
|
-
#ifndef Py_BYTESOBJECT_H
|
|
5
|
-
#define Py_BYTESOBJECT_H
|
|
6
|
-
#ifdef __cplusplus
|
|
7
|
-
extern "C" {
|
|
8
|
-
#endif
|
|
9
|
-
|
|
10
|
-
#include <stdarg.h>
|
|
11
|
-
|
|
12
|
-
/*
|
|
13
|
-
Type PyBytesObject represents a character string. An extra zero byte is
|
|
14
|
-
reserved at the end to ensure it is zero-terminated, but a size is
|
|
15
|
-
present so strings with null bytes in them can be represented. This
|
|
16
|
-
is an immutable object type.
|
|
17
|
-
|
|
18
|
-
There are functions to create new string objects, to test
|
|
19
|
-
an object for string-ness, and to get the
|
|
20
|
-
string value. The latter function returns a null pointer
|
|
21
|
-
if the object is not of the proper type.
|
|
22
|
-
There is a variant that takes an explicit size as well as a
|
|
23
|
-
variant that assumes a zero-terminated string. Note that none of the
|
|
24
|
-
functions should be applied to nil objects.
|
|
25
|
-
*/
|
|
26
|
-
|
|
27
|
-
/* Caching the hash (ob_shash) saves recalculation of a string's hash value.
|
|
28
|
-
This significantly speeds up dict lookups. */
|
|
29
|
-
|
|
30
|
-
#ifndef Py_LIMITED_API
|
|
31
|
-
typedef struct {
|
|
32
|
-
PyObject_VAR_HEAD
|
|
33
|
-
Py_hash_t ob_shash;
|
|
34
|
-
char ob_sval[1];
|
|
35
|
-
|
|
36
|
-
/* Invariants:
|
|
37
|
-
* ob_sval contains space for 'ob_size+1' elements.
|
|
38
|
-
* ob_sval[ob_size] == 0.
|
|
39
|
-
* ob_shash is the hash of the string or -1 if not computed yet.
|
|
40
|
-
*/
|
|
41
|
-
} PyBytesObject;
|
|
42
|
-
#endif
|
|
43
|
-
|
|
44
|
-
PyAPI_DATA(PyTypeObject) PyBytes_Type;
|
|
45
|
-
PyAPI_DATA(PyTypeObject) PyBytesIter_Type;
|
|
46
|
-
|
|
47
|
-
#define PyBytes_Check(op) \
|
|
48
|
-
PyType_FastSubclass(Py_TYPE(op), Py_TPFLAGS_BYTES_SUBCLASS)
|
|
49
|
-
#define PyBytes_CheckExact(op) (Py_TYPE(op) == &PyBytes_Type)
|
|
50
|
-
|
|
51
|
-
PyAPI_FUNC(PyObject *) PyBytes_FromStringAndSize(const char *, Py_ssize_t);
|
|
52
|
-
PyAPI_FUNC(PyObject *) PyBytes_FromString(const char *);
|
|
53
|
-
PyAPI_FUNC(PyObject *) PyBytes_FromObject(PyObject *);
|
|
54
|
-
PyAPI_FUNC(PyObject *) PyBytes_FromFormatV(const char*, va_list)
|
|
55
|
-
Py_GCC_ATTRIBUTE((format(printf, 1, 0)));
|
|
56
|
-
PyAPI_FUNC(PyObject *) PyBytes_FromFormat(const char*, ...)
|
|
57
|
-
Py_GCC_ATTRIBUTE((format(printf, 1, 2)));
|
|
58
|
-
PyAPI_FUNC(Py_ssize_t) PyBytes_Size(PyObject *);
|
|
59
|
-
PyAPI_FUNC(char *) PyBytes_AsString(PyObject *);
|
|
60
|
-
PyAPI_FUNC(PyObject *) PyBytes_Repr(PyObject *, int);
|
|
61
|
-
PyAPI_FUNC(void) PyBytes_Concat(PyObject **, PyObject *);
|
|
62
|
-
PyAPI_FUNC(void) PyBytes_ConcatAndDel(PyObject **, PyObject *);
|
|
63
|
-
#ifndef Py_LIMITED_API
|
|
64
|
-
PyAPI_FUNC(int) _PyBytes_Resize(PyObject **, Py_ssize_t);
|
|
65
|
-
PyAPI_FUNC(PyObject*) _PyBytes_FormatEx(
|
|
66
|
-
const char *format,
|
|
67
|
-
Py_ssize_t format_len,
|
|
68
|
-
PyObject *args,
|
|
69
|
-
int use_bytearray);
|
|
70
|
-
PyAPI_FUNC(PyObject*) _PyBytes_FromHex(
|
|
71
|
-
PyObject *string,
|
|
72
|
-
int use_bytearray);
|
|
73
|
-
#endif
|
|
74
|
-
PyAPI_FUNC(PyObject *) PyBytes_DecodeEscape(const char *, Py_ssize_t,
|
|
75
|
-
const char *, Py_ssize_t,
|
|
76
|
-
const char *);
|
|
77
|
-
#ifndef Py_LIMITED_API
|
|
78
|
-
/* Helper for PyBytes_DecodeEscape that detects invalid escape chars. */
|
|
79
|
-
PyAPI_FUNC(PyObject *) _PyBytes_DecodeEscape(const char *, Py_ssize_t,
|
|
80
|
-
const char *, Py_ssize_t,
|
|
81
|
-
const char *,
|
|
82
|
-
const char **);
|
|
83
|
-
#endif
|
|
84
|
-
|
|
85
|
-
/* Macro, trading safety for speed */
|
|
86
|
-
#ifndef Py_LIMITED_API
|
|
87
|
-
#define PyBytes_AS_STRING(op) (assert(PyBytes_Check(op)), \
|
|
88
|
-
(((PyBytesObject *)(op))->ob_sval))
|
|
89
|
-
#define PyBytes_GET_SIZE(op) (assert(PyBytes_Check(op)),Py_SIZE(op))
|
|
90
|
-
#endif
|
|
91
|
-
|
|
92
|
-
/* _PyBytes_Join(sep, x) is like sep.join(x). sep must be PyBytesObject*,
|
|
93
|
-
x must be an iterable object. */
|
|
94
|
-
#ifndef Py_LIMITED_API
|
|
95
|
-
PyAPI_FUNC(PyObject *) _PyBytes_Join(PyObject *sep, PyObject *x);
|
|
96
|
-
#endif
|
|
97
|
-
|
|
98
|
-
/* Provides access to the internal data buffer and size of a string
|
|
99
|
-
object or the default encoded version of a Unicode object. Passing
|
|
100
|
-
NULL as *len parameter will force the string buffer to be
|
|
101
|
-
0-terminated (passing a string with embedded NULL characters will
|
|
102
|
-
cause an exception). */
|
|
103
|
-
PyAPI_FUNC(int) PyBytes_AsStringAndSize(
|
|
104
|
-
PyObject *obj, /* string or Unicode object */
|
|
105
|
-
char **s, /* pointer to buffer variable */
|
|
106
|
-
Py_ssize_t *len /* pointer to length variable or NULL
|
|
107
|
-
(only possible for 0-terminated
|
|
108
|
-
strings) */
|
|
109
|
-
);
|
|
110
|
-
|
|
111
|
-
/* Using the current locale, insert the thousands grouping
|
|
112
|
-
into the string pointed to by buffer. For the argument descriptions,
|
|
113
|
-
see Objects/stringlib/localeutil.h */
|
|
114
|
-
#ifndef Py_LIMITED_API
|
|
115
|
-
PyAPI_FUNC(Py_ssize_t) _PyBytes_InsertThousandsGroupingLocale(char *buffer,
|
|
116
|
-
Py_ssize_t n_buffer,
|
|
117
|
-
char *digits,
|
|
118
|
-
Py_ssize_t n_digits,
|
|
119
|
-
Py_ssize_t min_width);
|
|
120
|
-
|
|
121
|
-
/* Using explicit passed-in values, insert the thousands grouping
|
|
122
|
-
into the string pointed to by buffer. For the argument descriptions,
|
|
123
|
-
see Objects/stringlib/localeutil.h */
|
|
124
|
-
PyAPI_FUNC(Py_ssize_t) _PyBytes_InsertThousandsGrouping(char *buffer,
|
|
125
|
-
Py_ssize_t n_buffer,
|
|
126
|
-
char *digits,
|
|
127
|
-
Py_ssize_t n_digits,
|
|
128
|
-
Py_ssize_t min_width,
|
|
129
|
-
const char *grouping,
|
|
130
|
-
const char *thousands_sep);
|
|
131
|
-
#endif
|
|
132
|
-
|
|
133
|
-
/* Flags used by string formatting */
|
|
134
|
-
#define F_LJUST (1<<0)
|
|
135
|
-
#define F_SIGN (1<<1)
|
|
136
|
-
#define F_BLANK (1<<2)
|
|
137
|
-
#define F_ALT (1<<3)
|
|
138
|
-
#define F_ZERO (1<<4)
|
|
139
|
-
|
|
140
|
-
#ifndef Py_LIMITED_API
|
|
141
|
-
/* The _PyBytesWriter structure is big: it contains an embedded "stack buffer".
|
|
142
|
-
A _PyBytesWriter variable must be declared at the end of variables in a
|
|
143
|
-
function to optimize the memory allocation on the stack. */
|
|
144
|
-
typedef struct {
|
|
145
|
-
/* bytes, bytearray or NULL (when the small buffer is used) */
|
|
146
|
-
PyObject *buffer;
|
|
147
|
-
|
|
148
|
-
/* Number of allocated size. */
|
|
149
|
-
Py_ssize_t allocated;
|
|
150
|
-
|
|
151
|
-
/* Minimum number of allocated bytes,
|
|
152
|
-
incremented by _PyBytesWriter_Prepare() */
|
|
153
|
-
Py_ssize_t min_size;
|
|
154
|
-
|
|
155
|
-
/* If non-zero, use a bytearray instead of a bytes object for buffer. */
|
|
156
|
-
int use_bytearray;
|
|
157
|
-
|
|
158
|
-
/* If non-zero, overallocate the buffer (default: 0).
|
|
159
|
-
This flag must be zero if use_bytearray is non-zero. */
|
|
160
|
-
int overallocate;
|
|
161
|
-
|
|
162
|
-
/* Stack buffer */
|
|
163
|
-
int use_small_buffer;
|
|
164
|
-
char small_buffer[512];
|
|
165
|
-
} _PyBytesWriter;
|
|
166
|
-
|
|
167
|
-
/* Initialize a bytes writer
|
|
168
|
-
|
|
169
|
-
By default, the overallocation is disabled. Set the overallocate attribute
|
|
170
|
-
to control the allocation of the buffer. */
|
|
171
|
-
PyAPI_FUNC(void) _PyBytesWriter_Init(_PyBytesWriter *writer);
|
|
172
|
-
|
|
173
|
-
/* Get the buffer content and reset the writer.
|
|
174
|
-
Return a bytes object, or a bytearray object if use_bytearray is non-zero.
|
|
175
|
-
Raise an exception and return NULL on error. */
|
|
176
|
-
PyAPI_FUNC(PyObject *) _PyBytesWriter_Finish(_PyBytesWriter *writer,
|
|
177
|
-
void *str);
|
|
178
|
-
|
|
179
|
-
/* Deallocate memory of a writer (clear its internal buffer). */
|
|
180
|
-
PyAPI_FUNC(void) _PyBytesWriter_Dealloc(_PyBytesWriter *writer);
|
|
181
|
-
|
|
182
|
-
/* Allocate the buffer to write size bytes.
|
|
183
|
-
Return the pointer to the beginning of buffer data.
|
|
184
|
-
Raise an exception and return NULL on error. */
|
|
185
|
-
PyAPI_FUNC(void*) _PyBytesWriter_Alloc(_PyBytesWriter *writer,
|
|
186
|
-
Py_ssize_t size);
|
|
187
|
-
|
|
188
|
-
/* Ensure that the buffer is large enough to write *size* bytes.
|
|
189
|
-
Add size to the writer minimum size (min_size attribute).
|
|
190
|
-
|
|
191
|
-
str is the current pointer inside the buffer.
|
|
192
|
-
Return the updated current pointer inside the buffer.
|
|
193
|
-
Raise an exception and return NULL on error. */
|
|
194
|
-
PyAPI_FUNC(void*) _PyBytesWriter_Prepare(_PyBytesWriter *writer,
|
|
195
|
-
void *str,
|
|
196
|
-
Py_ssize_t size);
|
|
197
|
-
|
|
198
|
-
/* Resize the buffer to make it larger.
|
|
199
|
-
The new buffer may be larger than size bytes because of overallocation.
|
|
200
|
-
Return the updated current pointer inside the buffer.
|
|
201
|
-
Raise an exception and return NULL on error.
|
|
202
|
-
|
|
203
|
-
Note: size must be greater than the number of allocated bytes in the writer.
|
|
204
|
-
|
|
205
|
-
This function doesn't use the writer minimum size (min_size attribute).
|
|
206
|
-
|
|
207
|
-
See also _PyBytesWriter_Prepare().
|
|
208
|
-
*/
|
|
209
|
-
PyAPI_FUNC(void*) _PyBytesWriter_Resize(_PyBytesWriter *writer,
|
|
210
|
-
void *str,
|
|
211
|
-
Py_ssize_t size);
|
|
212
|
-
|
|
213
|
-
/* Write bytes.
|
|
214
|
-
Raise an exception and return NULL on error. */
|
|
215
|
-
PyAPI_FUNC(void*) _PyBytesWriter_WriteBytes(_PyBytesWriter *writer,
|
|
216
|
-
void *str,
|
|
217
|
-
const void *bytes,
|
|
218
|
-
Py_ssize_t size);
|
|
219
|
-
#endif /* Py_LIMITED_API */
|
|
220
|
-
|
|
221
|
-
#ifdef __cplusplus
|
|
222
|
-
}
|
|
223
|
-
#endif
|
|
224
|
-
#endif /* !Py_BYTESOBJECT_H */
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
/* Cell object interface */
|
|
2
|
-
#ifndef Py_LIMITED_API
|
|
3
|
-
#ifndef Py_CELLOBJECT_H
|
|
4
|
-
#define Py_CELLOBJECT_H
|
|
5
|
-
#ifdef __cplusplus
|
|
6
|
-
extern "C" {
|
|
7
|
-
#endif
|
|
8
|
-
|
|
9
|
-
typedef struct {
|
|
10
|
-
PyObject_HEAD
|
|
11
|
-
PyObject *ob_ref; /* Content of the cell or NULL when empty */
|
|
12
|
-
} PyCellObject;
|
|
13
|
-
|
|
14
|
-
PyAPI_DATA(PyTypeObject) PyCell_Type;
|
|
15
|
-
|
|
16
|
-
#define PyCell_Check(op) (Py_TYPE(op) == &PyCell_Type)
|
|
17
|
-
|
|
18
|
-
PyAPI_FUNC(PyObject *) PyCell_New(PyObject *);
|
|
19
|
-
PyAPI_FUNC(PyObject *) PyCell_Get(PyObject *);
|
|
20
|
-
PyAPI_FUNC(int) PyCell_Set(PyObject *, PyObject *);
|
|
21
|
-
|
|
22
|
-
#define PyCell_GET(op) (((PyCellObject *)(op))->ob_ref)
|
|
23
|
-
#define PyCell_SET(op, v) (((PyCellObject *)(op))->ob_ref = v)
|
|
24
|
-
|
|
25
|
-
#ifdef __cplusplus
|
|
26
|
-
}
|
|
27
|
-
#endif
|
|
28
|
-
#endif /* !Py_TUPLEOBJECT_H */
|
|
29
|
-
#endif /* Py_LIMITED_API */
|