Yeah, I forgot about the appendix C in the documentation. I'm going to correct this ASAP.

I know about the sizehint problem, I'm currently working on it. I just wanted to fix it in a different commit to make backporting more easy. Also, I want to write a unit test for it. This should be done in a few hours, since I'm still on a holiday schedule :).

Regards,
Nicolas

2006/7/9, Graham Dumpleton <[EMAIL PROTECTED]>:

On 09/07/2006, at 8:05 PM, [EMAIL PROTECTED] wrote:

> Modified: httpd/mod_python/trunk/src/requestobject.c
> URL: http://svn.apache.org/viewvc/httpd/mod_python/trunk/src/
> requestobject.c?rev=420275&r1=420274&r2=420275&view=diff
> ======================================================================
> ========
> --- httpd/mod_python/trunk/src/requestobject.c (original)
> +++ httpd/mod_python/trunk/src/requestobject.c Sun Jul  9 03:05:30
> 2006
> @@ -1139,6 +1139,7 @@
>      PyObject *line, *rlargs;
>      long sizehint = -1;
>      long size = 0;
> +    long linesize;
>
>      if (! PyArg_ParseTuple(args, "|l", &sizehint))
>          return NULL;
> @@ -1151,13 +1152,15 @@
>          return PyErr_NoMemory();
>
>      line = req_readline(self, rlargs);
> -    while (line && (PyString_Size(line)>0)) {
> +    while (line && ((linesize=PyString_Size(line))>0)) {
>          PyList_Append(result, line);
> -        size += PyString_Size(line);
> +        size += linesize;
>          if ((sizehint != -1) && (size >= size))
>              break;
> +        Py_DECREF(line);
>          line = req_readline(self, args);
>      }
> +    Py_XDECREF(line);
>
>      if (!line)
>          return NULL;

Did you forget to commit Doc/appendixc.tex bug fix list and version
files increment changes?

BTW, we still need to address:

   http://issues.apache.org/jira/browse/MODPYTHON-179

in that function. :-)

Sorry for not helping much of late. Have got myself side tracked on
my own software.

Graham

Reply via email to