[Python-checkins] CVS: python/dist/src/Modules socketmodule.c,1.141.2.2,1.141.2.3

Anthony Baxter anthonybaxter@users.sourceforge.net
2001年11月01日 05:58:18 -0800


Update of /cvsroot/python/python/dist/src/Modules
In directory usw-pr-cvs1:/tmp/cvs-serv29965
Modified Files:
 Tag: release21-maint
	socketmodule.c 
Log Message:
backport (partially) jeremy's 1.178
 Use PySocket_Err() instead of PyErr_SetFromErrno().
 The former does the right thing on Windows, the latter does not.
The 'partial' is because the code's changed quite a lot and it's not clear
that the two that are still there of the form 
 return PyErr_SetFromErrno(SSLErrorObject);
can be replaced with PySocket_Err() - it looks like they need the new 
PySSL_SetError, which is a tad large to be comfortable with just checking
in without reading it further.
Index: socketmodule.c
===================================================================
RCS file: /cvsroot/python/python/dist/src/Modules/socketmodule.c,v
retrieving revision 1.141.2.2
retrieving revision 1.141.2.3
diff -C2 -d -r1.141.2.2 -r1.141.2.3
*** socketmodule.c	2001年10月19日 15:17:42	1.141.2.2
--- socketmodule.c	2001年11月01日 13:58:16	1.141.2.3
***************
*** 708,712 ****
 		ifr.ifr_name[(sizeof(ifr.ifr_name))-1] = '0円';
 		if (ioctl(s->sock_fd, SIOCGIFINDEX, &ifr) < 0) {
! 			PyErr_SetFromErrno(PySocket_Error);
 			return 0;
 		}
--- 708,712 ----
 		ifr.ifr_name[(sizeof(ifr.ifr_name))-1] = '0円';
 		if (ioctl(s->sock_fd, SIOCGIFINDEX, &ifr) < 0) {
! 			PySocket_Err();
 			return 0;
 		}

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