[prev in list] [next in list] [prev in thread] [next in thread] 

List:       pykde
Subject:    Re: [PyKDE] Another little big (I think...) (or was that bug?)
From:       Toby Sargeant <Toby.Sargeant () fulcrum ! com ! au>
Date:       1999-12-07 13:56:02
[Download RAW message or body]

On Mon, Dec 06, 1999 at 06:31:22PM +1100, Toby Sargeant wrote:
> In sipGetThis, there is the code fragment:
> 
>         if (thisObj != NULL)
>         {
>                 // sipParseArgs() will decrement the reference count.
> 
>                 Py_INCREF(arg);
>                 return (sipThisType *)thisObj;
>         }
> 
> The comment appears not to be true, and the arg tuple passed to sipParseArgs
> never gets gc'ed as a result of the incref. commenting it out fixed the
> problem.
> 
> Toby.

Obviously this wasn't the answer... There _is_ a corresponding Py_DECREF in
sipParseArgs(), it's just not called in a couple of cases (namely
qt.QListView.ensureItemVisible and friends). The corresponding code gencode.c
that emits the signature used in sipParseArgs() seems to be backwards with
respect to sipParseArgs though. "-" in gencode.c means no decref (according
to the variable name) but means decref in sipParseArgs.

I'm really not sure what's meant to be going on here; as far as I can see,
there's no reason to play around with the refcount of the argument tuple.

Toby.



[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic