[Python-checkins] CVS: python/dist/src/Modules _cursesmodule.c,2.51.4.2,2.51.4.3 addrinfo.h,1.1.2.1,1.1.2.2 getaddrinfo.c,1.1.2.1,1.1.2.2 main.c,1.52.4.2,1.52.4.3 parsermodule.c,2.60.6.3,2.60.6.4 pcremodule.c,2.25.8.2,2.25.8.3 posixmodule.c,2.187.4.3,2.187.4.4 selectmodule.c,2.50.6.2,2.50.6.3 signalmodule.c,2.58,2.58.6.1 socketmodule.c,1.141.4.1,1.141.4.2 structmodule.c,2.42.4.1,2.42.4.2 unicodedata.c,2.12,2.12.6.1 xreadlinesmodule.c,1.5.4.1,1.5.4.2

Tim Peters tim_one@users.sourceforge.net
2001年7月20日 23:07:16 -0700


Update of /cvsroot/python/python/dist/src/Modules
In directory usw-pr-cvs1:/tmp/cvs-serv27169/descr/dist/src/Modules
Modified Files:
 Tag: descr-branch
	_cursesmodule.c addrinfo.h getaddrinfo.c main.c parsermodule.c 
	pcremodule.c posixmodule.c selectmodule.c signalmodule.c 
	socketmodule.c structmodule.c unicodedata.c xreadlinesmodule.c 
Log Message:
Merge of trunk delta date2001-07-17b to date2001-07-21. See PLAN.txt.
Index: _cursesmodule.c
===================================================================
RCS file: /cvsroot/python/python/dist/src/Modules/_cursesmodule.c,v
retrieving revision 2.51.4.2
retrieving revision 2.51.4.3
diff -C2 -r2.51.4.2 -r2.51.4.3
*** _cursesmodule.c	2001年07月15日 20:26:55	2.51.4.2
--- _cursesmodule.c	2001年07月21日 06:07:13	2.51.4.3
***************
*** 115,121 ****
 explicit prototypes here. */
 extern int setupterm(char *,int,int *);
! #ifdef sgi
! extern char *tigetstr(char *);
! extern char *tparm(char *instring, ...);
 #endif
 
--- 115,120 ----
 explicit prototypes here. */
 extern int setupterm(char *,int,int *);
! #ifdef __sgi
! #include <term.h>
 #endif
 
***************
*** 722,726 ****
 return NULL;
 }
! return PyInt_FromLong(rtn);
 }
 
--- 721,725 ----
 return NULL;
 }
! return PyInt_FromLong((long)rtn);
 }
 
***************
*** 1306,1310 ****
 case 0:
 return PyCursesCheckERR(scroll(self->win), "scroll");
- break;
 case 1:
 if (!PyArg_Parse(args, "i;nlines", &nlines))
--- 1305,1308 ----
***************
*** 1326,1330 ****
 return NULL;
 return PyCursesCheckERR(touchline(self->win,st,cnt), "touchline");
- break;
 case 3:
 if (!PyArg_Parse(args, "(iii);start,count,val", &st, &cnt, &val))
--- 1324,1327 ----
Index: addrinfo.h
===================================================================
RCS file: /cvsroot/python/python/dist/src/Modules/addrinfo.h,v
retrieving revision 1.1.2.1
retrieving revision 1.1.2.2
diff -C2 -r1.1.2.1 -r1.1.2.2
*** addrinfo.h	2001年07月07日 22:55:29	1.1.2.1
--- addrinfo.h	2001年07月21日 06:07:13	1.1.2.2
***************
*** 106,110 ****
 #define _SS_MAXSIZE	128
 #ifdef HAVE_LONG_LONG
! #define _SS_ALIGNSIZE	(sizeof(long long))
 #else
 #define _SS_ALIGNSIZE	(sizeof(double))
--- 106,110 ----
 #define _SS_MAXSIZE	128
 #ifdef HAVE_LONG_LONG
! #define _SS_ALIGNSIZE	(sizeof(LONG_LONG))
 #else
 #define _SS_ALIGNSIZE	(sizeof(double))
***************
*** 123,127 ****
 	char	__ss_pad1[_SS_PAD1SIZE];
 #ifdef HAVE_LONG_LONG
! 	long long __ss_align;	/* force desired structure storage alignment */
 #else
 	double __ss_align;	/* force desired structure storage alignment */
--- 123,127 ----
 	char	__ss_pad1[_SS_PAD1SIZE];
 #ifdef HAVE_LONG_LONG
! 	LONG_LONG __ss_align;	/* force desired structure storage alignment */
 #else
 	double __ss_align;	/* force desired structure storage alignment */
