From 2c9bf846a6db7258ca828862068f6f0e51179627 Mon Sep 17 00:00:00 2001 From: Sebastien Helleu Date: Sun, 22 Feb 2009 16:49:38 +0100 Subject: Add upgrade functions in script plugin API --- src/plugins/jabber/jabber-upgrade.c | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) (limited to 'src/plugins/jabber') diff --git a/src/plugins/jabber/jabber-upgrade.c b/src/plugins/jabber/jabber-upgrade.c index 05942c734..75229a6e6 100644 --- a/src/plugins/jabber/jabber-upgrade.c +++ b/src/plugins/jabber/jabber-upgrade.c @@ -125,7 +125,7 @@ jabber_upgrade_save () int rc; struct t_upgrade_file *upgrade_file; - upgrade_file = weechat_upgrade_create (JABBER_UPGRADE_FILENAME, 1); + upgrade_file = weechat_upgrade_new (JABBER_UPGRADE_FILENAME, 1); if (!upgrade_file) return 0; @@ -168,7 +168,9 @@ jabber_upgrade_set_buffer_callbacks () */ int -jabber_upgrade_read_cb (int object_id, +jabber_upgrade_read_cb (void *data, + struct t_upgrade_file *upgrade_file, + int object_id, struct t_infolist *infolist) { int flags, size, i, index; @@ -177,6 +179,10 @@ jabber_upgrade_read_cb (int object_id, struct t_jabber_buddy *ptr_buddy; struct t_gui_buffer *ptr_buffer; + /* make C compiler happy */ + (void) data; + (void) upgrade_file; + weechat_infolist_reset_item_cursor (infolist); while (weechat_infolist_next (infolist)) { @@ -322,8 +328,8 @@ jabber_upgrade_load () jabber_upgrade_set_buffer_callbacks (); - upgrade_file = weechat_upgrade_create (JABBER_UPGRADE_FILENAME, 0); - rc = weechat_upgrade_read (upgrade_file, &jabber_upgrade_read_cb); + upgrade_file = weechat_upgrade_new (JABBER_UPGRADE_FILENAME, 0); + rc = weechat_upgrade_read (upgrade_file, &jabber_upgrade_read_cb, NULL); return rc; } -- cgit v1.2.3