Re: Reference count question

2005-02-02 Thread Fredrik Lundh
John Machin wrote: >> you should check the return value, though. PyList_SetItem may (in >> theory) fail. > > :-) > Only a bot could say that. We mere mortals have been known to do things > like (a) pass a non-list as the first argument (b) pass an out-of-range > value for the second argument. ev

Re: Reference count question

2005-02-02 Thread John Machin
Fredrik Lundh wrote: > > >PyList_SetItem(List,i,Str); > > you should check the return value, though. PyList_SetItem may (in > theory) fail. > :-) Only a bot could say that. We mere mortals have been known to do things like (a) pass a non-list as the first argument (b) pass an out-of-range va

Re: Reference count question

2005-02-02 Thread Fredrik Lundh
"cedric paille" wrote: > I'm making python's modules to extend my application's functions with a built > in script editor. > At now all works very well, but i'd like to know if i'm not forgetting some > references inc/dec > > Here is a portion of my code: > > static PyObject * > Scene_GetNod