Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cpython
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
cpython
Commits
9befeb37
Commit
9befeb37
authored
Mar 17, 2011
by
Antoine Pitrou
Browse files
Options
Browse Files
Download
Plain Diff
Issue #5421: merge fix
parents
f40834f3
5e98141f
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
19 additions
and
6 deletions
+19
-6
Misc/NEWS
Misc/NEWS
+2
-0
Modules/socketmodule.c
Modules/socketmodule.c
+17
-6
No files found.
Misc/NEWS
View file @
9befeb37
...
...
@@ -40,6 +40,8 @@ Core and Builtins
Library
-------
-
Issue
#
5421
:
Fix
misleading
error
message
when
one
of
socket
.
sendto
()
's
arguments has the wrong type. Patch by Nikita Vetoshkin.
- Issue #10979: unittest stdout buffering now works with class and module
setup and teardown.
...
...
Modules/socketmodule.c
View file @
9befeb37
...
...
@@ -2747,17 +2747,28 @@ sock_sendto(PySocketSockObject *s, PyObject *args)
Py_buffer
pbuf
;
PyObject
*
addro
;
char
*
buf
;
Py_ssize_t
len
;
Py_ssize_t
len
,
arglen
;
sock_addr_t
addrbuf
;
int
addrlen
,
n
=
-
1
,
flags
,
timeout
;
flags
=
0
;
if
(
!
PyArg_ParseTuple
(
args
,
"y*O:sendto"
,
&
pbuf
,
&
addro
))
{
PyErr_Clear
();
if
(
!
PyArg_ParseTuple
(
args
,
"y*iO:sendto"
,
&
pbuf
,
&
flags
,
&
addro
))
return
NULL
;
arglen
=
PyTuple_Size
(
args
);
switch
(
arglen
)
{
case
2
:
PyArg_ParseTuple
(
args
,
"y*O:sendto"
,
&
pbuf
,
&
addro
);
break
;
case
3
:
PyArg_ParseTuple
(
args
,
"y*iO:sendto"
,
&
pbuf
,
&
flags
,
&
addro
);
break
;
default:
PyErr_Format
(
PyExc_TypeError
,
"sendto() takes 2 or 3 arguments (%d given)"
,
arglen
);
}
if
(
PyErr_Occurred
())
return
NULL
;
buf
=
pbuf
.
buf
;
len
=
pbuf
.
len
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment