[vte] Bug 587894 - the environment passing with python does no longer work
- From: Behdad Esfahbod <behdad src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [vte] Bug 587894 - the environment passing with python does no longer work
- Date: Tue, 29 Sep 2009 18:56:37 +0000 (UTC)
commit 3c22f5997c7e11f371c606520daff279d9b613e4
Author: Behdad Esfahbod <behdad behdad org>
Date: Tue Sep 29 14:54:30 2009 -0400
Bug 587894 - the environment passing with python does no longer work
python/vte.override | 10 +++++-----
1 files changed, 5 insertions(+), 5 deletions(-)
---
diff --git a/python/vte.override b/python/vte.override
index 29c3316..196b935 100644
--- a/python/vte.override
+++ b/python/vte.override
@@ -112,7 +112,7 @@ _build_envv(PyObject *py_envv, char ***envv)
int i, pos, n_envs;
PyObject *py_dict_k, *py_dict_v;
- if (py_envv == NULL || py_envv != Py_None) {
+ if (py_envv == NULL || py_envv == Py_None) {
return 0;
}
@@ -122,20 +122,20 @@ _build_envv(PyObject *py_envv, char ***envv)
pos = 0;
i = 0;
while (PyDict_Next(py_envv, &pos, &py_dict_k, &py_dict_v)) {
- *envv[i++] = g_strdup_printf("%s=%s",
+ (*envv)[i++] = g_strdup_printf("%s=%s",
PyString_AsString(py_dict_k),
PyString_AsString(py_dict_v));
}
- *envv[n_envs] = NULL;
+ (*envv)[n_envs] = NULL;
} else if (PySequence_Check(py_envv)) {
n_envs = PySequence_Length(py_envv);
*envv = g_new(gchar *, n_envs + 1);
for (i = 0; i < n_envs; i++) {
PyObject *item = PySequence_GetItem(py_envv, i);
Py_DECREF(item); /* PySequence_GetItem INCREF's */
- *envv[i] = PyString_AsString(item);
+ (*envv)[i] = PyString_AsString(item);
}
- *envv[n_envs] = NULL;
+ (*envv)[n_envs] = NULL;
} else {
PyErr_SetString(PyExc_TypeError,
"envv must be a sequence or a dictionary");
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]