Writting a getter for a pointer to a function .

Posted by nomemory on Stack Overflow See other posts from Stack Overflow or by nomemory
Published on 2010-03-26T13:27:29Z Indexed on 2010/03/26 13:33 UTC
Read the original article Hit count: 130

Filed under:
|

I have the following problem:

"list.c"

struct nmlist_element_s {
    void *data;
    struct nmlist_element_s *next;
};

struct nmlist_s {
    nmlist_element *head;
    nmlist_element *tail;
    unsigned int size;
    void (*destructor)(void *data);
    int (*match)(const void *e1, const void *e2);
};

/*** Other code ***/

What will be the signature for a function that returns 'destructor' ?

© Stack Overflow or respective owner

Related posts about c

    Related posts about encapsulation