Index: getaddrinfo.c
===================================================================
RCS file: /cvsroot/python/python/dist/src/Modules/getaddrinfo.c,v
retrieving revision 1.1.2.1
retrieving revision 1.1.2.2
diff -C2 -r1.1.2.1 -r1.1.2.2
*** getaddrinfo.c	2001年07月07日 22:55:29	1.1.2.1
--- getaddrinfo.c	2001年07月21日 06:07:13	1.1.2.2
***************
*** 118,121 ****
--- 118,132 ----
 #endif
 
+ #ifndef IN_MULTICAST
+ #define IN_MULTICAST(i)	 (((i) & 0xf0000000U) == 0xe0000000U)
+ #endif
+ 
+ #ifndef IN_EXPERIMENTAL
+ #define IN_EXPERIMENTAL(i) (((i) & 0xe0000000U) == 0xe0000000U)
+ #endif
+ 
+ #ifndef IN_LOOPBACKNET
+ #define IN_LOOPBACKNET	 127
+ #endif
 
 static int get_name Py_PROTO((const char *, struct gai_afd *,
***************
*** 528,532 ****
 	int i, error = 0, h_error;
 	char *ap;
! #ifndef INET6
 	extern int h_errno;
 #endif
--- 539,544 ----
 	int i, error = 0, h_error;
 	char *ap;
! #if !defined(INET6) && !defined(MS_WIN32)
! 	/* In winsock.h, h_errno is #defined as a function call. */
 	extern int h_errno;
 #endif
Index: main.c
===================================================================
RCS file: /cvsroot/python/python/dist/src/Modules/main.c,v
retrieving revision 1.52.4.2
retrieving revision 1.52.4.3
diff -C2 -r1.52.4.2 -r1.52.4.3
*** main.c	2001年07月16日 21:46:00	1.52.4.2
--- main.c	2001年07月21日 06:07:13	1.52.4.3
***************
*** 21,25 ****
 
 #define COPYRIGHT \
! "Type \"copyright\", \"credits\" or \"license\" for more information."
 
 /* For Py_GetArgcArgv(); set by main() */
--- 21,26 ----
 
 #define COPYRIGHT \
! "Type \"help\", \"copyright\", \"credits\" or \"license\" " \
! "for more information."
 
 /* For Py_GetArgcArgv(); set by main() */
Index: parsermodule.c
===================================================================
RCS file: /cvsroot/python/python/dist/src/Modules/parsermodule.c,v
retrieving revision 2.60.6.3
retrieving revision 2.60.6.4
diff -C2 -r2.60.6.3 -r2.60.6.4
*** parsermodule.c	2001年07月18日 04:13:56	2.60.6.3
--- parsermodule.c	2001年07月21日 06:07:13	2.60.6.4
***************
*** 2856,2860 ****
 PyString_FromString(parser_version_string));
 
! /* register to support pickling */
 module = PyImport_ImportModule("copy_reg");
 if (module != NULL) {
--- 2856,2863 ----
 PyString_FromString(parser_version_string));
 
! /* Register to support pickling.
! * If this fails, the import of this module will fail because an
! * exception will be raised here; should we clear the exception?
! */
 module = PyImport_ImportModule("copy_reg");
 if (module != NULL) {
Index: pcremodule.c
===================================================================
RCS file: /cvsroot/python/python/dist/src/Modules/pcremodule.c,v
retrieving revision 2.25.8.2
retrieving revision 2.25.8.3
diff -C2 -r2.25.8.2 -r2.25.8.3
*** pcremodule.c	2001年07月15日 20:26:55	2.25.8.2
--- pcremodule.c	2001年07月21日 06:07:13	2.25.8.3
***************
*** 259,263 ****
 		return Py_BuildValue("c", (char)x);
 	}
- 	break;
 
 	case('E'): case('G'): case('L'): case('Q'):
--- 259,262 ----
***************
*** 332,336 ****
 		return Py_BuildValue("s#", pattern+index, end-index);
 	}
- 	break;
 
 	case('0'):
--- 331,334 ----
***************
*** 355,359 ****
 		return Py_BuildValue("c", (unsigned char)octval);
 	}
! 	break;
 	case('1'): case('2'): case('3'): case('4'):
 	case('5'): case('6'): case('7'): case('8'):
--- 353,357 ----
 		return Py_BuildValue("c", (unsigned char)octval);
 	}
! 
 	case('1'): case('2'): case('3'): case('4'):
 	case('5'): case('6'): case('7'): case('8'):
***************
*** 411,415 ****
 		}
 	}
- 	break;
 
 	default:
