cbitstruct 1.1.1__tar.gz → 1.2.0__tar.gz
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.
- {cbitstruct-1.1.1/cbitstruct.egg-info → cbitstruct-1.2.0}/PKG-INFO +15 -3
- {cbitstruct-1.1.1 → cbitstruct-1.2.0}/cbitstruct/_cbitstruct.c +5 -4
- {cbitstruct-1.1.1 → cbitstruct-1.2.0}/cbitstruct/tests/test_bitstruct.py +3 -0
- {cbitstruct-1.1.1 → cbitstruct-1.2.0/cbitstruct.egg-info}/PKG-INFO +15 -3
- {cbitstruct-1.1.1 → cbitstruct-1.2.0}/cbitstruct.egg-info/SOURCES.txt +1 -2
- {cbitstruct-1.1.1 → cbitstruct-1.2.0}/pyproject.toml +1 -2
- {cbitstruct-1.1.1 → cbitstruct-1.2.0}/setup.py +2 -2
- cbitstruct-1.1.1/cbitstruct/clinic/_cbitstruct.c.36.h +0 -667
- {cbitstruct-1.1.1 → cbitstruct-1.2.0}/LICENSE.md +0 -0
- {cbitstruct-1.1.1 → cbitstruct-1.2.0}/MANIFEST.in +0 -0
- {cbitstruct-1.1.1 → cbitstruct-1.2.0}/README.md +0 -0
- {cbitstruct-1.1.1 → cbitstruct-1.2.0}/cbitstruct/__init__.py +0 -0
- {cbitstruct-1.1.1 → cbitstruct-1.2.0}/cbitstruct/clinic/_cbitstruct.c.313.h +0 -0
- /cbitstruct-1.1.1/cbitstruct/clinic/_cbitstruct.c.37.h → /cbitstruct-1.2.0/cbitstruct/clinic/_cbitstruct.c.38.h +0 -0
- {cbitstruct-1.1.1 → cbitstruct-1.2.0}/cbitstruct/tests/__init__.py +0 -0
- {cbitstruct-1.1.1 → cbitstruct-1.2.0}/cbitstruct/tests/test_against_bitstruct.py +0 -0
- {cbitstruct-1.1.1 → cbitstruct-1.2.0}/cbitstruct/tests/test_api.py +0 -0
- {cbitstruct-1.1.1 → cbitstruct-1.2.0}/cbitstruct/tests/test_cornercase.py +0 -0
- {cbitstruct-1.1.1 → cbitstruct-1.2.0}/cbitstruct/tests/test_perf.py +0 -0
- {cbitstruct-1.1.1 → cbitstruct-1.2.0}/cbitstruct.egg-info/dependency_links.txt +0 -0
- {cbitstruct-1.1.1 → cbitstruct-1.2.0}/cbitstruct.egg-info/requires.txt +0 -0
- {cbitstruct-1.1.1 → cbitstruct-1.2.0}/cbitstruct.egg-info/top_level.txt +0 -0
- {cbitstruct-1.1.1 → cbitstruct-1.2.0}/setup.cfg +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
Metadata-Version: 2.
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
2
|
Name: cbitstruct
|
|
3
|
-
Version: 1.
|
|
3
|
+
Version: 1.2.0
|
|
4
4
|
Summary: Faster C implementation of bitstruct
|
|
5
5
|
Home-page: https://github.com/qchateau/cbitstruct
|
|
6
6
|
Author: Quentin CHATEAU
|
|
@@ -11,11 +11,23 @@ Classifier: Programming Language :: Python :: 3
|
|
|
11
11
|
Classifier: Programming Language :: C
|
|
12
12
|
Classifier: License :: OSI Approved :: Mozilla Public License 2.0 (MPL 2.0)
|
|
13
13
|
Classifier: Operating System :: OS Independent
|
|
14
|
-
Requires-Python: >=3.
|
|
14
|
+
Requires-Python: >=3.8
|
|
15
15
|
Description-Content-Type: text/markdown
|
|
16
16
|
License-File: LICENSE.md
|
|
17
17
|
Provides-Extra: test
|
|
18
18
|
Requires-Dist: bitstruct; extra == "test"
|
|
19
|
+
Dynamic: author
|
|
20
|
+
Dynamic: author-email
|
|
21
|
+
Dynamic: classifier
|
|
22
|
+
Dynamic: description
|
|
23
|
+
Dynamic: description-content-type
|
|
24
|
+
Dynamic: home-page
|
|
25
|
+
Dynamic: keywords
|
|
26
|
+
Dynamic: license
|
|
27
|
+
Dynamic: license-file
|
|
28
|
+
Dynamic: provides-extra
|
|
29
|
+
Dynamic: requires-python
|
|
30
|
+
Dynamic: summary
|
|
19
31
|
|
|
20
32
|
 [](https://travis-ci.com/qchateau/cbitstruct)
|
|
21
33
|
|
|
@@ -831,10 +831,8 @@ typedef struct {
|
|
|
831
831
|
|
|
832
832
|
#if PY_MAJOR_VERSION == 3 && PY_MINOR_VERSION >= 13
|
|
833
833
|
#include "clinic/_cbitstruct.c.313.h"
|
|
834
|
-
#elif PY_MAJOR_VERSION == 3 && PY_MINOR_VERSION >=
|
|
835
|
-
#include "clinic/_cbitstruct.c.
|
|
836
|
-
#elif PY_MAJOR_VERSION == 3 && PY_MINOR_VERSION == 6
|
|
837
|
-
#include "clinic/_cbitstruct.c.36.h"
|
|
834
|
+
#elif PY_MAJOR_VERSION == 3 && PY_MINOR_VERSION >= 8
|
|
835
|
+
#include "clinic/_cbitstruct.c.38.h"
|
|
838
836
|
#else
|
|
839
837
|
#error "Unsupported python version"
|
|
840
838
|
#endif
|
|
@@ -1413,6 +1411,9 @@ static PyObject* pack_into(PyObject* module, PyObject* args, PyObject* kwargs)
|
|
|
1413
1411
|
|
|
1414
1412
|
exit:
|
|
1415
1413
|
CompiledFormat_deinit(&self);
|
|
1414
|
+
if (buffer.obj) {
|
|
1415
|
+
PyBuffer_Release(&buffer);
|
|
1416
|
+
}
|
|
1416
1417
|
return return_value;
|
|
1417
1418
|
}
|
|
1418
1419
|
|
|
@@ -460,6 +460,9 @@ class BitstructTest(unittest.TestCase):
|
|
|
460
460
|
packed = bytearray(b'\x00')
|
|
461
461
|
pack_into('b1t24', packed, 0, False)
|
|
462
462
|
|
|
463
|
+
# Ensure buffer was released correctly
|
|
464
|
+
packed.extend(b'extendable')
|
|
465
|
+
|
|
463
466
|
def test_unpack_from(self):
|
|
464
467
|
"""Unpack values at given bit offset.
|
|
465
468
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
Metadata-Version: 2.
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
2
|
Name: cbitstruct
|
|
3
|
-
Version: 1.
|
|
3
|
+
Version: 1.2.0
|
|
4
4
|
Summary: Faster C implementation of bitstruct
|
|
5
5
|
Home-page: https://github.com/qchateau/cbitstruct
|
|
6
6
|
Author: Quentin CHATEAU
|
|
@@ -11,11 +11,23 @@ Classifier: Programming Language :: Python :: 3
|
|
|
11
11
|
Classifier: Programming Language :: C
|
|
12
12
|
Classifier: License :: OSI Approved :: Mozilla Public License 2.0 (MPL 2.0)
|
|
13
13
|
Classifier: Operating System :: OS Independent
|
|
14
|
-
Requires-Python: >=3.
|
|
14
|
+
Requires-Python: >=3.8
|
|
15
15
|
Description-Content-Type: text/markdown
|
|
16
16
|
License-File: LICENSE.md
|
|
17
17
|
Provides-Extra: test
|
|
18
18
|
Requires-Dist: bitstruct; extra == "test"
|
|
19
|
+
Dynamic: author
|
|
20
|
+
Dynamic: author-email
|
|
21
|
+
Dynamic: classifier
|
|
22
|
+
Dynamic: description
|
|
23
|
+
Dynamic: description-content-type
|
|
24
|
+
Dynamic: home-page
|
|
25
|
+
Dynamic: keywords
|
|
26
|
+
Dynamic: license
|
|
27
|
+
Dynamic: license-file
|
|
28
|
+
Dynamic: provides-extra
|
|
29
|
+
Dynamic: requires-python
|
|
30
|
+
Dynamic: summary
|
|
19
31
|
|
|
20
32
|
 [](https://travis-ci.com/qchateau/cbitstruct)
|
|
21
33
|
|
|
@@ -11,8 +11,7 @@ cbitstruct.egg-info/dependency_links.txt
|
|
|
11
11
|
cbitstruct.egg-info/requires.txt
|
|
12
12
|
cbitstruct.egg-info/top_level.txt
|
|
13
13
|
cbitstruct/clinic/_cbitstruct.c.313.h
|
|
14
|
-
cbitstruct/clinic/_cbitstruct.c.
|
|
15
|
-
cbitstruct/clinic/_cbitstruct.c.37.h
|
|
14
|
+
cbitstruct/clinic/_cbitstruct.c.38.h
|
|
16
15
|
cbitstruct/tests/__init__.py
|
|
17
16
|
cbitstruct/tests/test_against_bitstruct.py
|
|
18
17
|
cbitstruct/tests/test_api.py
|
|
@@ -4,14 +4,13 @@ build-backend = "setuptools.build_meta"
|
|
|
4
4
|
|
|
5
5
|
[tool.cibuildwheel]
|
|
6
6
|
build = [
|
|
7
|
-
"cp36-manylinux_x86_64",
|
|
8
|
-
"cp37-manylinux_x86_64",
|
|
9
7
|
"cp38-manylinux_x86_64",
|
|
10
8
|
"cp39-manylinux_x86_64",
|
|
11
9
|
"cp310-manylinux_x86_64",
|
|
12
10
|
"cp311-manylinux_x86_64",
|
|
13
11
|
"cp312-manylinux_x86_64",
|
|
14
12
|
"cp313-manylinux_x86_64",
|
|
13
|
+
"cp314-manylinux_x86_64",
|
|
15
14
|
]
|
|
16
15
|
test-extras = "test"
|
|
17
16
|
test-command = "python -m unittest discover cbitstruct"
|
|
@@ -28,7 +28,7 @@ with open("README.md", "r") as fh:
|
|
|
28
28
|
|
|
29
29
|
setup(
|
|
30
30
|
name="cbitstruct",
|
|
31
|
-
version="1.
|
|
31
|
+
version="1.2.0",
|
|
32
32
|
author="Quentin CHATEAU",
|
|
33
33
|
author_email="quentin.chateau@gmail.com",
|
|
34
34
|
license="MPL-2.0",
|
|
@@ -36,7 +36,7 @@ setup(
|
|
|
36
36
|
description="Faster C implementation of bitstruct",
|
|
37
37
|
long_description=long_description,
|
|
38
38
|
long_description_content_type="text/markdown",
|
|
39
|
-
python_requires=">=3.
|
|
39
|
+
python_requires=">=3.8",
|
|
40
40
|
classifiers=[
|
|
41
41
|
"Programming Language :: Python :: 3",
|
|
42
42
|
"Programming Language :: C",
|
|
@@ -1,667 +0,0 @@
|
|
|
1
|
-
/*[clinic input]
|
|
2
|
-
preserve
|
|
3
|
-
[clinic start generated code]*/
|
|
4
|
-
|
|
5
|
-
PyDoc_STRVAR(CompiledFormat___init____doc__,
|
|
6
|
-
"CompiledFormat(fmt)\n"
|
|
7
|
-
"--\n"
|
|
8
|
-
"\n"
|
|
9
|
-
"Create a compiled bitstruct object.\n"
|
|
10
|
-
"\n"
|
|
11
|
-
"Return a new CompiledFormat object which writes and reads binary data\n"
|
|
12
|
-
"according to the format string.");
|
|
13
|
-
|
|
14
|
-
static int
|
|
15
|
-
CompiledFormat___init___impl(PyCompiledFormatObject *self, const char *fmt);
|
|
16
|
-
|
|
17
|
-
static int
|
|
18
|
-
CompiledFormat___init__(PyObject *self, PyObject *args, PyObject *kwargs)
|
|
19
|
-
{
|
|
20
|
-
int return_value = -1;
|
|
21
|
-
static const char * const _keywords[] = {"fmt", NULL};
|
|
22
|
-
static _PyArg_Parser _parser = {"s:CompiledFormat", _keywords, 0};
|
|
23
|
-
const char *fmt;
|
|
24
|
-
|
|
25
|
-
if (!_PyArg_ParseTupleAndKeywordsFast(args, kwargs, &_parser,
|
|
26
|
-
&fmt)) {
|
|
27
|
-
goto exit;
|
|
28
|
-
}
|
|
29
|
-
return_value = CompiledFormat___init___impl((PyCompiledFormatObject *)self, fmt);
|
|
30
|
-
|
|
31
|
-
exit:
|
|
32
|
-
return return_value;
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
PyDoc_STRVAR(CompiledFormat_calcsize__doc__,
|
|
36
|
-
"calcsize($self, /)\n"
|
|
37
|
-
"--\n"
|
|
38
|
-
"\n"
|
|
39
|
-
"Return size in bits of the bitDescribed by the format string.");
|
|
40
|
-
|
|
41
|
-
#define COMPILEDFORMAT_CALCSIZE_METHODDEF \
|
|
42
|
-
{"calcsize", (PyCFunction)CompiledFormat_calcsize, METH_NOARGS, CompiledFormat_calcsize__doc__},
|
|
43
|
-
|
|
44
|
-
static Py_ssize_t
|
|
45
|
-
CompiledFormat_calcsize_impl(PyCompiledFormatObject *self);
|
|
46
|
-
|
|
47
|
-
static PyObject *
|
|
48
|
-
CompiledFormat_calcsize(PyCompiledFormatObject *self, PyObject *Py_UNUSED(ignored))
|
|
49
|
-
{
|
|
50
|
-
PyObject *return_value = NULL;
|
|
51
|
-
Py_ssize_t _return_value;
|
|
52
|
-
|
|
53
|
-
_return_value = CompiledFormat_calcsize_impl(self);
|
|
54
|
-
if ((_return_value == -1) && PyErr_Occurred()) {
|
|
55
|
-
goto exit;
|
|
56
|
-
}
|
|
57
|
-
return_value = PyLong_FromSsize_t(_return_value);
|
|
58
|
-
|
|
59
|
-
exit:
|
|
60
|
-
return return_value;
|
|
61
|
-
}
|
|
62
|
-
|
|
63
|
-
PyDoc_STRVAR(CompiledFormat_unpack__doc__,
|
|
64
|
-
"unpack($self, /, data)\n"
|
|
65
|
-
"--\n"
|
|
66
|
-
"\n"
|
|
67
|
-
"Return a tuple containing unpacked values.");
|
|
68
|
-
|
|
69
|
-
#define COMPILEDFORMAT_UNPACK_METHODDEF \
|
|
70
|
-
{"unpack", (PyCFunction)CompiledFormat_unpack, METH_FASTCALL, CompiledFormat_unpack__doc__},
|
|
71
|
-
|
|
72
|
-
static PyObject *
|
|
73
|
-
CompiledFormat_unpack_impl(PyCompiledFormatObject *self, Py_buffer *data);
|
|
74
|
-
|
|
75
|
-
static PyObject *
|
|
76
|
-
CompiledFormat_unpack(PyCompiledFormatObject *self, PyObject **args, Py_ssize_t nargs, PyObject *kwnames)
|
|
77
|
-
{
|
|
78
|
-
PyObject *return_value = NULL;
|
|
79
|
-
static const char * const _keywords[] = {"data", NULL};
|
|
80
|
-
static _PyArg_Parser _parser = {"y*:unpack", _keywords, 0};
|
|
81
|
-
Py_buffer data = {NULL, NULL};
|
|
82
|
-
|
|
83
|
-
if (!_PyArg_ParseStack(args, nargs, kwnames, &_parser,
|
|
84
|
-
&data)) {
|
|
85
|
-
goto exit;
|
|
86
|
-
}
|
|
87
|
-
return_value = CompiledFormat_unpack_impl(self, &data);
|
|
88
|
-
|
|
89
|
-
exit:
|
|
90
|
-
/* Cleanup for data */
|
|
91
|
-
if (data.obj) {
|
|
92
|
-
PyBuffer_Release(&data);
|
|
93
|
-
}
|
|
94
|
-
|
|
95
|
-
return return_value;
|
|
96
|
-
}
|
|
97
|
-
|
|
98
|
-
PyDoc_STRVAR(CompiledFormat_unpack_from__doc__,
|
|
99
|
-
"unpack_from($self, /, data, offset=0)\n"
|
|
100
|
-
"--\n"
|
|
101
|
-
"\n"
|
|
102
|
-
"Return a tuple containing unpacked values starting at \'offset\' bits.");
|
|
103
|
-
|
|
104
|
-
#define COMPILEDFORMAT_UNPACK_FROM_METHODDEF \
|
|
105
|
-
{"unpack_from", (PyCFunction)CompiledFormat_unpack_from, METH_FASTCALL, CompiledFormat_unpack_from__doc__},
|
|
106
|
-
|
|
107
|
-
static PyObject *
|
|
108
|
-
CompiledFormat_unpack_from_impl(PyCompiledFormatObject *self,
|
|
109
|
-
Py_buffer *data, Py_ssize_t offset);
|
|
110
|
-
|
|
111
|
-
static PyObject *
|
|
112
|
-
CompiledFormat_unpack_from(PyCompiledFormatObject *self, PyObject **args, Py_ssize_t nargs, PyObject *kwnames)
|
|
113
|
-
{
|
|
114
|
-
PyObject *return_value = NULL;
|
|
115
|
-
static const char * const _keywords[] = {"data", "offset", NULL};
|
|
116
|
-
static _PyArg_Parser _parser = {"y*|n:unpack_from", _keywords, 0};
|
|
117
|
-
Py_buffer data = {NULL, NULL};
|
|
118
|
-
Py_ssize_t offset = 0;
|
|
119
|
-
|
|
120
|
-
if (!_PyArg_ParseStack(args, nargs, kwnames, &_parser,
|
|
121
|
-
&data, &offset)) {
|
|
122
|
-
goto exit;
|
|
123
|
-
}
|
|
124
|
-
return_value = CompiledFormat_unpack_from_impl(self, &data, offset);
|
|
125
|
-
|
|
126
|
-
exit:
|
|
127
|
-
/* Cleanup for data */
|
|
128
|
-
if (data.obj) {
|
|
129
|
-
PyBuffer_Release(&data);
|
|
130
|
-
}
|
|
131
|
-
|
|
132
|
-
return return_value;
|
|
133
|
-
}
|
|
134
|
-
|
|
135
|
-
PyDoc_STRVAR(CompiledFormatDict___init____doc__,
|
|
136
|
-
"CompiledFormatDict(fmt, names)\n"
|
|
137
|
-
"--\n"
|
|
138
|
-
"\n"
|
|
139
|
-
"Create a compiled bitstruct object.\n"
|
|
140
|
-
"\n"
|
|
141
|
-
"Return a new CompiledFormatDict object which writes and reads binary data\n"
|
|
142
|
-
"according to the format string. The names list \'name\' will be used\n"
|
|
143
|
-
"as keys in data dictionaries.");
|
|
144
|
-
|
|
145
|
-
static int
|
|
146
|
-
CompiledFormatDict___init___impl(PyCompiledFormatDictObject *self,
|
|
147
|
-
const char *fmt, PyObject *names);
|
|
148
|
-
|
|
149
|
-
static int
|
|
150
|
-
CompiledFormatDict___init__(PyObject *self, PyObject *args, PyObject *kwargs)
|
|
151
|
-
{
|
|
152
|
-
int return_value = -1;
|
|
153
|
-
static const char * const _keywords[] = {"fmt", "names", NULL};
|
|
154
|
-
static _PyArg_Parser _parser = {"sO:CompiledFormatDict", _keywords, 0};
|
|
155
|
-
const char *fmt;
|
|
156
|
-
PyObject *names;
|
|
157
|
-
|
|
158
|
-
if (!_PyArg_ParseTupleAndKeywordsFast(args, kwargs, &_parser,
|
|
159
|
-
&fmt, &names)) {
|
|
160
|
-
goto exit;
|
|
161
|
-
}
|
|
162
|
-
return_value = CompiledFormatDict___init___impl((PyCompiledFormatDictObject *)self, fmt, names);
|
|
163
|
-
|
|
164
|
-
exit:
|
|
165
|
-
return return_value;
|
|
166
|
-
}
|
|
167
|
-
|
|
168
|
-
PyDoc_STRVAR(CompiledFormatDict_pack__doc__,
|
|
169
|
-
"pack($self, /, data)\n"
|
|
170
|
-
"--\n"
|
|
171
|
-
"\n"
|
|
172
|
-
"Pack values from a dict into a bytes object\n"
|
|
173
|
-
"\n"
|
|
174
|
-
"Return a tuple containing unpacked values.\n"
|
|
175
|
-
"\'data\' is a dictionary containing values whic keys are the \'names\'\n"
|
|
176
|
-
"used when constructing this object.");
|
|
177
|
-
|
|
178
|
-
#define COMPILEDFORMATDICT_PACK_METHODDEF \
|
|
179
|
-
{"pack", (PyCFunction)CompiledFormatDict_pack, METH_FASTCALL, CompiledFormatDict_pack__doc__},
|
|
180
|
-
|
|
181
|
-
static PyObject *
|
|
182
|
-
CompiledFormatDict_pack_impl(PyCompiledFormatDictObject *self,
|
|
183
|
-
PyObject *data);
|
|
184
|
-
|
|
185
|
-
static PyObject *
|
|
186
|
-
CompiledFormatDict_pack(PyCompiledFormatDictObject *self, PyObject **args, Py_ssize_t nargs, PyObject *kwnames)
|
|
187
|
-
{
|
|
188
|
-
PyObject *return_value = NULL;
|
|
189
|
-
static const char * const _keywords[] = {"data", NULL};
|
|
190
|
-
static _PyArg_Parser _parser = {"O:pack", _keywords, 0};
|
|
191
|
-
PyObject *data;
|
|
192
|
-
|
|
193
|
-
if (!_PyArg_ParseStack(args, nargs, kwnames, &_parser,
|
|
194
|
-
&data)) {
|
|
195
|
-
goto exit;
|
|
196
|
-
}
|
|
197
|
-
return_value = CompiledFormatDict_pack_impl(self, data);
|
|
198
|
-
|
|
199
|
-
exit:
|
|
200
|
-
return return_value;
|
|
201
|
-
}
|
|
202
|
-
|
|
203
|
-
PyDoc_STRVAR(CompiledFormatDict_pack_into__doc__,
|
|
204
|
-
"pack_into($self, /, buf, offset, data, *, fill_padding=True)\n"
|
|
205
|
-
"--\n"
|
|
206
|
-
"\n"
|
|
207
|
-
"Pack data into a bytes object, starting at bit offset given by the offset argument.\n"
|
|
208
|
-
"\n"
|
|
209
|
-
"With fill_padding=False, passing bits in \'buf\' will not be modified.");
|
|
210
|
-
|
|
211
|
-
#define COMPILEDFORMATDICT_PACK_INTO_METHODDEF \
|
|
212
|
-
{"pack_into", (PyCFunction)CompiledFormatDict_pack_into, METH_FASTCALL, CompiledFormatDict_pack_into__doc__},
|
|
213
|
-
|
|
214
|
-
static PyObject *
|
|
215
|
-
CompiledFormatDict_pack_into_impl(PyCompiledFormatDictObject *self,
|
|
216
|
-
Py_buffer *buf, Py_ssize_t offset,
|
|
217
|
-
PyObject *data, int fill_padding);
|
|
218
|
-
|
|
219
|
-
static PyObject *
|
|
220
|
-
CompiledFormatDict_pack_into(PyCompiledFormatDictObject *self, PyObject **args, Py_ssize_t nargs, PyObject *kwnames)
|
|
221
|
-
{
|
|
222
|
-
PyObject *return_value = NULL;
|
|
223
|
-
static const char * const _keywords[] = {"buf", "offset", "data", "fill_padding", NULL};
|
|
224
|
-
static _PyArg_Parser _parser = {"y*nO|$p:pack_into", _keywords, 0};
|
|
225
|
-
Py_buffer buf = {NULL, NULL};
|
|
226
|
-
Py_ssize_t offset;
|
|
227
|
-
PyObject *data;
|
|
228
|
-
int fill_padding = 1;
|
|
229
|
-
|
|
230
|
-
if (!_PyArg_ParseStack(args, nargs, kwnames, &_parser,
|
|
231
|
-
&buf, &offset, &data, &fill_padding)) {
|
|
232
|
-
goto exit;
|
|
233
|
-
}
|
|
234
|
-
return_value = CompiledFormatDict_pack_into_impl(self, &buf, offset, data, fill_padding);
|
|
235
|
-
|
|
236
|
-
exit:
|
|
237
|
-
/* Cleanup for buf */
|
|
238
|
-
if (buf.obj) {
|
|
239
|
-
PyBuffer_Release(&buf);
|
|
240
|
-
}
|
|
241
|
-
|
|
242
|
-
return return_value;
|
|
243
|
-
}
|
|
244
|
-
|
|
245
|
-
PyDoc_STRVAR(CompiledFormatDict_unpack__doc__,
|
|
246
|
-
"unpack($self, /, data)\n"
|
|
247
|
-
"--\n"
|
|
248
|
-
"\n"
|
|
249
|
-
"Unpack data into a dict which keys are the \'names\' used when constructing this object.\n"
|
|
250
|
-
"\n"
|
|
251
|
-
"Return a dict containing unpacked values.");
|
|
252
|
-
|
|
253
|
-
#define COMPILEDFORMATDICT_UNPACK_METHODDEF \
|
|
254
|
-
{"unpack", (PyCFunction)CompiledFormatDict_unpack, METH_FASTCALL, CompiledFormatDict_unpack__doc__},
|
|
255
|
-
|
|
256
|
-
static PyObject *
|
|
257
|
-
CompiledFormatDict_unpack_impl(PyCompiledFormatDictObject *self,
|
|
258
|
-
Py_buffer *data);
|
|
259
|
-
|
|
260
|
-
static PyObject *
|
|
261
|
-
CompiledFormatDict_unpack(PyCompiledFormatDictObject *self, PyObject **args, Py_ssize_t nargs, PyObject *kwnames)
|
|
262
|
-
{
|
|
263
|
-
PyObject *return_value = NULL;
|
|
264
|
-
static const char * const _keywords[] = {"data", NULL};
|
|
265
|
-
static _PyArg_Parser _parser = {"y*:unpack", _keywords, 0};
|
|
266
|
-
Py_buffer data = {NULL, NULL};
|
|
267
|
-
|
|
268
|
-
if (!_PyArg_ParseStack(args, nargs, kwnames, &_parser,
|
|
269
|
-
&data)) {
|
|
270
|
-
goto exit;
|
|
271
|
-
}
|
|
272
|
-
return_value = CompiledFormatDict_unpack_impl(self, &data);
|
|
273
|
-
|
|
274
|
-
exit:
|
|
275
|
-
/* Cleanup for data */
|
|
276
|
-
if (data.obj) {
|
|
277
|
-
PyBuffer_Release(&data);
|
|
278
|
-
}
|
|
279
|
-
|
|
280
|
-
return return_value;
|
|
281
|
-
}
|
|
282
|
-
|
|
283
|
-
PyDoc_STRVAR(CompiledFormatDict_unpack_from__doc__,
|
|
284
|
-
"unpack_from($self, /, data, offset=0)\n"
|
|
285
|
-
"--\n"
|
|
286
|
-
"\n"
|
|
287
|
-
"Unpack data into a dict starting at \'offset\' bits.\n"
|
|
288
|
-
"\n"
|
|
289
|
-
"Return a dict containing unpacked values.");
|
|
290
|
-
|
|
291
|
-
#define COMPILEDFORMATDICT_UNPACK_FROM_METHODDEF \
|
|
292
|
-
{"unpack_from", (PyCFunction)CompiledFormatDict_unpack_from, METH_FASTCALL, CompiledFormatDict_unpack_from__doc__},
|
|
293
|
-
|
|
294
|
-
static PyObject *
|
|
295
|
-
CompiledFormatDict_unpack_from_impl(PyCompiledFormatDictObject *self,
|
|
296
|
-
Py_buffer *data, Py_ssize_t offset);
|
|
297
|
-
|
|
298
|
-
static PyObject *
|
|
299
|
-
CompiledFormatDict_unpack_from(PyCompiledFormatDictObject *self, PyObject **args, Py_ssize_t nargs, PyObject *kwnames)
|
|
300
|
-
{
|
|
301
|
-
PyObject *return_value = NULL;
|
|
302
|
-
static const char * const _keywords[] = {"data", "offset", NULL};
|
|
303
|
-
static _PyArg_Parser _parser = {"y*|n:unpack_from", _keywords, 0};
|
|
304
|
-
Py_buffer data = {NULL, NULL};
|
|
305
|
-
Py_ssize_t offset = 0;
|
|
306
|
-
|
|
307
|
-
if (!_PyArg_ParseStack(args, nargs, kwnames, &_parser,
|
|
308
|
-
&data, &offset)) {
|
|
309
|
-
goto exit;
|
|
310
|
-
}
|
|
311
|
-
return_value = CompiledFormatDict_unpack_from_impl(self, &data, offset);
|
|
312
|
-
|
|
313
|
-
exit:
|
|
314
|
-
/* Cleanup for data */
|
|
315
|
-
if (data.obj) {
|
|
316
|
-
PyBuffer_Release(&data);
|
|
317
|
-
}
|
|
318
|
-
|
|
319
|
-
return return_value;
|
|
320
|
-
}
|
|
321
|
-
|
|
322
|
-
PyDoc_STRVAR(pack_dict__doc__,
|
|
323
|
-
"pack_dict($module, /, fmt, names, data)\n"
|
|
324
|
-
"--\n"
|
|
325
|
-
"\n"
|
|
326
|
-
"Pack the dict data into a bytes object according to format.\n"
|
|
327
|
-
"\n"
|
|
328
|
-
"The order of value is determines by the list \'names\'.");
|
|
329
|
-
|
|
330
|
-
#define PACK_DICT_METHODDEF \
|
|
331
|
-
{"pack_dict", (PyCFunction)pack_dict, METH_FASTCALL, pack_dict__doc__},
|
|
332
|
-
|
|
333
|
-
static PyObject *
|
|
334
|
-
pack_dict_impl(PyObject *module, const char *fmt, PyObject *names,
|
|
335
|
-
PyObject *data);
|
|
336
|
-
|
|
337
|
-
static PyObject *
|
|
338
|
-
pack_dict(PyObject *module, PyObject **args, Py_ssize_t nargs, PyObject *kwnames)
|
|
339
|
-
{
|
|
340
|
-
PyObject *return_value = NULL;
|
|
341
|
-
static const char * const _keywords[] = {"fmt", "names", "data", NULL};
|
|
342
|
-
static _PyArg_Parser _parser = {"sOO:pack_dict", _keywords, 0};
|
|
343
|
-
const char *fmt;
|
|
344
|
-
PyObject *names;
|
|
345
|
-
PyObject *data;
|
|
346
|
-
|
|
347
|
-
if (!_PyArg_ParseStack(args, nargs, kwnames, &_parser,
|
|
348
|
-
&fmt, &names, &data)) {
|
|
349
|
-
goto exit;
|
|
350
|
-
}
|
|
351
|
-
return_value = pack_dict_impl(module, fmt, names, data);
|
|
352
|
-
|
|
353
|
-
exit:
|
|
354
|
-
return return_value;
|
|
355
|
-
}
|
|
356
|
-
|
|
357
|
-
PyDoc_STRVAR(pack_into_dict__doc__,
|
|
358
|
-
"pack_into_dict($module, /, fmt, names, buf, offset, data, *,\n"
|
|
359
|
-
" fill_padding=True)\n"
|
|
360
|
-
"--\n"
|
|
361
|
-
"\n"
|
|
362
|
-
"Pack data into a bytes object, starting at bit offset given by the offset argument.\n"
|
|
363
|
-
"\n"
|
|
364
|
-
"With fill_padding=False, passing bits in \'buf\' will not be modified.");
|
|
365
|
-
|
|
366
|
-
#define PACK_INTO_DICT_METHODDEF \
|
|
367
|
-
{"pack_into_dict", (PyCFunction)pack_into_dict, METH_FASTCALL, pack_into_dict__doc__},
|
|
368
|
-
|
|
369
|
-
static PyObject *
|
|
370
|
-
pack_into_dict_impl(PyObject *module, const char *fmt, PyObject *names,
|
|
371
|
-
Py_buffer *buf, Py_ssize_t offset, PyObject *data,
|
|
372
|
-
int fill_padding);
|
|
373
|
-
|
|
374
|
-
static PyObject *
|
|
375
|
-
pack_into_dict(PyObject *module, PyObject **args, Py_ssize_t nargs, PyObject *kwnames)
|
|
376
|
-
{
|
|
377
|
-
PyObject *return_value = NULL;
|
|
378
|
-
static const char * const _keywords[] = {"fmt", "names", "buf", "offset", "data", "fill_padding", NULL};
|
|
379
|
-
static _PyArg_Parser _parser = {"sOy*nO|$p:pack_into_dict", _keywords, 0};
|
|
380
|
-
const char *fmt;
|
|
381
|
-
PyObject *names;
|
|
382
|
-
Py_buffer buf = {NULL, NULL};
|
|
383
|
-
Py_ssize_t offset;
|
|
384
|
-
PyObject *data;
|
|
385
|
-
int fill_padding = 1;
|
|
386
|
-
|
|
387
|
-
if (!_PyArg_ParseStack(args, nargs, kwnames, &_parser,
|
|
388
|
-
&fmt, &names, &buf, &offset, &data, &fill_padding)) {
|
|
389
|
-
goto exit;
|
|
390
|
-
}
|
|
391
|
-
return_value = pack_into_dict_impl(module, fmt, names, &buf, offset, data, fill_padding);
|
|
392
|
-
|
|
393
|
-
exit:
|
|
394
|
-
/* Cleanup for buf */
|
|
395
|
-
if (buf.obj) {
|
|
396
|
-
PyBuffer_Release(&buf);
|
|
397
|
-
}
|
|
398
|
-
|
|
399
|
-
return return_value;
|
|
400
|
-
}
|
|
401
|
-
|
|
402
|
-
PyDoc_STRVAR(unpack__doc__,
|
|
403
|
-
"unpack($module, /, fmt, data)\n"
|
|
404
|
-
"--\n"
|
|
405
|
-
"\n"
|
|
406
|
-
"Unpack data according to the format \'fmt\'. Returns a tuple.");
|
|
407
|
-
|
|
408
|
-
#define UNPACK_METHODDEF \
|
|
409
|
-
{"unpack", (PyCFunction)unpack, METH_FASTCALL, unpack__doc__},
|
|
410
|
-
|
|
411
|
-
static PyObject *
|
|
412
|
-
unpack_impl(PyObject *module, const char *fmt, Py_buffer *data);
|
|
413
|
-
|
|
414
|
-
static PyObject *
|
|
415
|
-
unpack(PyObject *module, PyObject **args, Py_ssize_t nargs, PyObject *kwnames)
|
|
416
|
-
{
|
|
417
|
-
PyObject *return_value = NULL;
|
|
418
|
-
static const char * const _keywords[] = {"fmt", "data", NULL};
|
|
419
|
-
static _PyArg_Parser _parser = {"sy*:unpack", _keywords, 0};
|
|
420
|
-
const char *fmt;
|
|
421
|
-
Py_buffer data = {NULL, NULL};
|
|
422
|
-
|
|
423
|
-
if (!_PyArg_ParseStack(args, nargs, kwnames, &_parser,
|
|
424
|
-
&fmt, &data)) {
|
|
425
|
-
goto exit;
|
|
426
|
-
}
|
|
427
|
-
return_value = unpack_impl(module, fmt, &data);
|
|
428
|
-
|
|
429
|
-
exit:
|
|
430
|
-
/* Cleanup for data */
|
|
431
|
-
if (data.obj) {
|
|
432
|
-
PyBuffer_Release(&data);
|
|
433
|
-
}
|
|
434
|
-
|
|
435
|
-
return return_value;
|
|
436
|
-
}
|
|
437
|
-
|
|
438
|
-
PyDoc_STRVAR(unpack_from__doc__,
|
|
439
|
-
"unpack_from($module, /, fmt, data, offset=0)\n"
|
|
440
|
-
"--\n"
|
|
441
|
-
"\n"
|
|
442
|
-
"Unpack data according to the format \'fmt\', starting at bit offset \'offset.\n"
|
|
443
|
-
"\n"
|
|
444
|
-
"Returns a tuple.");
|
|
445
|
-
|
|
446
|
-
#define UNPACK_FROM_METHODDEF \
|
|
447
|
-
{"unpack_from", (PyCFunction)unpack_from, METH_FASTCALL, unpack_from__doc__},
|
|
448
|
-
|
|
449
|
-
static PyObject *
|
|
450
|
-
unpack_from_impl(PyObject *module, const char *fmt, Py_buffer *data,
|
|
451
|
-
Py_ssize_t offset);
|
|
452
|
-
|
|
453
|
-
static PyObject *
|
|
454
|
-
unpack_from(PyObject *module, PyObject **args, Py_ssize_t nargs, PyObject *kwnames)
|
|
455
|
-
{
|
|
456
|
-
PyObject *return_value = NULL;
|
|
457
|
-
static const char * const _keywords[] = {"fmt", "data", "offset", NULL};
|
|
458
|
-
static _PyArg_Parser _parser = {"sy*|n:unpack_from", _keywords, 0};
|
|
459
|
-
const char *fmt;
|
|
460
|
-
Py_buffer data = {NULL, NULL};
|
|
461
|
-
Py_ssize_t offset = 0;
|
|
462
|
-
|
|
463
|
-
if (!_PyArg_ParseStack(args, nargs, kwnames, &_parser,
|
|
464
|
-
&fmt, &data, &offset)) {
|
|
465
|
-
goto exit;
|
|
466
|
-
}
|
|
467
|
-
return_value = unpack_from_impl(module, fmt, &data, offset);
|
|
468
|
-
|
|
469
|
-
exit:
|
|
470
|
-
/* Cleanup for data */
|
|
471
|
-
if (data.obj) {
|
|
472
|
-
PyBuffer_Release(&data);
|
|
473
|
-
}
|
|
474
|
-
|
|
475
|
-
return return_value;
|
|
476
|
-
}
|
|
477
|
-
|
|
478
|
-
PyDoc_STRVAR(unpack_dict__doc__,
|
|
479
|
-
"unpack_dict($module, /, fmt, names, data)\n"
|
|
480
|
-
"--\n"
|
|
481
|
-
"\n"
|
|
482
|
-
"Unpack data according to \'fmt\'.\n"
|
|
483
|
-
"\n"
|
|
484
|
-
"Returns a dict which keys are \'names\'.");
|
|
485
|
-
|
|
486
|
-
#define UNPACK_DICT_METHODDEF \
|
|
487
|
-
{"unpack_dict", (PyCFunction)unpack_dict, METH_FASTCALL, unpack_dict__doc__},
|
|
488
|
-
|
|
489
|
-
static PyObject *
|
|
490
|
-
unpack_dict_impl(PyObject *module, const char *fmt, PyObject *names,
|
|
491
|
-
Py_buffer *data);
|
|
492
|
-
|
|
493
|
-
static PyObject *
|
|
494
|
-
unpack_dict(PyObject *module, PyObject **args, Py_ssize_t nargs, PyObject *kwnames)
|
|
495
|
-
{
|
|
496
|
-
PyObject *return_value = NULL;
|
|
497
|
-
static const char * const _keywords[] = {"fmt", "names", "data", NULL};
|
|
498
|
-
static _PyArg_Parser _parser = {"sOy*:unpack_dict", _keywords, 0};
|
|
499
|
-
const char *fmt;
|
|
500
|
-
PyObject *names;
|
|
501
|
-
Py_buffer data = {NULL, NULL};
|
|
502
|
-
|
|
503
|
-
if (!_PyArg_ParseStack(args, nargs, kwnames, &_parser,
|
|
504
|
-
&fmt, &names, &data)) {
|
|
505
|
-
goto exit;
|
|
506
|
-
}
|
|
507
|
-
return_value = unpack_dict_impl(module, fmt, names, &data);
|
|
508
|
-
|
|
509
|
-
exit:
|
|
510
|
-
/* Cleanup for data */
|
|
511
|
-
if (data.obj) {
|
|
512
|
-
PyBuffer_Release(&data);
|
|
513
|
-
}
|
|
514
|
-
|
|
515
|
-
return return_value;
|
|
516
|
-
}
|
|
517
|
-
|
|
518
|
-
PyDoc_STRVAR(unpack_from_dict__doc__,
|
|
519
|
-
"unpack_from_dict($module, /, fmt, names, data, offset=0)\n"
|
|
520
|
-
"--\n"
|
|
521
|
-
"\n"
|
|
522
|
-
"Unpack data according to \'fmt\' starting at bit offset \'offset\'.\n"
|
|
523
|
-
"\n"
|
|
524
|
-
"Returns a dict which keys are \'names\'.");
|
|
525
|
-
|
|
526
|
-
#define UNPACK_FROM_DICT_METHODDEF \
|
|
527
|
-
{"unpack_from_dict", (PyCFunction)unpack_from_dict, METH_FASTCALL, unpack_from_dict__doc__},
|
|
528
|
-
|
|
529
|
-
static PyObject *
|
|
530
|
-
unpack_from_dict_impl(PyObject *module, const char *fmt, PyObject *names,
|
|
531
|
-
Py_buffer *data, Py_ssize_t offset);
|
|
532
|
-
|
|
533
|
-
static PyObject *
|
|
534
|
-
unpack_from_dict(PyObject *module, PyObject **args, Py_ssize_t nargs, PyObject *kwnames)
|
|
535
|
-
{
|
|
536
|
-
PyObject *return_value = NULL;
|
|
537
|
-
static const char * const _keywords[] = {"fmt", "names", "data", "offset", NULL};
|
|
538
|
-
static _PyArg_Parser _parser = {"sOy*|n:unpack_from_dict", _keywords, 0};
|
|
539
|
-
const char *fmt;
|
|
540
|
-
PyObject *names;
|
|
541
|
-
Py_buffer data = {NULL, NULL};
|
|
542
|
-
Py_ssize_t offset = 0;
|
|
543
|
-
|
|
544
|
-
if (!_PyArg_ParseStack(args, nargs, kwnames, &_parser,
|
|
545
|
-
&fmt, &names, &data, &offset)) {
|
|
546
|
-
goto exit;
|
|
547
|
-
}
|
|
548
|
-
return_value = unpack_from_dict_impl(module, fmt, names, &data, offset);
|
|
549
|
-
|
|
550
|
-
exit:
|
|
551
|
-
/* Cleanup for data */
|
|
552
|
-
if (data.obj) {
|
|
553
|
-
PyBuffer_Release(&data);
|
|
554
|
-
}
|
|
555
|
-
|
|
556
|
-
return return_value;
|
|
557
|
-
}
|
|
558
|
-
|
|
559
|
-
PyDoc_STRVAR(compile__doc__,
|
|
560
|
-
"compile($module, /, fmt, names=None)\n"
|
|
561
|
-
"--\n"
|
|
562
|
-
"\n"
|
|
563
|
-
"Returns a compiled object for the format \'fmt\'.");
|
|
564
|
-
|
|
565
|
-
#define COMPILE_METHODDEF \
|
|
566
|
-
{"compile", (PyCFunction)compile, METH_FASTCALL, compile__doc__},
|
|
567
|
-
|
|
568
|
-
static PyObject *
|
|
569
|
-
compile_impl(PyObject *module, const char *fmt, PyObject *names);
|
|
570
|
-
|
|
571
|
-
static PyObject *
|
|
572
|
-
compile(PyObject *module, PyObject **args, Py_ssize_t nargs, PyObject *kwnames)
|
|
573
|
-
{
|
|
574
|
-
PyObject *return_value = NULL;
|
|
575
|
-
static const char * const _keywords[] = {"fmt", "names", NULL};
|
|
576
|
-
static _PyArg_Parser _parser = {"s|O:compile", _keywords, 0};
|
|
577
|
-
const char *fmt;
|
|
578
|
-
PyObject *names = Py_None;
|
|
579
|
-
|
|
580
|
-
if (!_PyArg_ParseStack(args, nargs, kwnames, &_parser,
|
|
581
|
-
&fmt, &names)) {
|
|
582
|
-
goto exit;
|
|
583
|
-
}
|
|
584
|
-
return_value = compile_impl(module, fmt, names);
|
|
585
|
-
|
|
586
|
-
exit:
|
|
587
|
-
return return_value;
|
|
588
|
-
}
|
|
589
|
-
|
|
590
|
-
PyDoc_STRVAR(calcsize__doc__,
|
|
591
|
-
"calcsize($module, /, fmt)\n"
|
|
592
|
-
"--\n"
|
|
593
|
-
"\n"
|
|
594
|
-
"Return size in bits of the bit described by the format string.");
|
|
595
|
-
|
|
596
|
-
#define CALCSIZE_METHODDEF \
|
|
597
|
-
{"calcsize", (PyCFunction)calcsize, METH_FASTCALL, calcsize__doc__},
|
|
598
|
-
|
|
599
|
-
static Py_ssize_t
|
|
600
|
-
calcsize_impl(PyObject *module, const char *fmt);
|
|
601
|
-
|
|
602
|
-
static PyObject *
|
|
603
|
-
calcsize(PyObject *module, PyObject **args, Py_ssize_t nargs, PyObject *kwnames)
|
|
604
|
-
{
|
|
605
|
-
PyObject *return_value = NULL;
|
|
606
|
-
static const char * const _keywords[] = {"fmt", NULL};
|
|
607
|
-
static _PyArg_Parser _parser = {"s:calcsize", _keywords, 0};
|
|
608
|
-
const char *fmt;
|
|
609
|
-
Py_ssize_t _return_value;
|
|
610
|
-
|
|
611
|
-
if (!_PyArg_ParseStack(args, nargs, kwnames, &_parser,
|
|
612
|
-
&fmt)) {
|
|
613
|
-
goto exit;
|
|
614
|
-
}
|
|
615
|
-
_return_value = calcsize_impl(module, fmt);
|
|
616
|
-
if ((_return_value == -1) && PyErr_Occurred()) {
|
|
617
|
-
goto exit;
|
|
618
|
-
}
|
|
619
|
-
return_value = PyLong_FromSsize_t(_return_value);
|
|
620
|
-
|
|
621
|
-
exit:
|
|
622
|
-
return return_value;
|
|
623
|
-
}
|
|
624
|
-
|
|
625
|
-
PyDoc_STRVAR(byteswap__doc__,
|
|
626
|
-
"byteswap($module, /, fmt, data, offset=0)\n"
|
|
627
|
-
"--\n"
|
|
628
|
-
"\n"
|
|
629
|
-
"Swap bytes in `data` according to `fmt`, starting at byte `offset` and return the result.\n"
|
|
630
|
-
"\n"
|
|
631
|
-
"`fmt` must be an iterable, iterating over\n"
|
|
632
|
-
"number of bytes to swap. For example, the format string ``\'24\'``\n"
|
|
633
|
-
"applied to the bytes ``b\'\\x00\\x11\\x22\\x33\\x44\\x55\'`` will\n"
|
|
634
|
-
"produce the result ``b\'\\x11\\x00\\x55\\x44\\x33\\x22\'``.");
|
|
635
|
-
|
|
636
|
-
#define BYTESWAP_METHODDEF \
|
|
637
|
-
{"byteswap", (PyCFunction)byteswap, METH_FASTCALL, byteswap__doc__},
|
|
638
|
-
|
|
639
|
-
static PyObject *
|
|
640
|
-
byteswap_impl(PyObject *module, PyObject *fmt, Py_buffer *data,
|
|
641
|
-
Py_ssize_t offset);
|
|
642
|
-
|
|
643
|
-
static PyObject *
|
|
644
|
-
byteswap(PyObject *module, PyObject **args, Py_ssize_t nargs, PyObject *kwnames)
|
|
645
|
-
{
|
|
646
|
-
PyObject *return_value = NULL;
|
|
647
|
-
static const char * const _keywords[] = {"fmt", "data", "offset", NULL};
|
|
648
|
-
static _PyArg_Parser _parser = {"Oy*|n:byteswap", _keywords, 0};
|
|
649
|
-
PyObject *fmt;
|
|
650
|
-
Py_buffer data = {NULL, NULL};
|
|
651
|
-
Py_ssize_t offset = 0;
|
|
652
|
-
|
|
653
|
-
if (!_PyArg_ParseStack(args, nargs, kwnames, &_parser,
|
|
654
|
-
&fmt, &data, &offset)) {
|
|
655
|
-
goto exit;
|
|
656
|
-
}
|
|
657
|
-
return_value = byteswap_impl(module, fmt, &data, offset);
|
|
658
|
-
|
|
659
|
-
exit:
|
|
660
|
-
/* Cleanup for data */
|
|
661
|
-
if (data.obj) {
|
|
662
|
-
PyBuffer_Release(&data);
|
|
663
|
-
}
|
|
664
|
-
|
|
665
|
-
return return_value;
|
|
666
|
-
}
|
|
667
|
-
/*[clinic end generated code: output=93b815cb6fb17f58 input=a9049054013a1b77]*/
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|