From 317230f240ee444a8647509d9ce48ffa6296ba21 Mon Sep 17 00:00:00 2001 From: Andreas Volz Date: Thu, 20 May 2010 18:00:33 +0000 Subject: [PATCH] added a usage hint about casting int to void* and back SVN revision: 49071 --- legacy/elementary/src/bin/test_genlist.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/legacy/elementary/src/bin/test_genlist.c b/legacy/elementary/src/bin/test_genlist.c index 4f783c4c79..18909aeb65 100644 --- a/legacy/elementary/src/bin/test_genlist.c +++ b/legacy/elementary/src/bin/test_genlist.c @@ -1,5 +1,14 @@ #include #ifndef ELM_LIB_QUICKLAUNCH + +/* Hint: + * In this example some calls to elm_genlist_item_append() are used which give the + * value of an int as 'item data' and 'func data' after casting into (void*). For + * sure this works only on architectures where sizeof(int)==sizeof(void*). + * For real world usage you should hold a data structure or value in your + * application and then give only a pointer to this data as data pointer. + */ + typedef struct _Testitem { Elm_Genlist_Item *item;