--- 409,412 ----
Index: posixmodule.c
===================================================================
RCS file: /cvsroot/python/python/dist/src/Modules/posixmodule.c,v
retrieving revision 2.187.4.3
retrieving revision 2.187.4.4
diff -C2 -r2.187.4.3 -r2.187.4.4
*** posixmodule.c	2001年07月18日 04:13:56	2.187.4.3
--- posixmodule.c	2001年07月21日 06:07:13	2.187.4.4
***************
*** 1216,1220 ****
 	if (!PyArg_ParseTuple(args, "i:umask", &i))
 		return NULL;
! 	i = umask(i);
 	if (i < 0)
 		return posix_error();
--- 1216,1220 ----
 	if (!PyArg_ParseTuple(args, "i:umask", &i))
 		return NULL;
! 	i = (int)umask(i);
 	if (i < 0)
 		return posix_error();
Index: selectmodule.c
===================================================================
RCS file: /cvsroot/python/python/dist/src/Modules/selectmodule.c,v
retrieving revision 2.50.6.2
retrieving revision 2.50.6.3
diff -C2 -r2.50.6.2 -r2.50.6.3
*** selectmodule.c	2001年07月15日 20:26:55	2.50.6.2
--- selectmodule.c	2001年07月21日 06:07:13	2.50.6.3
***************
*** 333,337 ****
 update_ufd_array(pollObject *self)
 {
! 	int i, j, pos;
 	PyObject *key, *value;
 
--- 333,337 ----
 update_ufd_array(pollObject *self)
 {
! 	int i, pos;
 	PyObject *key, *value;
 
***************
*** 344,350 ****
 
 	i = pos = 0;
! 	while ((j = PyDict_Next(self->dict, &pos, &key, &value))) {
 		self->ufds[i].fd = PyInt_AsLong(key);
! 		self->ufds[i].events = PyInt_AsLong(value);
 		i++;
 	}
--- 344,350 ----
 
 	i = pos = 0;
! 	while (PyDict_Next(self->dict, &pos, &key, &value)) {
 		self->ufds[i].fd = PyInt_AsLong(key);
! 		self->ufds[i].events = (short)PyInt_AsLong(value);
 		i++;
 	}
Index: signalmodule.c
===================================================================
RCS file: /cvsroot/python/python/dist/src/Modules/signalmodule.c,v
retrieving revision 2.58
retrieving revision 2.58.6.1
diff -C2 -r2.58 -r2.58.6.1
*** signalmodule.c	2001年03月06日 12:13:56	2.58
--- signalmodule.c	2001年07月21日 06:07:13	2.58.6.1
***************
*** 157,161 ****
 		return NULL;
 	/* alarm() returns the number of seconds remaining */
! 	return PyInt_FromLong(alarm(t));
 }
 
--- 157,161 ----
 		return NULL;
 	/* alarm() returns the number of seconds remaining */
! 	return PyInt_FromLong((long)alarm(t));
 }
 
Index: socketmodule.c
===================================================================
RCS file: /cvsroot/python/python/dist/src/Modules/socketmodule.c,v
retrieving revision 1.141.4.1
retrieving revision 1.141.4.2
diff -C2 -r1.141.4.1 -r1.141.4.2
*** socketmodule.c	2001年07月07日 22:55:29	1.141.4.1
--- socketmodule.c	2001年07月21日 06:07:13	1.141.4.2
***************
*** 196,205 ****
 #endif
 
- /* XXX 24-Jun-2000 Tim: I have no idea what the code inside this block is
- trying to do, and don't have time to look. Looks like Unix-specific code
- in those files, though, which will never compile on Windows. */
- #ifndef MS_WINDOWS
 #include "addrinfo.h"
- #endif /* ifndef MS_WINDOWS hack */
 
 #ifdef USE_SSL
--- 196,200 ----
***************
*** 212,220 ****
 #endif /* USE_SSL */
 
- /* XXX 24-Jun-2000 Tim: I have no idea what the code inside this block is
- trying to do, and don't have time to look. Looks like Unix-specific code
- in those files, though, which will never compile on Windows. */
- #ifndef MS_WINDOWS
- 
 #ifndef HAVE_INET_PTON
 int inet_pton (int af, char *src, void *dst);
--- 207,210 ----
***************
*** 230,235 ****
 #endif
 
- #endif /* ifndef MS_WINDOWS hack */
- 
 #if defined(MS_WINDOWS) || defined(__BEOS__)
 /* BeOS suffers from the same socket dichotomy as Win32... - [cjh] */
