Commit Graph

70 Commits

Author SHA1 Message Date
Guido van Rossum 32c575da0a Left-aligned preprocessor directives and changed C++ comments to C
comments.
1997-12-02 20:37:32 +00:00
Guido van Rossum 8e9ebfd337 os2 patch by Jeff Rush 1997-11-22 21:53:48 +00:00
Barry Warsaw 0d2d759d8c PySocketSock_methods: Added "connect_ex" so the method can actually be
called!
1997-11-20 21:39:02 +00:00
Guido van Rossum fc4255db75 Add s.connect_ex() which returns errno instead of raising an exception. 1997-11-19 18:57:13 +00:00
Guido van Rossum 0cb96de269 Apply two changes, systematically:
(1) Use PyErr_NewException("module.class", NULL, NULL) to create the
    exception object.

(2) Remove all calls to Py_FatalError(); instead, return or
    ignore the errors -- the import code now checks PyErr_Occurred()
    after calling a module's init function, so it's no longer a
    fatal error for the initialization to fail.

Also did some small cleanups, e.g. removed unnecessary test for
"already initialized" from initfpectl(), and unified
initposix()/initnt().

I haven't checked this very thoroughly, so while the changes are
pretty trivial -- beware of untested code!
1997-10-01 04:29:29 +00:00
Guido van Rossum 91ba64ddd9 socket_type -> SocketType 1997-06-02 22:18:09 +00:00
Guido van Rossum 3b4b6fc602 Add socket.socket_type, as discussed on c.l.p. 1997-05-21 14:37:37 +00:00
Guido van Rossum fe28fa05e9 Remove the last three uses of PyArg_GetInt() from the source. 1997-05-15 19:09:26 +00:00
Guido van Rossum aa948df877 In makesockaddr(), if we don't know the address family, don't raise an
exception -- return it as a tuple.  Seems useful in promiscuous mode.
1997-05-07 17:41:48 +00:00
Guido van Rossum 644a12b00c Tweaks to keep the Microsoft compiler quier. 1997-04-09 19:24:53 +00:00
Barry Warsaw 752300bbdf Check of return values and proper error handling. 1997-01-03 17:18:10 +00:00
Guido van Rossum 25405c786b Added the new getprotobyname() call to the module overview at the top. 1996-12-19 16:42:52 +00:00
Guido van Rossum 3901d85277 Added getprotobyname() interface. 1996-12-19 16:35:04 +00:00
Guido van Rossum fb4130d1f1 Added extern decl for gethostname() to keep gcc -Wall happy. 1996-12-10 15:17:08 +00:00
Guido van Rossum a376cc5cc8 Keep gcc -Wall happy. 1996-12-05 23:43:35 +00:00
Guido van Rossum d266eb460e New permission notice, includes CNRI. 1996-10-25 14:44:06 +00:00
Guido van Rossum 084814624d Don't close an already closed socket. 1996-10-12 14:07:22 +00:00
Guido van Rossum 6f489d989d Slightly different Windows ifdefs 1996-06-28 20:15:15 +00:00
Guido van Rossum 8d665e6b51 changed windows test symbols; removed debug printf from sockets 1996-06-26 18:22:49 +00:00
Guido van Rossum be32c8921c More rational support for Windows (tested on Roj's NT 3.5 machine only).
Use PyArg_ParseTuple() where it makes sense.
1996-06-20 16:25:29 +00:00
Guido van Rossum 006bf91530 ntohs, ntohl, htons, htonl -- thanks to Lance 1996-06-12 04:04:55 +00:00
Guido van Rossum d639d4d6d6 more changes for Windows, sigh 1996-06-12 04:04:22 +00:00
Guido van Rossum 65af28a0f4 Calculate length of AF_UNIX addr struct portably in getsockaddrarg(). 1996-06-11 18:36:33 +00:00
Guido van Rossum 53a9bf8164 Get rid of obsolete allowbroadcast().
Avoid core dumps in resizestring().
1996-06-11 18:35:24 +00:00
Guido van Rossum 5555854e85 Windows/PC changes 1996-05-23 22:54:50 +00:00
Guido van Rossum dc1c64a148 remove unused variables 1996-02-27 15:21:19 +00:00
Jack Jansen 508537b9c9 Include GUSI.h if using gusi-sockets 1996-02-14 15:57:45 +00:00
Guido van Rossum ca42b1673b clear addr buffer before calling getsockname 1996-01-12 01:36:05 +00:00
Guido van Rossum 7c53b77733 plug some leaks 1995-09-13 18:39:47 +00:00
Guido van Rossum 30b6b2b032 add setblocking(); NT changes; null-terminate Unix path 1995-06-14 22:28:08 +00:00
Guido van Rossum 27e177d005 fixed up comments describing interface 1995-03-16 15:43:47 +00:00
Guido van Rossum 6b14491bb4 mode and optional bufsize for makefile() 1995-03-14 15:05:13 +00:00
Guido van Rossum 5f05eb421a add INADDR_* symbols 1995-02-17 15:11:07 +00:00
Guido van Rossum 3fdf58b5cc add socket related constants 1995-02-07 15:39:52 +00:00
Guido van Rossum a597dde3f1 cosmetic changes so these modules will work with the strict new naming scheme 1995-01-10 20:56:29 +00:00
Guido van Rossum ca9b323c52 better test for existence of hstrerror() 1995-01-10 16:30:54 +00:00
Guido van Rossum 524b588553 Added 1995 to copyright message.
Setup.in: clarified Tk comments somewhat.
structmodule.c: use memcpy() instead of double precision assignment.
1995-01-04 19:10:35 +00:00
Guido van Rossum 3bbc62e9c2 Another bulky set of minor changes.
Note addition of gethostbyaddr() and improved repr() for sockets,
renaming of md5.md5() to md5.new(), and fixing of leaks in threads.
1995-01-02 19:30:30 +00:00
Guido van Rossum 73624e9c3b new style 1994-10-10 17:59:00 +00:00
Guido van Rossum 14ed0b2cd3 * Modules/xxmodule.c: integrated with xxobject.c by Jack
* Modules/(posix,socket}module.c: more NT changes
1994-09-29 09:50:09 +00:00
Guido van Rossum e4485b064d Setup.in: added tkinter; rearranged the definition of PYTHONPATH so
that the module-specific components are in the section for that
module.

cursesmodule.c: patched it so it actually works.

tkintermodule.c: call Py_AtExit instead of atexit().

signalmodule.c: converted to new naming style; added
BGN/END SAVE around pause() call.

socketmodule.c: added setblocking() after Tommy Burnette.
1994-09-07 14:32:49 +00:00
Guido van Rossum 6a3eb5f14d Changes to make it work and compile on NT, by Mark Hammond.
(NT changes for posixmodule.c re-invented by Guido.)
1994-08-18 15:42:46 +00:00
Guido van Rossum c65a525cdc * Modules/{Setup.in,Makefile.pre.in}: renamed some modules to
shorter names (dropped the "module" from the name): sunaudiodev,
	imgformat, audioop, imageop, imgfile

	* Modules/stropmodule.c (strop_rindex): make rindex('abc', '') do
	the right thing (i.e. return 3 instead of 0)

	* Modules/socketmodule.c: disabled allowbroadcast() socket method
1994-08-05 13:44:50 +00:00
Guido van Rossum b6775db241 Merge alpha100 branch back to main trunk 1994-08-01 11:34:53 +00:00
Guido van Rossum b376a4ad18 * timemodule.c: Add hack for Solaris 2.
* posixmodule.c: don't prototype getcwd() -- it's not portable...
* mappingobject.c: double-check validity of last_name_char in
  dict{lookup,insert,remove}.
* arraymodule.c: need memmove only for non-STDC Suns.
* Makefile: comment out HTML_LIBS and XT_USE by default
* pythonmain.c: don't prototype getopt() -- it's not standardized
* socketmodule.c: cast flags arg to {get,set}sockopt() and addrbuf arg to
  recvfrom() to (ANY*).
* pythonrun.c (initsigs): fix prototype, make it static
* intobject.c (LONG_BIT): only #define it if not already defined
* classobject.[ch]: remove all references to unused instance_convert()
* mappingobject.c (getmappingsize): Don't return NULL in int function.
1993-11-23 17:53:17 +00:00
Guido van Rossum 234f942aef * Added gmtime/localtime/mktime and SYSV timezone globals to timemodule.c.
Added $(SYSDEF) to its build rule in Makefile.
* cgensupport.[ch], modsupport.[ch]: removed some old stuff.  Also
  changed files that still used it...  And made several things static
  that weren't but should have been...  And other minor cleanups...
* listobject.[ch]: add external interfaces {set,get}listslice
* socketmodule.c: fix bugs in new send() argument parsing.
* sunaudiodevmodule.c: added flush() and close().
1993-06-17 12:35:49 +00:00
Guido van Rossum 18c9a4f8ea * socketmodule.c: fix long-standing bug in recvfrom() -- addrlen
wasn't initialized.
1993-05-25 12:16:29 +00:00
Guido van Rossum eb6b33a837 * classobject.c: in instance_getattr, don't make a method out of a
function found as instance data.
* socketmodule.c: added 'flags' argument sendto/recvfrom, rewrite
  argument parsing in send/recv.
* More changes related to access (terminology change: owner instead of
  class; allow any object as owner; local/global variables are owned
  by their dictionary, only class/instance data is owned by the class;
  "from...import *" now only imports objects with public access; etc.)
1993-05-25 09:38:27 +00:00
Guido van Rossum 9575a44575 * Microscopic corrections to make things compile on the Cray APP.
* Removed one use of $> in Makefile and warned about others.
  Added configurable lines in Makefile to change CC and AR.
1993-04-07 14:06:14 +00:00
Guido van Rossum e537240c25 * Changed many files to use mkvalue() instead of newtupleobject().
* Fixcprt.py: added [-y file] option, do only files younger than file.
* modsupport.[ch]: added vmkvalue().
* intobject.c: use mkvalue().
* stringobject.c: added "formatstring"; renamed string* to string_*;
  ceval.c: call formatstring for string % value.
* longobject.c: close memory leak in divmod.
* parsetok.c: set result node to NULL when returning an error.
1993-03-16 12:15:04 +00:00