On Fri, Feb 10, 2012 at 8:34 PM, Gustavo Sverzut Barbieri
<barbi...@profusion.mobi> wrote:
> On Fri, Feb 10, 2012 at 7:26 AM, Hyoyoung Chang <hyoyo...@gmail.com> wrote:
>> Dear all.
>>
>> I make controversial apis for item class management.
>> As raster and other guys suggest, I simplify APIs and its behaviors.
>>
>> First, Two public apis and two internal apis are introduced
>>
>> +EAPI Elm_Genlist_Item_Class *
>> +elm_genlist_item_class_new(void)
>>
>> +EAPI void
>> +elm_genlist_item_class_free(Elm_Genlist_Item_Class *itc)
>>
>> +void
>> +_elm_genlist_item_class_ref(Elm_Genlist_Item_Class *itc)
>>
>> +void
>> +_elm_genlist_item_class_unref(Elm_Genlist_Item_Class *itc)
>>
>> genlist item class is maintained by genlist in automatic manner.
>>
>> And three fields are introduced in genlist item class.
>> +   int version;
>> +   unsigned int refcount;
>> +   Eina_Bool delete_me;
>>
>> Normally a user add a elm_genlist_item_class by elm_genlist_item_class_new().
>> Then its reference counter is automatic maintained.
>> If the user wanna to remove the elm_genlist_item_class, then call
>> elm_genlist_item_class_free()
>> After refcount reaches to 0, it will be removed.
>
> And about code that wants to use static const version as all my software?
>
> You can't ref/unref it, I don't want more mallocs in my code
If then Just use as it. this patch checks version of item class, and
only exact version will be manged.

+void
+_elm_genlist_item_class_ref(Elm_Genlist_Item_Class *itc)
+{
+   if (itc->version == ELM_GENLIST_ITEM_CLASS_VERSION)

maybe some magic check will be need to add. anyway static const vars
will be compatible.
>
> --
> Gustavo Sverzut Barbieri
> http://profusion.mobi embedded systems
> --------------------------------------
> MSN: barbi...@gmail.com
> Skype: gsbarbieri
> Mobile: +55 (19) 9225-2202
>
> ------------------------------------------------------------------------------
> Virtualization & Cloud Management Using Capacity Planning
> Cloud computing makes use of virtualization - but cloud computing
> also focuses on allowing computing to be delivered as a service.
> http://www.accelacomm.com/jaw/sfnl/114/51521223/
> _______________________________________________
> enlightenment-devel mailing list
> enlightenment-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/enlightenment-devel

------------------------------------------------------------------------------
Virtualization & Cloud Management Using Capacity Planning
Cloud computing makes use of virtualization - but cloud computing 
also focuses on allowing computing to be delivered as a service.
http://www.accelacomm.com/jaw/sfnl/114/51521223/
_______________________________________________
enlightenment-devel mailing list
enlightenment-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel

Reply via email to