--- 220,223 ----
***************
*** 586,590 ****
 makeipaddr(struct sockaddr_in *addr)
 {
! 	long x = ntohl(addr->sin_addr.s_addr);
 	char buf[100];
 	sprintf(buf, "%d.%d.%d.%d",
--- 574,578 ----
 makeipaddr(struct sockaddr_in *addr)
 {
! 	unsigned long x = ntohl(addr->sin_addr.s_addr);
 	char buf[100];
 	sprintf(buf, "%d.%d.%d.%d",
***************
*** 2099,2103 ****
 	/* Have to use inet_addr() instead */
 	char *ip_addr;
! 	long packed_addr;
 
 	if (!PyArg_ParseTuple(args, "s:inet_aton", &ip_addr)) {
--- 2087,2091 ----
 	/* Have to use inet_addr() instead */
 	char *ip_addr;
! 	unsigned long packed_addr;
 
 	if (!PyArg_ParseTuple(args, "s:inet_aton", &ip_addr)) {
***************
*** 2105,2109 ****
 	}
 #ifdef USE_GUSI1
! 	packed_addr = (long)inet_addr(ip_addr).s_addr;
 #else
 	packed_addr = inet_addr(ip_addr);
--- 2093,2097 ----
 	}
 #ifdef USE_GUSI1
! 	packed_addr = inet_addr(ip_addr).s_addr;
 #else
 	packed_addr = inet_addr(ip_addr);
Index: structmodule.c
===================================================================
RCS file: /cvsroot/python/python/dist/src/Modules/structmodule.c,v
retrieving revision 2.42.4.1
retrieving revision 2.42.4.2
diff -C2 -r2.42.4.1 -r2.42.4.2
*** structmodule.c	2001年07月07日 22:55:29	2.42.4.1
--- structmodule.c	2001年07月21日 06:07:13	2.42.4.2
***************
*** 548,552 ****
 nu_longlong(const char *p, const formatdef *f)
 {
! 	return PyLong_FromLongLong(*(LONG_LONG *)p);
 }
 
--- 548,555 ----
 nu_longlong(const char *p, const formatdef *f)
 {
! 	/* p may not be properly aligned */
! 	LONG_LONG x;
! 	memcpy(&x, p, sizeof(LONG_LONG));
! 	return PyLong_FromLongLong(x);
 }
 
***************
*** 554,558 ****
 nu_ulonglong(const char *p, const formatdef *f)
 {
! 	return PyLong_FromUnsignedLongLong(*(unsigned LONG_LONG *)p);
 }
 #endif
--- 557,564 ----
 nu_ulonglong(const char *p, const formatdef *f)
 {
! 	/* p may not be properly aligned */
! 	unsigned LONG_LONG x;
! 	memcpy(&x, p, sizeof(unsigned LONG_LONG));
! 	return PyLong_FromUnsignedLongLong(x);
 }
 #endif
***************
*** 701,705 ****
 	if (get_longlong(v, &x) < 0)
 		return -1;
! 	* (LONG_LONG *)p = x;
 	return 0;
 }
--- 707,711 ----
 	if (get_longlong(v, &x) < 0)
 		return -1;
! 	memcpy(p, &x, sizeof(LONG_LONG));
 	return 0;
 }
***************
*** 711,715 ****
 	if (get_ulonglong(v, &x) < 0)
 		return -1;
! 	* (unsigned LONG_LONG *)p = x;
 	return 0;
 }
--- 717,721 ----
 	if (get_ulonglong(v, &x) < 0)
 		return -1;
! 	memcpy(p, &x, sizeof(unsigned LONG_LONG));
 	return 0;
 }
Index: unicodedata.c
===================================================================
RCS file: /cvsroot/python/python/dist/src/Modules/unicodedata.c,v
retrieving revision 2.12
retrieving revision 2.12.6.1
diff -C2 -r2.12 -r2.12.6.1
*** unicodedata.c	2001年03月03日 19:41:55	2.12
--- unicodedata.c	2001年07月21日 06:07:13	2.12.6.1
***************
*** 283,287 ****
 unsigned char* w;
 
! if (code < 0 || code >= 65536)
 return 0;
 
--- 283,287 ----
 unsigned char* w;
 
! if (code >= 65536)
 return 0;
 
Index: xreadlinesmodule.c
===================================================================
RCS file: /cvsroot/python/python/dist/src/Modules/xreadlinesmodule.c,v
retrieving revision 1.5.4.1
retrieving revision 1.5.4.2
diff -C2 -r1.5.4.1 -r1.5.4.2
*** xreadlinesmodule.c	2001年07月07日 22:55:30	1.5.4.1
--- xreadlinesmodule.c	2001年07月21日 06:07:13	1.5.4.2
***************
*** 172,178 ****
 initxreadlines(void)
 {
- 	PyObject *m;
- 
 	XReadlinesObject_Type.ob_type = &PyType_Type;
! 	m = Py_InitModule("xreadlines", xreadlines_functions);
 }
--- 172,176 ----
 initxreadlines(void)
 {
 	XReadlinesObject_Type.ob_type = &PyType_Type;
! 	Py_InitModule("xreadlines", xreadlines_functions);
 }

AltStyle によって変換されたページ (->オリジナル) /