Skip to content

Commit 74b5139

Browse files
committed
Keep variable name data_fast per review
@vstinner prefers the original name; revert the rename and keep the diff minimal.
1 parent 6e6ff76 commit 74b5139

1 file changed

Lines changed: 6 additions & 6 deletions

File tree

Modules/socketmodule.c

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4851,19 +4851,19 @@ sock_sendmsg_iovec(PySocketSockObject *s, PyObject *data_arg,
48514851
Py_ssize_t ndataparts, ndatabufs = 0;
48524852
int result = -1;
48534853
struct iovec *iovs = NULL;
4854-
PyObject *data_tuple = NULL;
4854+
PyObject *data_fast = NULL;
48554855
Py_buffer *databufs = NULL;
48564856

48574857
/* Fill in an iovec for each message part, and save the Py_buffer
48584858
structs to release afterwards. */
4859-
data_tuple = PySequence_Tuple(data_arg);
4860-
if (data_tuple == NULL) {
4859+
data_fast = PySequence_Tuple(data_arg);
4860+
if (data_fast == NULL) {
48614861
PyErr_SetString(PyExc_TypeError,
48624862
"sendmsg() argument 1 must be an iterable");
48634863
goto finally;
48644864
}
48654865

4866-
ndataparts = PyTuple_GET_SIZE(data_tuple);
4866+
ndataparts = PyTuple_GET_SIZE(data_fast);
48674867
if (ndataparts > INT_MAX) {
48684868
PyErr_SetString(PyExc_OSError, "sendmsg() argument 1 is too long");
48694869
goto finally;
@@ -4885,7 +4885,7 @@ sock_sendmsg_iovec(PySocketSockObject *s, PyObject *data_arg,
48854885
}
48864886
}
48874887
for (; ndatabufs < ndataparts; ndatabufs++) {
4888-
if (PyObject_GetBuffer(PyTuple_GET_ITEM(data_tuple, ndatabufs),
4888+
if (PyObject_GetBuffer(PyTuple_GET_ITEM(data_fast, ndatabufs),
48894889
&databufs[ndatabufs], PyBUF_SIMPLE) < 0)
48904890
goto finally;
48914891
iovs[ndatabufs].iov_base = databufs[ndatabufs].buf;
@@ -4895,7 +4895,7 @@ sock_sendmsg_iovec(PySocketSockObject *s, PyObject *data_arg,
48954895
finally:
48964896
*databufsout = databufs;
48974897
*ndatabufsout = ndatabufs;
4898-
Py_XDECREF(data_tuple);
4898+
Py_XDECREF(data_fast);
48994899
return result;
49004900
}
49014901

0 commit comments

Comments
 (0)