gnome-python r656 - trunk/gconf
- From: gjc svn gnome org
- To: svn-commits-list gnome org
- Subject: gnome-python r656 - trunk/gconf
- Date: Sun, 1 Feb 2009 17:15:10 +0000 (UTC)
Author: gjc
Date: Sun Feb 1 17:15:10 2009
New Revision: 656
URL: http://svn.gnome.org/viewvc/gnome-python?rev=656&view=rev
Log:
Bug 541088 â gconf set_value should take unicode string as value.
Modified:
trunk/gconf/gconf.override
Modified: trunk/gconf/gconf.override
==============================================================================
--- trunk/gconf/gconf.override (original)
+++ trunk/gconf/gconf.override Sun Feb 1 17:15:10 2009
@@ -877,6 +877,12 @@
gconf_client_set_float(GCONF_CLIENT(self->obj), key, PyFloat_AsDouble(py_val), &err);
} else if (PyString_Check(py_val)) {
gconf_client_set_string(GCONF_CLIENT(self->obj), key, PyString_AsString(py_val), &err);
+ } else if (PyUnicode_Check(py_val)) {
+ PyObject *utf8_tmp = PyUnicode_AsUTF8String(py_val);
+ if (!utf8_tmp)
+ return NULL;
+ gconf_client_set_string(GCONF_CLIENT(self->obj), key, PyString_AsString(utf8_tmp), &err);
+ Py_DECREF(utf8_tmp);
} else {
PyErr_SetString(PyExc_TypeError, "value type not supported yet by this API");
return NULL;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]