[Pyrex] Reraise not inside except clause

Robert Kern robert.kern at gmail.com
Wed Oct 17 00:12:12 CEST 2007


Greg Ewing wrote:
> Robert Kern wrote:
> 
>> Sorry, I wasn't clear: the comment is associated with the other functions that
>> do the same, but not PyObject_GetAttr.
> 
> It sounds like it may have been declared as void * by mistake
> when doing the other functions.
> 
> I'd suggest examining the code which uses the PyObject_GetAttr
> that's declared this way -- it's very likely to be wrong and
> be a source of refcounting bugs.

It appears deliberate; Phillip wouldn't have to explicitly check for an
exception and re-raise it four times in the code if he could rely on Pyrex's
checking for NULL when returning from "object" functions. It looks like he's
taking care of the refcounts okay, too.

The code looks correct to me. Can you see anything wrong with it?

-- 
Robert Kern

"I have come to believe that the whole world is an enigma, a harmless enigma
 that is made terrible by our own mad attempt to interpret it as though it had
 an underlying truth."
  -- Umberto Eco




More information about the Pyrex mailing list