summaryrefslogtreecommitdiffstats
path: root/Modules
diff options
context:
space:
mode:
authorCharlie Zhao <zhaoyu_hit@qq.com>2022-10-31 18:22:02 (GMT)
committerGitHub <noreply@github.com>2022-10-31 18:22:02 (GMT)
commitd3d1738acd4f62869d7f1e119c257e2ee46fd16f (patch)
tree207129f5f81a0ad2d5b02c44f863723771a95da3 /Modules
parent1907e5a7cca9b7348f76c3f1128058ddc4623f22 (diff)
downloadcpython-d3d1738acd4f62869d7f1e119c257e2ee46fd16f.zip
cpython-d3d1738acd4f62869d7f1e119c257e2ee46fd16f.tar.gz
cpython-d3d1738acd4f62869d7f1e119c257e2ee46fd16f.tar.bz2
[3.10] gh-98793: Fix typecheck in `overlapped.c` (GH-98835) (#98890)
Co-authored-by: Kumar Aditya <59607654+kumaraditya303@users.noreply.github.com> (cherry picked from commit 3ac8c0ab6ee819a14b1c8e0992acbaf376a46058)
Diffstat (limited to 'Modules')
-rw-r--r--Modules/clinic/overlapped.c.h10
-rw-r--r--Modules/overlapped.c8
2 files changed, 9 insertions, 9 deletions
diff --git a/Modules/clinic/overlapped.c.h b/Modules/clinic/overlapped.c.h
index 43e14a9..fab0633 100644
--- a/Modules/clinic/overlapped.c.h
+++ b/Modules/clinic/overlapped.c.h
@@ -831,8 +831,8 @@ _overlapped_WSAConnect(PyObject *module, PyObject *const *args, Py_ssize_t nargs
HANDLE ConnectSocket;
PyObject *AddressObj;
- if (!_PyArg_ParseStack(args, nargs, ""F_HANDLE"O:WSAConnect",
- &ConnectSocket, &AddressObj)) {
+ if (!_PyArg_ParseStack(args, nargs, ""F_HANDLE"O!:WSAConnect",
+ &ConnectSocket, &PyTuple_Type, &AddressObj)) {
goto exit;
}
return_value = _overlapped_WSAConnect_impl(module, ConnectSocket, AddressObj);
@@ -864,8 +864,8 @@ _overlapped_Overlapped_WSASendTo(OverlappedObject *self, PyObject *const *args,
DWORD flags;
PyObject *AddressObj;
- if (!_PyArg_ParseStack(args, nargs, ""F_HANDLE"OkO:WSASendTo",
- &handle, &bufobj, &flags, &AddressObj)) {
+ if (!_PyArg_ParseStack(args, nargs, ""F_HANDLE"OkO!:WSASendTo",
+ &handle, &bufobj, &flags, &PyTuple_Type, &AddressObj)) {
goto exit;
}
return_value = _overlapped_Overlapped_WSASendTo_impl(self, handle, bufobj, flags, AddressObj);
@@ -905,4 +905,4 @@ _overlapped_Overlapped_WSARecvFrom(OverlappedObject *self, PyObject *const *args
exit:
return return_value;
}
-/*[clinic end generated code: output=d3215a6ca589735a input=a9049054013a1b77]*/
+/*[clinic end generated code: output=e685b61b3da0524d input=a9049054013a1b77]*/
diff --git a/Modules/overlapped.c b/Modules/overlapped.c
index 7c45708..b9ca86c 100644
--- a/Modules/overlapped.c
+++ b/Modules/overlapped.c
@@ -1638,7 +1638,7 @@ Overlapped_traverse(OverlappedObject *self, visitproc visit, void *arg)
_overlapped.WSAConnect
client_handle as ConnectSocket: HANDLE
- address_as_bytes as AddressObj: object
+ address_as_bytes as AddressObj: object(subclass_of='&PyTuple_Type')
/
Bind a remote address to a connectionless (UDP) socket.
@@ -1647,7 +1647,7 @@ Bind a remote address to a connectionless (UDP) socket.
static PyObject *
_overlapped_WSAConnect_impl(PyObject *module, HANDLE ConnectSocket,
PyObject *AddressObj)
-/*[clinic end generated code: output=ea0b4391e94dad63 input=169f8075e9ae7fa4]*/
+/*[clinic end generated code: output=ea0b4391e94dad63 input=7cf65313d49c015a]*/
{
char AddressBuf[sizeof(struct sockaddr_in6)];
SOCKADDR *Address = (SOCKADDR*)AddressBuf;
@@ -1681,7 +1681,7 @@ _overlapped.Overlapped.WSASendTo
handle: HANDLE
buf as bufobj: object
flags: DWORD
- address_as_bytes as AddressObj: object
+ address_as_bytes as AddressObj: object(subclass_of='&PyTuple_Type')
/
Start overlapped sendto over a connectionless (UDP) socket.
@@ -1691,7 +1691,7 @@ static PyObject *
_overlapped_Overlapped_WSASendTo_impl(OverlappedObject *self, HANDLE handle,
PyObject *bufobj, DWORD flags,
PyObject *AddressObj)
-/*[clinic end generated code: output=fe0ff55eb60d65e1 input=f709e6ecebd9bc18]*/
+/*[clinic end generated code: output=fe0ff55eb60d65e1 input=932a34941465df43]*/
{
char AddressBuf[sizeof(struct sockaddr_in6)];
SOCKADDR *Address = (SOCKADDR*)AddressBuf;