diff options
author | Sebastien Helleu <flashcode@flashtux.org> | 2009-02-22 16:49:38 +0100 |
---|---|---|
committer | Sebastien Helleu <flashcode@flashtux.org> | 2009-02-22 16:49:38 +0100 |
commit | 2c9bf846a6db7258ca828862068f6f0e51179627 (patch) | |
tree | e346318b2c6d36e03e9e362a8e67e16d331ca850 /src/plugins/jabber | |
parent | b2584798a1549089095a3a2e98e1c93424dd9435 (diff) | |
download | weechat-2c9bf846a6db7258ca828862068f6f0e51179627.zip |
Add upgrade functions in script plugin API
Diffstat (limited to 'src/plugins/jabber')
-rw-r--r-- | src/plugins/jabber/jabber-upgrade.c | 14 |
1 files changed, 10 insertions, 4 deletions
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; } |