[Bf-python] internal Python object conversion question
Joseph Gilbert
models at paposo.com
Thu Jun 16 00:56:51 CEST 2005
lol no biggy. It'll work, but no error checking and ref count issues.
Gotta love reference counts. woot.
Martin Poirier wrote:
>--- 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
>_______________________________________________
>Bf-python mailing list
>Bf-python at projects.blender.org
>http://projects.blender.org/mailman/listinfo/bf-python
>
>
>
>
>
More information about the Bf-python
mailing list