@@ -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