From: Victor Stinner Date: Thu, 2 Apr 2015 15:19:17 +0000 (+0200) Subject: Issue #23834: Fix socket.sendto(), use the C long type to store the result of X-Git-Tag: v2.7.10rc1~79 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=31c7e4fb1a7230823dd0d469611b2e2d3a9456eb;p=thirdparty%2FPython%2Fcpython.git Issue #23834: Fix socket.sendto(), use the C long type to store the result of sendto() instead of the C int type. --- diff --git a/Misc/NEWS b/Misc/NEWS index f9e2863ae722..55f1437e34bf 100644 --- a/Misc/NEWS +++ b/Misc/NEWS @@ -21,6 +21,9 @@ Core and Builtins Library ------- +- Issue #23834: Fix socket.sendto(), use the C long 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 diff --git a/Modules/socketmodule.c b/Modules/socketmodule.c index cbc3223d9894..5def531c4a39 100644 --- a/Modules/socketmodule.c +++ b/Modules/socketmodule.c @@ -2901,7 +2901,8 @@ sock_sendto(PySocketSockObject *s, PyObject *args) char *buf; Py_ssize_t len; sock_addr_t addrbuf; - int addrlen, n = -1, flags, timeout; + int addrlen, flags, timeout; + long n = -1; int arglen; flags = 0;