PurpleBuddy & PurpleBlistNode struct confusion

ciciak c. cccccccc at post.sk
Sun Aug 9 07:13:38 EDT 2009

 Hi guys,

 I would like to ask you about 2 structs: PurpleBuddy & PurpleBlistNode. For clarity, I describe them shortly:

struct _PurpleBlistNode {

struct _PurpleBuddy {
    PurpleBlistNode node; // PurpleBlistNode is _PurpleBlistNode macro
    char *name;

So far so good. But I found code which actually works! It is like: 

static void blist_node_extended_menu_cb(PurpleBlistNode *node, void *data)
    PurpleBuddy *b = (PurpleBuddy *)node
    // so calling something to get string like b->name will work!!
Please, how can I cast type PurpleBlistNode to type PurpleBuddy. Or am I missing something here?
Thank You

http://www.inzeraty.sk/ - Bezplatná inzercia v najobľúbenejších kategóriách

More information about the Devel mailing list