summaryrefslogtreecommitdiff
path: root/Modules
diff options
context:
space:
mode:
authorThomas Wouters <thomas@python.org>2000-07-25 12:56:38 +0000
committerThomas Wouters <thomas@python.org>2000-07-25 12:56:38 +0000
commitdb3968cca9d80667695be4419c080c28f976c1ac (patch)
treef7bb863777532eeabb8d9ca8ebdf6f8fd38785d1 /Modules
parent58e680194e6a10180c2e41d18cf99180e9733d36 (diff)
downloadcpython-db3968cca9d80667695be4419c080c28f976c1ac.tar.gz
Use 'void' directly instead of the ANY #define, now that all code is ANSI C.
Leave the actual #define in for API compatibility.
Diffstat (limited to 'Modules')
-rw-r--r--Modules/dlmodule.c2
-rw-r--r--Modules/signalmodule.c2
-rw-r--r--Modules/socketmodule.c8
-rw-r--r--Modules/timemodule.c6
4 files changed, 9 insertions, 9 deletions
diff --git a/Modules/dlmodule.c b/Modules/dlmodule.c
index 09bd9d30e1..18e1458f1c 100644
--- a/Modules/dlmodule.c
+++ b/Modules/dlmodule.c
@@ -18,7 +18,7 @@ redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES.
#define RTLD_LAZY 1
#endif
-typedef ANY *PyUnivPtr;
+typedef void *PyUnivPtr;
typedef struct {
PyObject_HEAD
PyUnivPtr *dl_handle;
diff --git a/Modules/signalmodule.c b/Modules/signalmodule.c
index f200427963..4829dbfc63 100644
--- a/Modules/signalmodule.c
+++ b/Modules/signalmodule.c
@@ -633,7 +633,7 @@ PyErr_SetInterrupt(void)
{
is_tripped++;
Handlers[SIGINT].tripped = 1;
- Py_AddPendingCall((int (*)(ANY *))PyErr_CheckSignals, NULL);
+ Py_AddPendingCall((int (*)(void *))PyErr_CheckSignals, NULL);
}
void
diff --git a/Modules/socketmodule.c b/Modules/socketmodule.c
index e95e33927b..f146e8f125 100644
--- a/Modules/socketmodule.c
+++ b/Modules/socketmodule.c
@@ -799,7 +799,7 @@ PySocketSock_setsockopt(PySocketSockObject *s, PyObject *args)
&level, &optname, &buf, &buflen))
return NULL;
}
- res = setsockopt(s->sock_fd, level, optname, (ANY *)buf, buflen);
+ res = setsockopt(s->sock_fd, level, optname, (void *)buf, buflen);
if (res < 0)
return PySocket_Err();
Py_INCREF(Py_None);
@@ -841,7 +841,7 @@ PySocketSock_getsockopt(PySocketSockObject *s, PyObject *args)
int flag = 0;
socklen_t flagsize = sizeof flag;
res = getsockopt(s->sock_fd, level, optname,
- (ANY *)&flag, &flagsize);
+ (void *)&flag, &flagsize);
if (res < 0)
return PySocket_Err();
return PyInt_FromLong(flag);
@@ -855,7 +855,7 @@ PySocketSock_getsockopt(PySocketSockObject *s, PyObject *args)
if (buf == NULL)
return NULL;
res = getsockopt(s->sock_fd, level, optname,
- (ANY *)PyString_AsString(buf), &buflen);
+ (void *)PyString_AsString(buf), &buflen);
if (res < 0) {
Py_DECREF(buf);
return PySocket_Err();
@@ -1230,7 +1230,7 @@ PySocketSock_recvfrom(PySocketSockObject *s, PyObject *args)
#if defined(PYOS_OS2)
(struct sockaddr *)addrbuf, &addrlen
#else
- (ANY *)addrbuf, &addrlen
+ (void *)addrbuf, &addrlen
#endif
#else
(struct sockaddr *)addrbuf, &addrlen
diff --git a/Modules/timemodule.c b/Modules/timemodule.c
index 18223b2883..4d2089ca66 100644
--- a/Modules/timemodule.c
+++ b/Modules/timemodule.c
@@ -293,7 +293,7 @@ static int
gettmarg(PyObject *args, struct tm *p)
{
int y;
- memset((ANY *) p, '\0', sizeof(struct tm));
+ memset((void *) p, '\0', sizeof(struct tm));
if (!PyArg_Parse(args, "(iiiiiiiii)",
&y,
@@ -343,7 +343,7 @@ time_strftime(PyObject *self, PyObject *args)
char *outbuf = 0;
size_t i;
- memset((ANY *) &buf, '\0', sizeof(buf));
+ memset((void *) &buf, '\0', sizeof(buf));
if (!PyArg_ParseTuple(args, "sO:strftime", &fmt, &tup)
|| !gettmarg(tup, &buf))
@@ -398,7 +398,7 @@ time_strptime(PyObject *self, PyObject *args)
if (!PyArg_ParseTuple(args, "s|s:strptime", &buf, &fmt))
return NULL;
- memset((ANY *) &tm, '\0', sizeof(tm));
+ memset((void *) &tm, '\0', sizeof(tm));
s = strptime(buf, fmt, &tm);
if (s == NULL) {
PyErr_SetString(PyExc_ValueError, "format mismatch");