Commit Graph

15 Commits

Author SHA1 Message Date
Guido van Rossum c69bac539c Fix benign problems found by a picky SGI compiler (unreachable break
after a return).
1998-07-07 22:21:45 +00:00
Guido van Rossum 821a5e42bf Added URLs for zlib's home page and the Windows DLL's home page . 1998-05-08 14:56:29 +00:00
Guido van Rossum 115f517f77 Tiny patch for zlib 1.1.2 1998-04-23 20:22:11 +00:00
Guido van Rossum 9ec0f8b405 Win32 treatment. 1997-12-18 05:21:29 +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
Jeremy Hylton cb91404890 Several changes:
1. Fix bug in (de)compression objects.  The final string resize used
zst.total_out to determine the length of the string, but the
(de)compression object will output data a little bit at a time, which
means total_out is not the string size.  Fix: save original value of
total_out at the start of the call.

2. Be sure to Py_DECREF the result value if you exit with an
exception.

3. Use PyInt_FromLong instead of Py_BuildValue

4. include more constants from the zlib header file

5. Use PyErr_Format instead of using a local buffer and sprintf.
1997-09-04 23:39:23 +00:00
Guido van Rossum c3beda2f27 Plug small leaks: the [de]compress object itself was never freed. 1997-09-03 18:14:30 +00:00
Guido van Rossum c1f088201f Added (binaryfunc) casts to function pointers in method lists. 1997-08-28 21:21:22 +00:00
Guido van Rossum ed2554a396 Casts by Jack to shut up the Mac compiler. 1997-08-18 15:31:24 +00:00
Jeremy Hylton 644c17d2af Several bug fixes.
-- initialize length to DEFAULTALLOC and not 0
 -- resize string before returning (to remove '\000' padding)

Also converted some compression routines to use PyString instead of
buffer.
1997-08-14 21:06:42 +00:00
Jeremy Hylton 41b9f00e8f Many changes.
Change default alloc size for uncompressing to 16K.

Remove comment about core dumps when an invalid window sizes is used.
This bug has been fixed in zlib 1.0.4.

Two new optional arguments to decompress, wbits and bufsize.  wbits
specifies the window size and bufsize specifies the initial output
string size.

In decompression code -- decompress and decompressobj methods -- use a
Python string (and _PyString_Resize) to collect the uncompressed
stream.  Replaces a separate buffer that was copied into a string.

Fix bug in decompress that caused it to always realloc the buffer when
it was finished decompressing.

Modernized handling of optional arguments to compressobj.

Updated doc strings.
1997-08-13 23:19:55 +00:00
Jeremy Hylton a74ef66ac8 Must update the available space in the output buffer after
realloc. (Fixed in PyZlib_unflush.)
1997-08-13 21:39:18 +00:00
Guido van Rossum 97b5457467 Small changes (casts etc.) by Jack, for Mac compilation. 1997-06-03 22:21:47 +00:00
Guido van Rossum 3c540307af Doc strings (AMK). 1997-06-03 22:21:03 +00:00
Guido van Rossum fb221562a3 Added Andrew Kuchling's zlib module. 1997-04-29 15:38:09 +00:00