pidgin: f530f6e0: Another Perl loader patch from Zsombor W...
datallah at pidgin.im
datallah at pidgin.im
Thu Aug 7 00:16:14 EDT 2008
-----------------------------------------------------------------
Revision: f530f6e0e82a6a0e7b2a19dd0715a4e492dfd177
Ancestor: dc56403926c4d47f16a146b6fd482488bf0c4398
Author: datallah at pidgin.im
Date: 2008-08-07T03:27:21
Branch: im.pidgin.pidgin
URL: http://d.pidgin.im/viewmtn/revision/info/f530f6e0e82a6a0e7b2a19dd0715a4e492dfd177
Modified files:
libpurple/plugins/perl/common/Prefs.xs
ChangeLog:
Another Perl loader patch from Zsombor Welker, this one adds some missing pref
related functions.
Fixes #4844
-------------- next part --------------
============================================================
--- libpurple/plugins/perl/common/Prefs.xs b57ed2e73348096b519744460e2e6a2ab8066a7e
+++ libpurple/plugins/perl/common/Prefs.xs 5ae1c1b4ffac0aa2ab74aa9a1998c9dcd11994de
@@ -60,6 +60,28 @@ void
g_list_free(t_GL);
void
+purple_prefs_add_path(name, value)
+ const char *name
+ const char *value
+
+void
+purple_prefs_add_path_list(name, value)
+ const char *name
+ SV *value
+PREINIT:
+ GList *t_GL;
+ int i, t_len;
+PPCODE:
+ t_GL = NULL;
+ t_len = av_len((AV *)SvRV(value));
+
+ for (i = 0; i < t_len; i++)
+ t_GL = g_list_append(t_GL, SvPVutf8_nolen(*av_fetch((AV *)SvRV(value), i, 0)));
+
+ purple_prefs_add_path_list(name, t_GL);
+ g_list_free(t_GL);
+
+void
purple_prefs_destroy()
guint
@@ -89,6 +111,21 @@ purple_prefs_exists(name)
purple_prefs_exists(name)
const char *name
+const char *
+purple_prefs_get_path(name)
+ const char *name
+
+void
+purple_prefs_get_path_list(name)
+ const char *name
+PREINIT:
+ GList *l;
+PPCODE:
+ for (l = purple_prefs_get_path_list(name); l != NULL; l = g_list_delete_link(l, l)) {
+ XPUSHs(sv_2mortal(newSVpv(l->data, 0)));
+ g_free(l->data);
+ }
+
gboolean
purple_prefs_get_bool(name)
const char *name
@@ -174,6 +211,29 @@ void
g_list_free(t_GL);
void
+purple_prefs_set_path(name, value)
+ const char *name
+ const char *value
+
+void
+purple_prefs_set_path_list(name, value)
+ const char *name
+ SV *value
+PREINIT:
+ GList *t_GL;
+ int i, t_len;
+PPCODE:
+ t_GL = NULL;
+ t_len = av_len((AV *)SvRV(value));
+
+ for (i = 0; i < t_len; i++)
+ t_GL = g_list_append(t_GL, SvPVutf8_nolen(*av_fetch((AV *)SvRV(value), i, 0)));
+
+ purple_prefs_set_path_list(name, t_GL);
+ g_list_free(t_GL);
+
+
+void
purple_prefs_trigger_callback(name)
const char *name
More information about the Commits
mailing list