From 22a9dc889df1e9d5a36e72004bc090f0b74b1902 Mon Sep 17 00:00:00 2001
From: Georg Brandl <georg@python.org>
Date: Sat, 1 Apr 2006 07:39:41 +0000
Subject: Patch #1459631: documnent zlib.Decompress.flush() length parameter.

---
 Doc/lib/libzlib.tex  | 5 ++++-
 Modules/zlibmodule.c | 4 +++-
 2 files changed, 7 insertions(+), 2 deletions(-)

diff --git a/Doc/lib/libzlib.tex b/Doc/lib/libzlib.tex
index 2df8b85..dfbb43d 100644
--- a/Doc/lib/libzlib.tex
+++ b/Doc/lib/libzlib.tex
@@ -166,11 +166,14 @@ continue.  If \var{max_length} is not supplied then the whole input is
 decompressed, and \member{unconsumed_tail} is an empty string.
 \end{methoddesc}
 
-\begin{methoddesc}[Decompress]{flush}{}
+\begin{methoddesc}[Decompress]{flush}{\optional{length}}
 All pending input is processed, and a string containing the remaining
 uncompressed output is returned.  After calling \method{flush()}, the
 \method{decompress()} method cannot be called again; the only realistic
 action is to delete the object.
+
+The optional parameter \var{length} sets the initial size of the
+output buffer.
 \end{methoddesc}
 
 \begin{seealso}
diff --git a/Modules/zlibmodule.c b/Modules/zlibmodule.c
index 725755d..35b8c32 100644
--- a/Modules/zlibmodule.c
+++ b/Modules/zlibmodule.c
@@ -654,7 +654,9 @@ PyZlib_flush(compobject *self, PyObject *args)
 }
 
 PyDoc_STRVAR(decomp_flush__doc__,
-"flush() -- Return a string containing any remaining decompressed data.\n"
+"flush( [length] ) -- Return a string containing any remaining\n"
+"decompressed data. length, if given, is the initial size of the\n"
+"output buffer.\n"
 "\n"
 "The decompressor object can no longer be used after this call.");
 
-- 
cgit v0.12

