~ubuntu-branches/ubuntu/maverick/vte/maverick-updates

« back to all changes in this revision

Viewing changes to debian/patches/30_fix_env.patch

  • Committer: Bazaar Package Importer
  • Author(s): Michael Vogt
  • Date: 2009-07-06 14:03:47 UTC
  • Revision ID: james.westby@ubuntu.com-20090706140347-yvyi4lf21qftqzyx
Tags: 1:0.20.5-1ubuntu2
* debian/patches/30_fix_env.patch:
  - make the envv paramter work again (LP: #388953)

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
Index: vte-0.20.5/python/vte.override
 
2
===================================================================
 
3
--- vte-0.20.5.orig/python/vte.override 2009-07-06 15:37:30.890407499 +0200
 
4
+++ vte-0.20.5/python/vte.override      2009-07-06 15:38:08.557407549 +0200
 
5
@@ -114,7 +114,7 @@
 
6
        int i, pos, n_envs;
 
7
        PyObject *py_dict_k, *py_dict_v;
 
8
 
 
9
-       if (py_envv == NULL || py_envv != Py_None) {
 
10
+       if (py_envv == NULL || py_envv == Py_None) {
 
11
                return 0;
 
12
        }
 
13
 
 
14
@@ -124,20 +124,20 @@
 
15
                pos = 0;
 
16
                i = 0;
 
17
                while (PyDict_Next(py_envv, &pos, &py_dict_k, &py_dict_v)) {
 
18
-                       *envv[i++] = g_strdup_printf("%s=%s",
 
19
+                       (*envv)[i++] = g_strdup_printf("%s=%s",
 
20
                                PyString_AsString(py_dict_k),
 
21
                                PyString_AsString(py_dict_v));
 
22
                }
 
23
-               *envv[n_envs] = NULL;
 
24
+               (*envv)[n_envs] = NULL;
 
25
        } else if (PySequence_Check(py_envv)) {
 
26
                n_envs = PySequence_Length(py_envv);
 
27
                *envv = g_new(gchar *, n_envs + 1);
 
28
                for (i = 0; i < n_envs; i++) {
 
29
                        PyObject *item = PySequence_GetItem(py_envv, i);
 
30
                        Py_DECREF(item);  /* PySequence_GetItem INCREF's */
 
31
-                       *envv[i] = PyString_AsString(item);
 
32
+                       (*envv)[i] = PyString_AsString(item);
 
33
                }
 
34
-               *envv[n_envs] = NULL;
 
35
+               (*envv)[n_envs] = NULL;
 
36
        } else {
 
37
                PyErr_SetString(PyExc_TypeError,
 
38
                                "envv must be a sequence or a dictionary");