On Thu, Dec 24, 2009 at 7:46 AM, daniele_athome <[email protected]> wrote: > On Thu, Dec 24, 2009 at 10:37, daniele_athome <[email protected]> > wrote: >> As you can see, ListItem IS in the tuple, but the object passed to the >> actual python callback is cbt[0], so the List. Anyway I'll make some >> other tests in the meanwhile. >> > > It seems that returning cbt[2] solves the problem; but I want > Gustavo's confirmation before submitting the patch: > > def _list_item_conv(long addr): > cdef Elm_List_Item *it = <Elm_List_Item *>addr > cdef void *data = elm_list_item_data_get(it) > if data == NULL: > return None > else: > cbt = <object>data > return cbt[2] if len(cbt) > 2 else cbt[0] > > The modified line is the last one, was "return cbt[0]"
i guess this checking is too much, is there any case where cbt would be different? I'm just checking for data being NULL as for some reason we might be looking at a deleted list item (ie it was deleted from C but still lives in Python). so just return cbt[2] is fine. -- Gustavo Sverzut Barbieri http://profusion.mobi embedded systems -------------------------------------- MSN: [email protected] Skype: gsbarbieri Mobile: +55 (19) 9225-2202 ------------------------------------------------------------------------------ This SF.Net email is sponsored by the Verizon Developer Community Take advantage of Verizon's best-in-class app development support A streamlined, 14 day to market process makes app distribution fast and easy Join now and get one step closer to millions of Verizon customers http://p.sf.net/sfu/verizon-dev2dev _______________________________________________ enlightenment-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
