Re: GInterface and function, which returns pointer do data



On Sun, Jan 14, 2007 at 07:17:54PM +0100, Tomasz Jankowski wrote:
I'm trying to implement an interface in my code. I don't know how to
implement function which returns pointer to data. here's small part of code:

...

    gchar   (*get_file_name)    (GoofyFile  *file);  /*  <<< Shouldn't it
be:      gchar   (**get_file_name)    (GoofyFile  *file);     */
};

It should be

      gchar*        (*   get_file_name)    (GoofyFile  *file);

reading it:
                         get_file_name is...
                   ...a pointer to...
                                        ...function (with some args)...
        ...retuning a pointer to...
     ...gchar.

Yeti


--
Whatever.



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]