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
603e8679
Commit
603e8679
authored
Jun 11, 1996
by
Guido van Rossum
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Get rid of obsolete allowbroadcast().
Avoid core dumps in resizestring().
parent
1f3c12c9
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
23 deletions
+2
-23
Modules/socketmodule.c
Modules/socketmodule.c
+2
-23
No files found.
Modules/socketmodule.c
View file @
603e8679
...
...
@@ -471,27 +471,6 @@ BUILD_FUNC_DEF_2(PySocketSock_accept,PySocketSockObject *,s, PyObject *,args)
}
#if 0
/* s.allowbroadcast() method */
/* XXX obsolete -- will disappear in next release */
static PyObject *
BUILD_FUNC_DEF_2(PySocketSock_allowbroadcast,PySocketSockObject *,s, PyObject *,args)
{
int flag;
int res;
if (!PyArg_Parse(args, "i", &flag))
return NULL;
res = setsockopt(s->sock_fd, SOL_SOCKET, SO_BROADCAST,
(ANY *)&flag, sizeof flag);
if (res < 0)
return PySocket_Err();
Py_INCREF(Py_None);
return Py_None;
}
#endif
/* s.setblocking(1 | 0) method */
static
PyObject
*
...
...
@@ -789,7 +768,7 @@ BUILD_FUNC_DEF_2(PySocketSock_recv,PySocketSockObject *,s, PyObject *,args)
Py_DECREF
(
buf
);
return
PySocket_Err
();
}
if
(
_PyString_Resize
(
&
buf
,
n
)
<
0
)
if
(
n
!=
len
&&
_PyString_Resize
(
&
buf
,
n
)
<
0
)
return
NULL
;
return
buf
;
}
...
...
@@ -826,7 +805,7 @@ BUILD_FUNC_DEF_2(PySocketSock_recvfrom,PySocketSockObject *,s, PyObject *,args)
Py_DECREF
(
buf
);
return
PySocket_Err
();
}
if
(
_PyString_Resize
(
&
buf
,
n
)
<
0
)
if
(
n
!=
len
&&
_PyString_Resize
(
&
buf
,
n
)
<
0
)
return
NULL
;
addr
=
makesockaddr
((
struct
sockaddr
*
)
addrbuf
,
addrlen
);
ret
=
Py_BuildValue
(
"OO"
,
buf
,
addr
);
...
...
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