[Zope-dev] more on the segfault saga
Leonardo Rochael Almeida
leo@hiper.com.br
18 Mar 2002 19:12:21 -0300
On Mon, 2002-03-18 at 17:44, Leonardo Rochael Almeida wrote:
> I've applied both patches, however I've changed the incref part a
> little. Now it reads:
>
> #define Py_INCREF(op) ((op)->ob_refcnt > 0 ? (op)->ob_refcnt++ :
> fprintf(stderr,"Eeek! Increfing an object from refct 0 at
> %s:%d\n",__FILE__,__LINE__), (op)->ob_refcnt++)
Scratch that. It should read:
#define Py_INCREF(op) ((op)->ob_refcnt > 0 ? (op)->ob_refcnt++ :
(fprintf(stderr,"Eeek! Increfing an object from refct 0 at
%s:%d\n",__FILE__,__LINE__), (op)->ob_refcnt++))
the precedence on the previous version would probably cause a leak.
--
Ideas don't stay in some minds very long because they don't like
solitary confinement.