About ProgressReport and msn-pecan

Felipe Contreras felipe.contreras at gmail.com
Mon Jun 16 10:42:40 EDT 2008


On Mon, Jun 16, 2008 at 4:54 PM, Richard Laager <rlaager at wiktel.com> wrote:
> On Sun, 2008-06-15 at 16:13 +0300, Felipe Contreras wrote:
>> Now you still don't seem to understand that the whole point of the
>> _private headers is to start the struct hiding *without* API/ABI
>> breakage. Old stuff use foo.h (foo_private.h <- foo_public.h), new
>> stuff use foo_public.h.
>
> This is really not a big deal. I've had a plan for this for a long time,
> just not time to actually work on it. Here it goes (watch the #ifdef vs.
> #ifndef closely).
>
> -----
>
> account.h:
>
> typedef struct PurpleAccount PurpleAccount;
>
> #ifndef PURPLE_DISABLE_DEPRECATED
>
> #include "presence.h"
>
> /* If this is updated, also update the copy in account.c. */
> struct PurpleAccount
> {
>        char *username;
>        char *alias;
>        char *password;
>        char *user_info;
>        ...
>        PurplePresence *presence;
>        ...
> }
> #endif
>
> -----
>
> account.c
>
> #include "presense.h"
>
> #ifdef PURPLE_DISABLE_DEPRECATED
> /* If this is updated, also update the copy in account.h. */
> struct PurpleAccount
> {
>        char *username;
>        char *alias;
>        char *password;
>        char *user_info;
>        ...
>        PurplePresence *presence;
>        ...
> }
> #endif
>
> -----
>
> Then, we compile libpurple (and Pidgin & Finch) with
> PURPLE_DISABLE_DEPRECATED set. In doing so, we can do what I've
> described above one struct at a time, adding accessor methods and
> updating code as necessary to use them. (We can work in steps as you
> suggest.) We still have just one header file to install and it maintains
> API & ABI compatibility. The PURPLE_DISABLE_DEPRECATED define means we
> have a clean way for plugin authors to see if their plugin is using
> anything deprecated and self documents the removals necessary for 3.0.0.

Ah, cool, that looks better.

-- 
Felipe Contreras


More information about the Devel mailing list