genlist: bump item class version to 3 to fix abi breakage
authorMike Blumenkrantz <zmike@osg.samsung.com>
Sat, 13 Feb 2016 19:38:26 +0000 (14:38 -0500)
committerMike Blumenkrantz <zmike@osg.samsung.com>
Sat, 13 Feb 2016 19:38:26 +0000 (14:38 -0500)
when adding new methods to public interface structs (such as item class),
the version must be bumped and checked in the new interface method calls
in order to avoid breaking abi for previously-compiled apps

ref 4c86a66f28876b68e92a90c8f741eed1130dd034

legacy/elementary/src/lib/elm_gen.h
legacy/elementary/src/lib/elm_genlist.c

index 08d6eb4..9f2bef7 100644 (file)
@@ -55,5 +55,5 @@ typedef Eina_Bool                     (*Elm_Gen_Item_Filter_Get_Cb)(void *data,
  */
 typedef Evas_Object                  *(*Elm_Gen_Item_Reusable_Content_Get_Cb)(void *data, Evas_Object *obj, const char *part, Evas_Object *old); /**< Cache Pop class function for gen item classes. */
 
-#define ELM_GEN_ITEM_CLASS_VERSION 2
+#define ELM_GEN_ITEM_CLASS_VERSION 3
 #define ELM_GEN_ITEM_CLASS_HEADER ELM_GEN_ITEM_CLASS_VERSION, 0, 0
index 742c385..cc2fdcf 100644 (file)
@@ -365,7 +365,8 @@ _item_content_realize(Elm_Gen_Item *it,
         EINA_LIST_FREE(*contents, content)
           evas_object_del(content);
      }
-   if (it->itc->func.content_get || it->itc->func.reusable_content_get)
+   if (it->itc->func.content_get ||
+      ((it->itc->version >= 3) && it->itc->func.reusable_content_get))
      {
         Eina_List *source;
         const char *key;