Author theller
Recipients LambertDW, amcnabb, robertluce, theller
Date 2009-07-30.19:14:54
SpamBayes Score 2.06741e-10
Marked as misclassified No
Message-id <4A71F12E.70202@ctypes.org>
In-reply-to <1248926387.37.0.275185643216.issue4606@psf.upfronthosting.co.za>
Content
Thanks for bringing my attention to this problem again, and for the review.

Andrew McNabb schrieb:
> 
> I looked at the attached patch, and it seems to me the only alternative
> approach would be to use PyLong_FromLong instead of PyInt_FromLong. 

Using PyLong_FromLong doesn't make a difference at all, if you look into
the ConvParam code.

> However, since ConvParam already handles None appropriately, I think the
> fix in patch_ctypes_none_arg.diff really is the best way to do it.

The problem is that the patch changes the behaviour of the
'POINTER(...).from_param' methods, so I'm unsure if it can be applied
to 2.6 (or even 2.5).  Opinions?

> This patch is a one-line fix (plus tests and documentation), and it
> fixes a bug which crashes the interpreter.  The patch seems very

The patch is missing a 'Py_INCREF(value)' before the 'return value;',
but this is a minor point.

> straightforward, and there is no way that code could depend on the
> current behavior.

It could (on 32-bit systems), although I'm not sure if there is code
that does.

> I'm not sure if my patch review counts for much, but
> there you have it. :)
History
Date User Action Args
2009-07-30 19:14:56thellersetrecipients: + theller, amcnabb, LambertDW, robertluce
2009-07-30 19:14:55thellerlinkissue4606 messages
2009-07-30 19:14:54thellercreate