Skip to content

Commit 5e4947a

Browse files
committed
args -> values and request a writable buffer
1 parent c0d7480 commit 5e4947a

2 files changed

Lines changed: 27 additions & 25 deletions

File tree

Modules/_struct.c

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -2228,17 +2228,17 @@ s_pack_internal(PyStructObject *soself, PyObject *const *args,
22282228
/*[clinic input]
22292229
Struct.pack as s_pack
22302230
2231-
*args: array
2231+
*values as args: array
22322232
2233-
Return a bytes object with args, packed according the format self.
2233+
Return a bytes object with values, packed according the format self.
22342234
22352235
See help(struct) for more on format strings.
22362236
[clinic start generated code]*/
22372237

22382238
static PyObject *
22392239
s_pack_impl(PyStructObject *self, PyObject * const *args,
22402240
Py_ssize_t args_length)
2241-
/*[clinic end generated code: output=dc06e32695719fce input=24c5c3c677d4d7e2]*/
2241+
/*[clinic end generated code: output=dc06e32695719fce input=ef2ef79bdfff3584]*/
22422242
{
22432243
_structmodulestate *state = get_struct_state_structinst(self);
22442244

@@ -2271,12 +2271,12 @@ s_pack_impl(PyStructObject *self, PyObject * const *args,
22712271
/*[clinic input]
22722272
Struct.pack_into as s_pack_into
22732273
2274-
buffer: Py_buffer
2274+
buffer: Py_buffer(accept={rwbuffer})
22752275
offset: Py_ssize_t
22762276
/
2277-
*args: array
2277+
*values as args: array
22782278
2279-
Pack args to the writtable buffer according to the format self.
2279+
Pack values to the writtable buffer according to the format self.
22802280
22812281
The packed bytes written starting at offset. See help(struct) for more
22822282
on format strings.
@@ -2285,7 +2285,7 @@ on format strings.
22852285
static PyObject *
22862286
s_pack_into_impl(PyStructObject *self, Py_buffer *buffer, Py_ssize_t offset,
22872287
PyObject * const *args, Py_ssize_t args_length)
2288-
/*[clinic end generated code: output=40e08ea63f1d57bd input=687fd92ef694b362]*/
2288+
/*[clinic end generated code: output=40e08ea63f1d57bd input=c6540e61893bb142]*/
22892289
{
22902290
_structmodulestate *state = get_struct_state_structinst(self);
22912291

@@ -2539,17 +2539,17 @@ pack
25392539
25402540
format as s_object: cache_struct
25412541
/
2542-
*args: array
2542+
*values as args: array
25432543
2544-
Return a bytes object with args, packed according the format string.
2544+
Return a bytes object with values, packed according the format string.
25452545
25462546
See help(struct) for more on format strings.
25472547
[clinic start generated code]*/
25482548

25492549
static PyObject *
25502550
pack_impl(PyObject *module, PyStructObject *s_object, PyObject * const *args,
25512551
Py_ssize_t args_length)
2552-
/*[clinic end generated code: output=3c490d3313013a77 input=7ad2023f64935c39]*/
2552+
/*[clinic end generated code: output=3c490d3313013a77 input=ca22c200fceadd40]*/
25532553
{
25542554
return s_pack_impl(s_object, args, args_length);
25552555
}
@@ -2558,12 +2558,12 @@ pack_impl(PyObject *module, PyStructObject *s_object, PyObject * const *args,
25582558
pack_into
25592559
25602560
format as s_object: cache_struct
2561-
buffer: Py_buffer
2561+
buffer: Py_buffer(accept={rwbuffer})
25622562
offset: Py_ssize_t
25632563
/
2564-
*args: array
2564+
*values as args: array
25652565
2566-
Pack args to the writtable buffer according to the format string.
2566+
Pack values to the writtable buffer according to the format string.
25672567
25682568
The packed bytes written starting at offset. See help(struct) for more
25692569
on format strings.
@@ -2573,7 +2573,7 @@ static PyObject *
25732573
pack_into_impl(PyObject *module, PyStructObject *s_object, Py_buffer *buffer,
25742574
Py_ssize_t offset, PyObject * const *args,
25752575
Py_ssize_t args_length)
2576-
/*[clinic end generated code: output=86bd2d8d0628b540 input=4ace36b845e3167e]*/
2576+
/*[clinic end generated code: output=86bd2d8d0628b540 input=4b6c16fe7a0b81be]*/
25772577
{
25782578
return s_pack_into_impl(s_object, buffer, offset, args, args_length);
25792579
}

Modules/clinic/_struct.c.h

Lines changed: 13 additions & 11 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)