[Bf-python] internal Python object conversion question

Martin Poirier theeth at yahoo.com
Thu Jun 16 00:32:41 CEST 2005



--- Ken Hughes <khughes at pacific.edu> wrote:

> Gilbert, Joseph wrote:
> > Yea prob better to write something like:
> > item = PySequence_GetItem( pyOb, 0 );
> > if(item == NULL)
> > 	return -1; 
> > float f = (float) PyFloat_AS_DOUBLE(item);
> > Py_DECREF(item);
> > Hope I didn't write that.:/ 
> 
> Noticed it in
> api2_2x/CurNurb.c:CurNurb_appendPointToNurb(). 
> Think it
> was the latest patch for 2.37a :-(

Eeek! My fault then :(
And your understanding is right, it returns a new
reference according to
http://docs.python.org/api/sequence.html

Martin


		
__________________________________ 
Discover Yahoo! 
Have fun online with music videos, cool games, IM and more. Check it out! 
http://discover.yahoo.com/online.html



More information about the Bf-python mailing list