[Galago-commits] r2770 - in trunk/notify-python: . src
galago-commits at freedesktop.org
galago-commits at freedesktop.org
Tue Apr 25 01:38:31 PDT 2006
Author: chipx86
Date: 2006-04-25 01:38:29 -0700 (Tue, 25 Apr 2006)
New Revision: 2770
Modified:
trunk/notify-python/ChangeLog
trunk/notify-python/src/pynotify.override
Log:
Fix get_server_caps(). It doesn't crash anymore.
Modified: trunk/notify-python/ChangeLog
===================================================================
--- trunk/notify-python/ChangeLog 2006-04-25 08:28:01 UTC (rev 2769)
+++ trunk/notify-python/ChangeLog 2006-04-25 08:38:29 UTC (rev 2770)
@@ -1,3 +1,8 @@
+Tue Apr 25 01:38:08 PDT 2006 Christian Hammond <chipx86 at chipx86.com>
+
+ * src/pynotify.override:
+ - Fix get_server_caps(). It doesn't crash anymore.
+
Tue Apr 25 01:26:43 PDT 2006 Christian Hammond <chipx86 at chipx86.com>
* src/Makefile.am:
Modified: trunk/notify-python/src/pynotify.override
===================================================================
--- trunk/notify-python/src/pynotify.override 2006-04-25 08:28:01 UTC (rev 2769)
+++ trunk/notify-python/src/pynotify.override 2006-04-25 08:38:29 UTC (rev 2770)
@@ -13,6 +13,34 @@
} ActionCbData;
static PyObject *
+pygalago_wrap_str_list(GList *list)
+{
+ GList *l;
+ PyObject *item, *ret;
+
+ ret = PyList_New(0);
+
+ if (ret == NULL)
+ return NULL;
+
+ for (l = list; l != NULL; l = l->next)
+ {
+ item = PyString_FromString((char *)l->data);
+
+ if (item == NULL)
+ {
+ Py_DECREF(ret);
+ return NULL;
+ }
+
+ PyList_Append(ret, item);
+ Py_DECREF(item);
+ }
+
+ return ret;
+}
+
+static PyObject *
pygalago_wrap_gobj_list(GList *list)
{
GList *l;
@@ -165,7 +193,7 @@
static PyObject *
_wrap_notify_get_server_caps(PyObject *self)
{
- return pygalago_wrap_gobj_list(notify_get_server_caps());
+ return pygalago_wrap_str_list(notify_get_server_caps());
}
%%
override notify_get_server_info
More information about the galago-commits
mailing list