This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author PeterW
Recipients PeterW, gvanrossum, nnorwitz
Date 2007-11-03.14:02:34
SpamBayes Score 0.0015196846
Marked as misclassified No
Message-id <4db3b0200711030702g140cec65w968542735bc84728@mail.gmail.com>
In-reply-to <1194020485.72.0.453753027728.issue1372@psf.upfronthosting.co.za>
Content
You are right. The format should be 'l'. I overlooked that. In my case the
optional 'buf_size' parameter of 'decompress' is not used anyhow.
Shall I change the patch accordingly?

It work well for me and I now checked the code of PyArg_ParseTuple
(Python/getargs.c) to see what happens. As far as I understand, the given
pointer is casted to a pointer to int if the format is 'i' (line  630) . On
a 64 bit machine this leads to a downcast from a (64 bit) long to a (32 bit)
int, which is OK AFAIK, but I could be wrong.

Thanks for pointing that out,
Peter
2007/11/2, Guido van Rossum <report@bugs.python.org>:
>
>
> Guido van Rossum added the comment:
>
> I trust that there's a problem, but this can't be right -- the address
> of r_strlen is passed to PyArg_ParseTuple corresponding to an 'i' format
> letter.  That will never do.
>
> ----------
> assignee:  -> nnorwitz
> nosy: +gvanrossum, nnorwitz
>
> __________________________________
> Tracker <report@bugs.python.org>
> <http://bugs.python.org/issue1372>
> __________________________________
>
Files
File name Uploaded
unnamed PeterW, 2007-11-03.14:02:33
History
Date User Action Args
2007-11-03 14:02:35PeterWsetspambayes_score: 0.00151968 -> 0.0015196846
recipients: + PeterW, gvanrossum, nnorwitz
2007-11-03 14:02:34PeterWlinkissue1372 messages
2007-11-03 14:02:34PeterWcreate