[Python-checkins] CVS: python/dist/src/Modules dlmodule.c,2.11,2.12 signalmodule.c,2.51,2.52 socketmodule.c,1.122,1.123 timemodule.c,2.96,2.97

Thomas Wouters python-dev@python.org
Tue, 25 Jul 2000 05:56:40 -0700


Update of /cvsroot/python/python/dist/src/Modules
In directory slayer.i.sourceforge.net:/tmp/cvs-serv23253/Modules

Modified Files:
	dlmodule.c signalmodule.c socketmodule.c timemodule.c 
Log Message:

Use 'void' directly instead of the ANY #define, now that all code is ANSI C.
Leave the actual #define in for API compatibility.



Index: dlmodule.c
===================================================================
RCS file: /cvsroot/python/python/dist/src/Modules/dlmodule.c,v
retrieving revision 2.11
retrieving revision 2.12
diff -C2 -r2.11 -r2.12
*** dlmodule.c	2000/07/21 06:00:07	2.11
--- dlmodule.c	2000/07/25 12:56:37	2.12
***************
*** 19,23 ****
  #endif
  
! typedef ANY *PyUnivPtr;
  typedef struct {
  	PyObject_HEAD
--- 19,23 ----
  #endif
  
! typedef void *PyUnivPtr;
  typedef struct {
  	PyObject_HEAD

Index: signalmodule.c
===================================================================
RCS file: /cvsroot/python/python/dist/src/Modules/signalmodule.c,v
retrieving revision 2.51
retrieving revision 2.52
diff -C2 -r2.51 -r2.52
*** signalmodule.c	2000/07/23 21:18:09	2.51
--- signalmodule.c	2000/07/25 12:56:37	2.52
***************
*** 634,638 ****
  	is_tripped++;
  	Handlers[SIGINT].tripped = 1;
! 	Py_AddPendingCall((int (*)(ANY *))PyErr_CheckSignals, NULL);
  }
  
--- 634,638 ----
  	is_tripped++;
  	Handlers[SIGINT].tripped = 1;
! 	Py_AddPendingCall((int (*)(void *))PyErr_CheckSignals, NULL);
  }
  

Index: socketmodule.c
===================================================================
RCS file: /cvsroot/python/python/dist/src/Modules/socketmodule.c,v
retrieving revision 1.122
retrieving revision 1.123
diff -C2 -r1.122 -r1.123
*** socketmodule.c	2000/07/24 16:26:35	1.122
--- socketmodule.c	2000/07/25 12:56:37	1.123
***************
*** 800,804 ****
  			return NULL;
  	}
! 	res = setsockopt(s->sock_fd, level, optname, (ANY *)buf, buflen);
  	if (res < 0)
  		return PySocket_Err();
--- 800,804 ----
  			return NULL;
  	}
! 	res = setsockopt(s->sock_fd, level, optname, (void *)buf, buflen);
  	if (res < 0)
  		return PySocket_Err();
***************
*** 842,846 ****
  		socklen_t flagsize = sizeof flag;
  		res = getsockopt(s->sock_fd, level, optname,
! 				 (ANY *)&flag, &flagsize);
  		if (res < 0)
  			return PySocket_Err();
--- 842,846 ----
  		socklen_t flagsize = sizeof flag;
  		res = getsockopt(s->sock_fd, level, optname,
! 				 (void *)&flag, &flagsize);
  		if (res < 0)
  			return PySocket_Err();
***************
*** 856,860 ****
  		return NULL;
  	res = getsockopt(s->sock_fd, level, optname,
! 			 (ANY *)PyString_AsString(buf), &buflen);
  	if (res < 0) {
  		Py_DECREF(buf);
--- 856,860 ----
  		return NULL;
  	res = getsockopt(s->sock_fd, level, optname,
! 			 (void *)PyString_AsString(buf), &buflen);
  	if (res < 0) {
  		Py_DECREF(buf);
***************
*** 1231,1235 ****
  		     (struct sockaddr *)addrbuf, &addrlen
  #else
! 		     (ANY *)addrbuf, &addrlen
  #endif
  #else
--- 1231,1235 ----
  		     (struct sockaddr *)addrbuf, &addrlen
  #else
! 		     (void *)addrbuf, &addrlen
  #endif
  #else

Index: timemodule.c
===================================================================
RCS file: /cvsroot/python/python/dist/src/Modules/timemodule.c,v
retrieving revision 2.96
retrieving revision 2.97
diff -C2 -r2.96 -r2.97
*** timemodule.c	2000/07/24 15:26:39	2.96
--- timemodule.c	2000/07/25 12:56:37	2.97
***************
*** 294,298 ****
  {
  	int y;
! 	memset((ANY *) p, '\0', sizeof(struct tm));
  
  	if (!PyArg_Parse(args, "(iiiiiiiii)",
--- 294,298 ----
  {
  	int y;
! 	memset((void *) p, '\0', sizeof(struct tm));
  
  	if (!PyArg_Parse(args, "(iiiiiiiii)",
***************
*** 344,348 ****
  	size_t i;
  
! 	memset((ANY *) &buf, '\0', sizeof(buf));
  
  	if (!PyArg_ParseTuple(args, "sO:strftime", &fmt, &tup) 
--- 344,348 ----
  	size_t i;
  
! 	memset((void *) &buf, '\0', sizeof(buf));
  
  	if (!PyArg_ParseTuple(args, "sO:strftime", &fmt, &tup) 
***************
*** 399,403 ****
  	if (!PyArg_ParseTuple(args, "s|s:strptime", &buf, &fmt))
  	        return NULL;
! 	memset((ANY *) &tm, '\0', sizeof(tm));
  	s = strptime(buf, fmt, &tm);
  	if (s == NULL) {
--- 399,403 ----
  	if (!PyArg_ParseTuple(args, "s|s:strptime", &buf, &fmt))
  	        return NULL;
! 	memset((void *) &tm, '\0', sizeof(tm));
  	s = strptime(buf, fmt, &tm);
  	if (s == NULL) {