summaryrefslogtreecommitdiff
path: root/Modules/socketmodule.c
diff options
context:
space:
mode:
authorGuido van Rossum <guido@python.org>1995-01-10 20:56:29 +0000
committerGuido van Rossum <guido@python.org>1995-01-10 20:56:29 +0000
commita597dde3f1959127c33296a77f76331b59449c01 (patch)
tree1b41173d59525e5c16ea772aaa60dc0c123dc409 /Modules/socketmodule.c
parent6c1874fc2bd0e0d2e30de78fe1f1fe8bcf8a20be (diff)
downloadcpython-git-a597dde3f1959127c33296a77f76331b59449c01.tar.gz
cosmetic changes so these modules will work with the strict new naming scheme
Diffstat (limited to 'Modules/socketmodule.c')
-rw-r--r--Modules/socketmodule.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/Modules/socketmodule.c b/Modules/socketmodule.c
index 9525dbaf1e..194ec5e192 100644
--- a/Modules/socketmodule.c
+++ b/Modules/socketmodule.c
@@ -580,7 +580,7 @@ BUILD_FUNC_DEF_2(PySocketSock_getsockopt,PySocketSockObject *,s, PyObject *,args
if (buf == NULL)
return NULL;
res = getsockopt(s->sock_fd, level, optname,
- (ANY *)getstringvalue(buf), &buflen);
+ (ANY *)PyString_AsString(buf), &buflen);
if (res < 0) {
Py_DECREF(buf);
return PySocket_Err();
@@ -732,7 +732,7 @@ BUILD_FUNC_DEF_2(PySocketSock_listen,PySocketSockObject *,s, PyObject *,args)
static PyObject *
BUILD_FUNC_DEF_2(PySocketSock_makefile,PySocketSockObject *,s, PyObject *,args)
{
- extern int fclose PROTO((FILE *));
+ extern int fclose Py_PROTO((FILE *));
char *mode;
int fd;
FILE *fp;
@@ -762,7 +762,7 @@ BUILD_FUNC_DEF_2(PySocketSock_recv,PySocketSockObject *,s, PyObject *,args)
if (buf == NULL)
return NULL;
Py_BEGIN_ALLOW_THREADS
- n = recv(s->sock_fd, getstringvalue(buf), len, flags);
+ n = recv(s->sock_fd, PyString_AsString(buf), len, flags);
Py_END_ALLOW_THREADS
if (n < 0)
return PySocket_Err();
@@ -937,12 +937,12 @@ BUILD_FUNC_DEF_1(PySocketSock_repr,PySocketSockObject *,s)
PyObject *addro;
struct sockaddr *addr;
char buf[512];
- object *t, *comma, *v;
+ PyObject *t, *comma, *v;
int i, len;
sprintf(buf,
"<socket object, fd=%d, family=%d, type=%d, protocol=%d>",
s->sock_fd, s->sock_family, s->sock_type, s->sock_proto);
- t = newstringobject(buf);
+ t = PyString_FromString(buf);
return t;
}