[Python-checkins] python/dist/src/Modules socketmodule.c,1.221,1.222
gvanrossum@users.sourceforge.net
gvanrossum@users.sourceforge.net
Thu, 06 Jun 2002 20:19:40 -0700
Update of /cvsroot/python/python/dist/src/Modules
In directory usw-pr-cvs1:/tmp/cvs-serv12522
Modified Files:
socketmodule.c
Log Message:
Major cleanup. Renamed static methods to avoid Py prefix. Other misc
cleanup as well, e.g. renamed NTinit to os_init.
Index: socketmodule.c
===================================================================
RCS file: /cvsroot/python/python/dist/src/Modules/socketmodule.c,v
retrieving revision 1.221
retrieving revision 1.222
diff -C2 -d -r1.221 -r1.222
*** socketmodule.c 7 Jun 2002 02:08:35 -0000 1.221
--- socketmodule.c 7 Jun 2002 03:19:37 -0000 1.222
***************
*** 2,13 ****
/*
This module provides an interface to Berkeley socket IPC.
Limitations:
! - only AF_INET, AF_INET6 and AF_UNIX address families are supported in a
portable manner, though AF_PACKET is supported under Linux.
! - no read/write operations (use sendall/recv or makefile instead)
! - additional restrictions apply on Windows (compensated for by socket.py)
[...1929 lines suppressed...]
}
!
#ifndef HAVE_INET_PTON
+
+ /* Simplistic emulation code for inet_pton that only works for IPv4 */
+
int
! inet_pton(int af, const char *src, void *dst)
{
! if (af == AF_INET) {
long packed_addr;
packed_addr = inet_addr(src);
***************
*** 3701,3703 ****
--- 3694,3697 ----
return NULL;
}
+
#endif