About ProgressReport and msn-pecan

Richard Laager rlaager at wiktel.com
Mon Jun 16 09:54:08 EDT 2008


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.

Richard
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
URL: <http://pidgin.im/pipermail/devel/attachments/20080616/50616081/attachment.sig>


More information about the Devel mailing list