Commit Graph

1441 Commits

Author SHA1 Message Date
Greg Ward 9217fcbb38 Fix compiler warning: only use "_r" form of 'ctermid()' and 'tmpnam()' when
building a threaded Python.
2000-03-01 18:59:47 +00:00
Guido van Rossum 61b705a570 Patch by Fred Gansevles (the module's original author).
This patch fixes 3 small problems.
1) If a map is used which is generated with 'makedbm -a',
   the trailing '\0' is now handled correctely.
2) The nis.maps() function skipped the first map in the output list.
3) The library '-lnsl' is added in Setup.in (needed on Linux glibc2 and
   Solaris systems. Maybe on other systems too?)

[I note that this still doesn't work when you are using NIS+ --GvR]
2000-02-29 15:52:40 +00:00
Guido van Rossum 43713e5a28 Massive patch by Skip Montanaro to add ":name" to as many
PyArg_ParseTuple() format string arguments as possible.
2000-02-29 13:59:29 +00:00
Andrew M. Kuchling b6f6e95ed2 Better fix for mpzmodule problem reported by Peter Funk: just use
mp_bits_per_limb with GMP 2.0
2000-02-25 22:23:31 +00:00
Guido van Rossum 4985e40939 Delete references to _SC_AIO_LIST_MAX; it appears that that symbol was
just a typo in some Linux header; the real symbol is
_SC_AIO_LISTIO_MAX.
2000-02-25 17:51:00 +00:00
Guido van Rossum e7ef74dbf8 Peter Funk:
This patch allows building the Python 'mpzmodule' under SuSE Linux
without having to install the source package of the GMP-libary.
The gmp-mparam.h seems to be an internal header file.  The patch
shouldn't hurt any other platforms.
2000-02-24 15:26:30 +00:00
Fred Drake 0dd7507e51 What used to be tp_xxx4 is now tp_flags; set it to Py_TPFLAGS_DEFAULT. 2000-02-21 18:19:06 +00:00
Andrew M. Kuchling fc9d2252af Patch from Vladimir Marangozov <marangoz@python.inrialpes.fr>
The same problem (mixed mallocs) exists for the pcre stack.
	The buffers md->... are allocated via PyMem_RESIZE in grow_stack(),
	while in free_stack() they are released with free() instead of
	PyMem_DEL().
2000-02-18 19:16:45 +00:00
Andrew M. Kuchling 0c7822e832 Patch from Vladimir Marangozov <marangoz@python.inrialpes.fr>:
The buffers self->regex and self->regex_extra are allocated in
	pcre_compile() and pcre_study() via pcre_malloc, but are released
	via free() instead of pcre_free.
2000-02-18 18:30:01 +00:00
Guido van Rossum 7d47c9e38a Patch by Jim Ahlstrom to add crc32, a useful checksum function
(e.g. used for ZIP files).

The patch includes code that says:
+  Copyright (C) 1986 Gary S. Brown.  You may use this program, or
+  code or tables extracted from it, as desired without restriction.

My interpretation (and Jim's) is that Gary S Brown has no claims under
copyright, patent or other rights or interests.  Lawyers might disagree.
2000-02-16 21:11:52 +00:00
Fred Drake da8d216eb2 Protect against core dumps in gdbm: don't allow access by key once the
database is closed.  Raise gdbm.error instead.

Bug report #198 submitted by Barry Haddow <bhaddow@orbism.com>.
2000-02-07 17:19:41 +00:00
Fred Drake 0d40ba4cdf Patch from Paul Sokolovsky <Paul.Sokolovsky@technologist.com>:
Attached is patch (against 1.5.2 release) to allow some modules
to be buildable as pyd's (usual &PyType_Type stuff).
2000-02-04 20:33:49 +00:00
Fred Drake a664dbbff8 Added docstring to crypt.crypt() based on the documentation. 2000-02-01 20:12:39 +00:00
Guido van Rossum b3d3956e01 The initialization of posix_putenv_garbage should only be done when it
is defined...
2000-01-31 18:41:26 +00:00
Guido van Rossum bffd683f73 The rest of the changes by Trent Mick and Dale Nagata for warning-free
compilation on NT Alpha.  Mostly added casts etc.
2000-01-20 22:32:56 +00:00
Guido van Rossum 947a0fa4f9 According to Ron Bickers, and with apparent approval of Chris
Herborth, the code in list2set() that sets max unconditionally to 0
should not be used on BeOS.  So be it.  Anybody using BeOS, please
test!
2000-01-14 16:33:09 +00:00
Guido van Rossum b2b42ddcb1 The functions asctime() and mktime() are documented to take a 9-tuple
only.  Through some mysterious interaction, they would take 9 separate
arguments as well.  This misfeature is now disabled (to end a
difference with JPython).
2000-01-12 16:38:20 +00:00
Fred Drake e1a79b9b42 setup_confname_table(): Use size_t instead of int for an index when
building the dicts used to inform the user about the defined
        constants when using the *conf*() APIs.

Thanks to Mark Hammond <mhammond@skippinet.com.au>.
1999-12-30 18:05:43 +00:00
Fred Drake 8972dfd58e For ZlibError and ZLIB_VERSION, only attempt to add entry to the
module dict if the inserted object isn't NULL (basic defensive
programming!).
1999-12-22 16:13:54 +00:00
Andrew M. Kuchling 313a3e36e7 Fix typo in docstring: wbites -> wbits 1999-12-20 22:13:38 +00:00
Guido van Rossum 4e08379891 Patch and new file by Geoff Furnish for C++ compilation. 1999-12-16 17:52:08 +00:00
Fred Drake bec628d4bc Rip out the code to check the ordering of the tables used to map
strings to integers for the *conf*() functions.

Added code to sort the tables at module initialization.  Three
dictionaries, confstr_names, sysconf_names, and pathconf_names, are
added to the module as well.  These map known configuration setting
names to the numeric value which is used to represent the setting in
the system call.  This code is always called.

Updated related comments.
1999-12-15 18:31:10 +00:00
Fred Drake d86ed29f44 Added table entries for Irix 6.5 names for confstr()/sysconf()/
pathconf() names, from Sjoerd.

Added code to verify that these tables are properly ordered, only
included and used when CHECK_CONFNAME_TABLES is defined.  This is only
needed to test the tables, so I haven't enabled this by default.
1999-12-15 15:34:33 +00:00
Fred Drake 12c6e2d497 Added support for getlogin(); does *not* use getlogin_r() where
available since the interface is poorly defined on at least one major
platform (Solaris).

Moved table of constant names for fpathconf() & pathconf() into the
conditional that defines the conv_path_confname() helper; Mark Hammond
reported that defining the table when none of the constants were
defined causes the compiler to complain (won't allow 0-length array,
imagine that!).

In posix_fpathconf(), use conv_path_confname() as the O& conversion
function, instead of the conv_confname() helper, which has the wrong
signature (posix_pathconf() already used the right thing).
1999-12-14 21:25:03 +00:00
Fred Drake 71f00fb6df Removed debugging prints. 1999-12-13 16:55:24 +00:00
Fred Drake c968092d5c Added bindings for getgroups(), fpathconf(), pathconf(), confstr(),
and sysconf().

*Lots* of tables to define names used by *conf*(); explanation to go
in message to python-dev list.
1999-12-13 16:37:25 +00:00
Guido van Rossum 09ac088152 The call to PyArg_ParseTuple in al_Connect had one too few arguments.
This fixes PR#157.
1999-12-10 15:12:11 +00:00
Fred Drake 5ab8eaf0bb Added support for abort(), ctermid(), tmpfile(), tempnam(), tmpnam(),
and TMP_MAX.

Converted all functions that used PyArg_Parse() or PyArg_NoArgs() to
use PyArg_ParseTuple() and specified all function names using the
:name syntax in the format strings, to allow better error messages
when TypeError is raised for parameter type mismatches.
1999-12-09 21:13:07 +00:00
Guido van Rossum cbdff766d2 OpenSSL support. This is based on patches for a version of SSLeay by
Brian E Gallew, which were improved and adapted to OpenSSL 0.9.4 by
Laszlo Kovacs of HP.  Both have kindly given permission to include
the patches in the Python distribution.  Final formatting by GvR.
1999-12-07 21:47:09 +00:00
Guido van Rossum 09c8b6c3e4 OpenSSL support. This is based on patches for a version of SSLeay by
Brian E Gallew, which were improved and adapted to OpenSSL 0.9.4 by
Laszlo Kovacs of HP.  Both have kindly given permission to include
the patches in the Python distribution.  Final formatting by GvR.
1999-12-07 21:37:17 +00:00
Fred Drake bf27298364 Correct the docstring for byteswap(); error noted by Bernhard Reiter
<bernhard@uwm.edu>.

Added a check that no parameters were passed to byteswap(); previously
allowed any parameters you happened to pass.
1999-12-03 17:15:30 +00:00
Guido van Rossum b960e7a797 Patches by Kannan Vijayan:
new:
readline.get_begidx() -> int
	gets the beginning index in the command line string
	delimiting the tab-completion scope.  This would
	probably be used from within a tab-completion
	handler

readline.get_endidx() -> int
	gets the ending index in the command line string
	delimiting the tab-completion scope.  This would
	probably be used from within a tab-compeltion
	handler

readline.set_completer_delims(string) -> None
	sets the delimiters used by readline as word breakpoints
	for tab-completion

readline.get_completer_delims() -> string
	gets the delimiters used by readline as word breakpoints
	for tab-completion

fixed:
readline.get_line_buffer() -> string
	doesnt cause a debug message every other call
1999-11-18 17:51:02 +00:00
Guido van Rossum 09cbb01989 Jack Jansen: Mac has no EINTR. 1999-11-08 15:32:27 +00:00
Guido van Rossum e168c65603 Patch by Dieter Maurer to make things work for Tcl/Tk 8.1. This
simply moves the call to Tk_MainWindow() after the Tcl/Tk
initialization calls.  The patch is unconditional, it works with
earlier and later versions as well.
1999-11-05 18:11:23 +00:00
Guido van Rossum 6b26a06037 Patch by Dieter Maurer to make things work for Tcl/Tk 8.1 (tested with
8.1.1).  His approach doesn't work with Tcl/Tk 8.2, so I've placed it
inside #if TKMAJORMINOR == 8001 and #endif.  See also his patch for
tkappinit.c.
1999-11-05 18:09:56 +00:00
Fred Drake e4f13660f8 split() docstring: Made signature and description for the first
parameter match.  Error pointed out by François
                    Pinard <pinard@iro.umontreal.ca> on c.l.py.
1999-11-04 19:19:48 +00:00
Guido van Rossum 1b6e463bd5 Bugfix by Jack Jansen for Macintosh (for the inet_ntoa/aton changes):
<arpa/inet.h> doesn't exist and isn't needed; and inet_addr() returns
a structure containing a long rather than a long.
1999-11-04 18:22:29 +00:00
Guido van Rossum 2db4f47fdd Patch by Jason Trowbridge. (Followup to his PR#110.) (Slightly
reformatted.)

- Illegal padding is now ignored.  (Recommendation by GvR.)

- Padding no longer removes characters from data string (resulting in
lost data/strings with negative lengths).

- Illegal characters outside the ASCII range are now ignored, instead
of possibly being remapped to a valid character.
1999-10-19 19:05:14 +00:00
Guido van Rossum d5753e15e2 John DuBois tells us that SCO OpenServer 5.0 and later requires _SVID3
before it reveals the needed definitions in sys/statvfs.h.
1999-10-19 13:29:23 +00:00
Guido van Rossum eba24bb920 Fix PR#110 -- bad input ("====") for a2b_base64() caused it to call
_PyString_Resize() with a negative size.
1999-10-19 04:47:13 +00:00
Fred Drake 2a6875e172 parser__pickler(): Don't drop the third argument to
parser_ast2tuple().  Create an temporary empty dictionary to
        use.  Bug reported by Mark Favas <m.favas@per.dem.csiro.au>.

Fix a couple of comments.
1999-09-20 22:32:18 +00:00
Guido van Rossum 675e994a2e Added comment with web location of bsddb windows port. 1999-09-20 13:28:18 +00:00
Guido van Rossum 9376b74c42 (1) On Linux, we really need to trust the configure script to select
the right variant of gethostbyname_r for us, since not all Linuxes are
equal in this respect.  Reported by Laurent Pointal.

(2) On BeOS, Chris Herborth reports that instead of arpa/inet.h you
must include net/netdb.h to get the inet_ntoa() and inet_addr()
prototypes.
1999-09-15 22:01:40 +00:00
Guido van Rossum a2e48552d2 It appears that inet_aton() doesn't really exist except in libresolv;
the proper function to call is inet_addr().  Since we already had code
to do that (for MS-Windows), this simplifies things a lot!
1999-09-09 15:42:59 +00:00
Fred Drake 7a15ba595a Added keyword parameter support to all public interfaces; keyword
names match the documentation.

Removed broken code that supports the __methods__ attribute on ast
objects; the right magic was added to Py_FindMethod() since this was
originally written.  <ast-object>.__methods__ now works, so dir() and
rlcompleter are happy.
1999-09-09 14:21:52 +00:00
Guido van Rossum 65bb328f67 Fixed memory leak in ratecv, in response to PR#72. By Sjoerd Mullender. 1999-09-07 14:24:05 +00:00
Guido van Rossum ff7e83d606 Patch by Mark Hammond to avoid certain header files on Windows/CE. 1999-08-27 20:39:37 +00:00
Guido van Rossum 7f1de832a2 Tiny patch by Mark Hammond to avoid sys/types.h if we don't have it
(for Windows/CE).
1999-08-27 20:33:52 +00:00
Fred Drake 762e206706 posix_putenv(): Constrain memory leakage when setting the same
environment variable repeatedly.  I posted this to the list
        some time ago, but only now got around to asking g--d- what he
        thought about it.
1999-08-26 17:23:54 +00:00
Guido van Rossum c6a164b8bc Port inet_ntoa and inet_aton to Windows:
- fix unescaped newline in string literal
- removed unused err variable
- Windows doesn't have inet_aton; use inet_addr instead
1999-08-20 19:11:27 +00:00
Guido van Rossum 5c9eb21729 Patch by Ben Gertzfield to add inet_aton() and inet_ntoa() calls. 1999-08-20 18:21:51 +00:00
Guido van Rossum a5456d5042 In floatsleep(), when using select(), ignore EINTR error. 1999-08-19 14:40:27 +00:00
Guido van Rossum 09be409220 Patch by Marc-Andre Lemburg to add a bunch more symbols. 1999-08-09 14:40:40 +00:00
Guido van Rossum 6a619f44c5 It turns out that modifying the environment strings is not safe.
Treat them as read-only, and make a copy as appropriately.  This was
first reported by Bill Janssend and later by Craig Rowland and Ron
Sedlmeyer.  This fix is mine.
1999-08-03 19:41:10 +00:00
Guido van Rossum 2f80d96c04 Patch by Stephen Turner, who writes:
"""
It fixes a memory corruption error resulting from BadPickleGet
exceptions in load_get, load_binget and load_long_binget.  This was
initially reported on c.l.py as a problem with Cookie.py; see the thread
titled "python core dump (SIGBUS) on Solaris" for more details.

If PyDict_GetItem(self->memo, py_key) call failed, then py_key was being
Py_DECREF'd out of existence before call was made to
PyErr_SetObject(BadPickleGet, py_key).

The bug can be duplicated as follows:

import cPickle
cPickle.loads('garyp')

This raises a BadPickleGet exception whose value is a freed object.  A
core dump will soon follow.
"""

Jim Fulton approves of the patch.
1999-07-13 15:18:58 +00:00
Guido van Rossum 9068da4b6d Milton L. Hankin reports that on Windows it is possible to have two
different values in the environ dict with the same key (although he
couldn't explain exactly how this came to be).  Since getenv() uses
the first one, Python should do too. (Some doubts about case
sensitivity, but for now this at least seems the right thing to do
regardless of platform.)
1999-07-02 02:54:02 +00:00
Guido van Rossum c3be1a3ca1 New version from Jim:
- Don't call Py_FatalError() when initialization fails.

- Fix bogus use of return value from PyRun_String().

- Fix misc. compiler errors on some platforms.
1999-06-15 14:36:59 +00:00
Guido van Rossum 17d53ecd8b New version from Jim: don't call Py_FatalError() when initialization fails. 1999-06-15 14:35:48 +00:00
Guido van Rossum c03158bfc7 Jim Fulton writes:
I've updated cPickle.c to use class exceptions:

Changed pickle error types to classes:

  PickleError
     PicklingError
        UnpickleableError
     UnpicklingError

And change the handling of unpickleable objects so that an UnpickleableError
is raised with the unpickleable object as the argument.  UnpickleableError
has a reasonable string representation and provides access to the problem
object, which is useful during debugging.

[I'm still waiting for patches to do the same to pickle.py.]
1999-06-09 15:23:31 +00:00
Barry Warsaw f63b8cc07c posix_listdir(): When an error occurs, call
posix_error_with_filename() instead of posix_error(), passing in the
name argument, so you get information on which directory was being
listed.
1999-05-27 23:13:21 +00:00
Guido van Rossum 8bfefce75e On HP-UX, -rpath is another option taking an argument that needs to go
to the libs variable.  Reported by Albert Chin-A-Young.
1999-05-21 19:18:49 +00:00
Guido van Rossum ea424e19f1 Apparently __GNU_LIBRARY__ is defined for glibc as well as for libc5.
The test really wanted to distinguish between the two.  So now we test
for __GLIBC__ instead.  I have confirmed that this works for glibc and
I have an email from Christian Tanzer confirming that it works for
libc5, so it should be fine.
1999-04-23 20:59:05 +00:00
Guido van Rossum 1b9e0aae6e Jim Fulton writes:
I have attached a new cPickle that adds a new control attribute
to unpicklers:

  Added new Unpickler attribute, find_global.  If set to None, then
  global and instance pickles are disabled.  Otherwise, it should be set to
  a callable object that takes two arguments, a module name and an
  object name, and returns an object.  If the attribute is unset, then
  the default mechanism is used.

  This feature provides an additional mechanism for controlling which
  classes can be used for unpickling.
1999-04-19 17:58:18 +00:00
Guido van Rossum dc8b569155 Patch from Tim Peters to repare a the problem that tracebacks are off
by a line when Python is run with -x.
1999-04-19 17:54:19 +00:00
Guido van Rossum ae84e8d0f6 Patch by Drew Csillag for FreeBSD's sh, which doesn't automatically
join \-terminated lines.
1999-04-19 17:16:12 +00:00
Guido van Rossum a7379d9a34 Avoid triggering Alpha OSF/1 specific code on Alpha NT or Linux. 1999-04-19 16:50:26 +00:00
Guido van Rossum 7a1229991d Put back __osf__ support for gethostbyname_r(); the real bug was that
it was being used even without threads.  This of course might be an
all-platform problem so now we only use the _r variant when we are
using threads.
1999-04-13 04:07:32 +00:00
Guido van Rossum 761fcd03aa Fix accidentally reversed NULL test in load_mark(). Suggested by
Tamito Kajiyama.  (This caused a bug only on platforms where malloc(0)
returns NULL.)
1999-04-12 22:51:20 +00:00
Guido van Rossum d4b8b09a73 'clean' target should remove hassignal. 1999-04-12 16:42:13 +00:00
Guido van Rossum aee9bb2d0b Cast added by Jack Jansen (for Mac port). 1999-04-12 14:35:48 +00:00
Guido van Rossum ff1ccbfc21 casts for picky compilers. 1999-04-10 15:48:23 +00:00
Guido van Rossum cbf8906f5d 3-arg gethostbyname_r doesn't really work on OSF/1. 1999-04-10 15:46:01 +00:00
Guido van Rossum b729a1d0a8 Patch by Andrew Kuchling to unflush() (flush() for deflating).
Without this, if inflate() returned Z_BUF_ERROR asking for more output
space, we would report the error; now, we increase the buffer size and
try again, just as for Z_OK.
1999-04-07 20:23:17 +00:00
Guido van Rossum 8c67e4e8c9 Add extern decl for fsync() for SunOS 4.x. 1999-04-07 15:49:41 +00:00
Guido van Rossum 0ffdd05cc3 Jonathan Giddy notes, and Chris Lawrence agrees, that some comments on
#else/#endif are wrong, and that #if HAVE_TM_ZONE should be #ifdef.
1999-04-05 21:54:14 +00:00
Guido van Rossum c91fcaa43b Protection against picling to/from closed (real) file.
The problem was reported by Moshe Zadka.
1999-03-29 20:00:14 +00:00
Guido van Rossum 4958f9af97 #$@%! Forgot to remove a #error directive used for testing. Sorry. 1999-03-29 19:12:41 +00:00
Guido van Rossum 57731607c3 Chris Lawrence writes:
"""
The GNU folks, in their infinite wisdom, have decided not to implement
altzone in libc6; this would not be horrible, except that timezone
(which is implemented) includes the current DST setting (i.e. timezone
for Central is 18000 in summer and 21600 in winter).  So Python's
timezone and altzone variables aren't set correctly during DST.

Here's a patch relative to 1.5.2b2 that (a) makes timezone and altzone
show the "right" thing on Linux (by using the tm_gmtoff stuff
available in BSD, which is how the GLIBC manual claims things should
be done) and (b) should cope with the southern hemisphere.  In pursuit
of (b), I also took the liberty of renaming the "summer" and "winter"
variables to "july" and "jan".  This patch should also make certain
time calculations on Linux actually work right (like the tz-aware
functions in the rfc822 module).

(It's hard to find DST that's currently being used in the southern
hemisphere; I tested using Africa/Windhoek.)
"""
1999-03-29 19:12:04 +00:00
Guido van Rossum cf95b0f44a Avoid warnings from AIX compiler. Reported by Vladimir (AIX is my
middlename) Marangozov, patch coded by Greg Stein.
1999-03-29 14:57:59 +00:00
Andrew M. Kuchling b95227db4f Add an .unused_data attribute to decompressor objects. If .unused_data
is not an empty string, this means that you have arrived at the
end of the stream of compressed data, and the contents of .unused_data are
whatever follows the compressed stream.
1999-03-25 21:21:08 +00:00
Guido van Rossum 29d2acc170 Added Greg Stein and Andrew Kuchling's sha module.
Fix comments about zlib version and URL.
1999-03-24 19:03:59 +00:00
Guido van Rossum e7de2061b4 Implement two suggestions by Jonathan Giddy: (1) in AIX, clear the
data struct before calling gethostby{name,addr}_r(); (2) ignore the
3/5/6 args determinations made by the configure script and switch on
platform identifiers instead:

AIX, OSF have 3 args
Sun, SGI have 5 args
Linux has 6 args

On all other platforms, undef HAVE_GETHOSTBYNAME_R altogether.
1999-03-24 17:24:33 +00:00
Guido van Rossum 7b6c71f5a4 Vladimir Marangozov implements the AIX 3-arg gethostbyname_r code. 1999-03-24 17:20:40 +00:00
Guido van Rossum 8ad22c8153 Add $(EXE) to various occurrences of python so it will work on Cygwin
with egcs (after setting EXE=.exe).  Patch by Norman Vine.
1999-03-23 19:00:55 +00:00
Guido van Rossum 3baaa1375b Clean up pass for the previous patches.
- Use HAVE_GETHOSTBYNAME_R_6_ARG instead of testing for Linux and
glibc2.

- If gethostbyname takes 3 args, undefine HAVE_GETHOSTBYNAME_R --
don't know what code should be used.

- New symbol USE_GETHOSTBYNAME_LOCK defined iff the lock should be used.

- Modify the gethostbyaddr() code to also hold on to the lock until
after it is safe to release, overlapping with the Python lock.

(Note: I think that it could in theory be possible that Python code
executed while gethostbyname_lock is held could attempt to reacquire
the lock -- e.g. in a signal handler or destructor.  I will simply say
"don't do that then.")
1999-03-22 21:44:51 +00:00
Guido van Rossum 955becc3d9 Jonathan Giddy writes:
Here's a patch to fix the race condition, which wasn't fixed by Rob's
patch.  It holds the gethostbyname lock until the results are copied out,
which means that this lock and the Python global lock are held at the same
time.  This shouldn't be a problem as long as the gethostbyname lock is
always acquired when the global lock is not held.
1999-03-22 20:14:53 +00:00
Andrew M. Kuchling 173156fa32 Fixed the flush() method of compression objects; the test for
the end of loop was incorrect, and failed when the flushmode != Z_FINISH.
    Logic cleaned up and commented.
1999-03-22 19:25:30 +00:00
Guido van Rossum 481ac8811e Use an unsigned cast to avoid a warning in VC++. 1999-03-19 21:50:11 +00:00
Fred Drake 0e11c49f04 Docstring fix: acosh() returns the hyperbolic arccosine, not the
hyperbolic cosine.  Problem report via David Ascher by one of his
students.
1999-03-16 14:17:48 +00:00
Guido van Rossum e9cd07b47f Patch by Rob Riggs for Linux -- glibc2 has a different argument
converntion for gethostbyname_r() etc. than Solaris!
1999-03-15 21:40:14 +00:00
Guido van Rossum d3eb5774ad Patch by Chris Herborth for BeOS code.
He writes:

I had an off-by-1000 error in floatsleep(),
and the problem with time.clock() is that it's not implemented properly
on QNX... ANSI says it's supposed to return _CPU_ time used by the
process, but on QNX it returns the amount of real time used... so I was
confused.
1999-03-09 16:07:23 +00:00
Guido van Rossum 3366d1c7e6 # Typo in docstring (Retrun -> Return). 1999-02-23 18:34:43 +00:00
Guido van Rossum 3791b0de36 Carefully check for overflow when allocating the memory for fromfile
-- someone tried to pass in sys.maxint and got bitten by the bogus
calculations.
1999-02-23 18:05:22 +00:00
Guido van Rossum c222ec28a5 Patch by Tadayoshi Funaba (with some changes) to be smarter about
guessing what happened when strftime() returns 0.  Is it buffer
overflow or was the result simply 0 bytes long?  (This happens for an
empty format string, or when the format string is a single %Z and the
timezone is unknown.)  if the buffer is at least 256 times as long as
the format, assume the latter.
1999-02-23 00:00:10 +00:00
Guido van Rossum b71c570f01 Document *static* -- in two places! 1999-02-22 18:11:18 +00:00
Guido van Rossum 360eb9f278 We don't support leap seconds, so the seconds field of a time 9-tuple
should be in the range [0-59].  Noted by Tadayoshi Funaba.
1999-02-22 16:19:52 +00:00
Guido van Rossum 5bd69db9f0 In atoi(), don't use isxdigit() to test whether the last character
converted was a "digit" -- use isalnum().  This test is there only to
guard against "+" or "-" being interpreted as a valid int literal.
Reported by Takahiro Nakayama.
1999-02-22 16:18:44 +00:00
Guido van Rossum 61eeb044d7 The docstring for ttyname(..) claims a second "mode" argument. The
actual code does not allow such an argument.  (Finn Bock.)
1999-02-22 15:29:15 +00:00
Fred Drake 1a566ff2e8 When the parameter to PyInt_AsLong() has already been checked with
PyInt_Check(), use PyInt_AS_LONG() instead (two places).
1999-02-17 17:35:53 +00:00
Fred Drake 6724835959 Use the portable form of initializing the ob_type field for new types. 1999-02-16 22:15:42 +00:00