[Pidgin] #14550: API 3.0.0/PurpleRoomlist hiding: backward compatibilty break for roomlist_cancel() plugin

Pidgin trac at pidgin.im
Fri Aug 26 06:39:13 EDT 2011


#14550: API 3.0.0/PurpleRoomlist hiding: backward compatibilty break for
roomlist_cancel() plugin
-----------------------+----------------------------------------------------
 Reporter:  stefanb    |        Type:  defect
   Status:  new        |   Milestone:  2.10.1
Component:  libpurple  |     Version:        
 Keywords:  3.0.0 API  |  
-----------------------+----------------------------------------------------
 The type definition of PurpleRoomlist has been removed from the API in
 3.0.0, i.e. the type is now opaque.

 This causes problems for the plugin callback

    void (*roomlist_cancel)(PurpleRoomlist *list);

 Now that PurpleRoomlist is opaque there is no way for the callback to
 determine the PurpleAccount where this PurpleRoomlist applies to, i.e.

    PurpleAccount *account = list->account;

 now fails to compile with

    purple-groupchat.c: In function 'sipe_purple_roomlist_cancel':
    purple-groupchat.c:164:35: error: dereferencing pointer to incomplete
 type

 The original definition of PurpleRoomlist was

    struct _PurpleRoomlist {
      PurpleAccount *account; /**< The account this list belongs to. */
      GList *fields; /**< The fields. */

 so if that definition no longer applies, plugins compiled against older
 APIs will fail/crash if they try access the account field.

-- 
Ticket URL: <http://developer.pidgin.im/ticket/14550>
Pidgin <http://pidgin.im>
Pidgin


More information about the Tracker mailing list