]> granicus.if.org Git - python/commitdiff
Issue #23834: Fix socket.sendto(), use the C Py_ssize_t type to store the
authorVictor Stinner <victor.stinner@gmail.com>
Thu, 2 Apr 2015 15:16:08 +0000 (17:16 +0200)
committerVictor Stinner <victor.stinner@gmail.com>
Thu, 2 Apr 2015 15:16:08 +0000 (17:16 +0200)
result of sendto() instead of the C int type.

Misc/NEWS
Modules/socketmodule.c

index 7deb82012c34510d01388b29aa9f7cc31c4fe18e..66ecff1468460678f880d51e5add77b7c1057064 100644 (file)
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -24,6 +24,9 @@ Core and Builtins
 Library
 -------
 
+- Issue #23834: Fix socket.sendto(), use the C Py_ssize_t type to store the
+  result of sendto() instead of the C int type.
+
 - Issue #21526: Tkinter now supports new boolean type in Tcl 8.5.
 
 - Issue #23838: linecache now clears the cache and returns an empty result on
index e9e482e874608ab1fc7c6aefb9d0281be0a0f408..b6f2bf53ab8140167b0aed7ce3a151f887010e00 100644 (file)
@@ -3366,7 +3366,8 @@ sock_sendto(PySocketSockObject *s, PyObject *args)
     char *buf;
     Py_ssize_t len, arglen;
     sock_addr_t addrbuf;
-    int addrlen, n = -1, flags, timeout;
+    int addrlen, flags, timeout;
+    Py_ssize_t n = -1;
 
     flags = 0;
     arglen = PyTuple_Size(args);