]> git.pld-linux.org Git - packages/vim.git/blob - 6.2.154
- use new bonobo patch (20040115)
[packages/vim.git] / 6.2.154
1 To: vim-dev@vim.org
2 Subject: Patch 6.2.154
3 Fcc: outbox
4 From: Bram Moolenaar <Bram@moolenaar.net>
5 Mime-Version: 1.0
6 Content-Type: text/plain; charset=ISO-8859-1
7 Content-Transfer-Encoding: 8bit
8 ------------
9
10 Patch 6.2.154
11 Problem:    Python bails out when giving a warning message. (Eugene
12             Minkovskii)
13 Solution:   Set sys.argv[] to an empty string.
14 Files:      src/if_python.c
15
16
17 *** ../vim-6.2.153/src/if_python.c      Tue Sep  9 22:38:27 2003
18 --- src/if_python.c     Wed Nov 12 10:00:44 2003
19 ***************
20 *** 100,105 ****
21 --- 100,106 ----
22   # define PyString_Size dll_PyString_Size
23   # define PyString_Type (*dll_PyString_Type)
24   # define PySys_SetObject dll_PySys_SetObject
25 + # define PySys_SetArgv dll_PySys_SetArgv
26   # define PyType_Type (*dll_PyType_Type)
27   # define Py_BuildValue dll_Py_BuildValue
28   # define Py_FindMethod dll_Py_FindMethod
29 ***************
30 *** 149,154 ****
31 --- 150,156 ----
32   static int(*dll_PyString_Size)(PyObject *);
33   static PyTypeObject* dll_PyString_Type;
34   static int(*dll_PySys_SetObject)(char *, PyObject *);
35 + static int(*dll_PySys_SetArgv)(int, char **);
36   static PyTypeObject* dll_PyType_Type;
37   static PyObject*(*dll_Py_BuildValue)(char *, ...);
38   static PyObject*(*dll_Py_FindMethod)(struct PyMethodDef[], PyObject *, char *);
39 ***************
40 *** 220,225 ****
41 --- 222,228 ----
42       {"PyString_Size", (PYTHON_PROC*)&dll_PyString_Size},
43       {"PyString_Type", (PYTHON_PROC*)&dll_PyString_Type},
44       {"PySys_SetObject", (PYTHON_PROC*)&dll_PySys_SetObject},
45 +     {"PySys_SetArgv", (PYTHON_PROC*)&dll_PySys_SetArgv},
46       {"PyType_Type", (PYTHON_PROC*)&dll_PyType_Type},
47       {"Py_BuildValue", (PYTHON_PROC*)&dll_Py_BuildValue},
48       {"Py_FindMethod", (PYTHON_PROC*)&dll_Py_FindMethod},
49 ***************
50 *** 2073,2078 ****
51 --- 2076,2082 ----
52   {
53       PyObject *mod;
54       PyObject *dict;
55 +     static char *(argv[2]) = {"", NULL};
56   
57       /* Fixups... */
58       BufferType.ob_type = &PyType_Type;
59 ***************
60 *** 2081,2086 ****
61 --- 2085,2093 ----
62       BufListType.ob_type = &PyType_Type;
63       WinListType.ob_type = &PyType_Type;
64       CurrentType.ob_type = &PyType_Type;
65
66 +     /* Set sys.argv[] to avoid a crash in warn(). */
67 +     PySys_SetArgv(1, argv);
68   
69       mod = Py_InitModule("vim", VimMethods);
70       dict = PyModule_GetDict(mod);
71 *** ../vim-6.2.153/src/version.c        Wed Nov 12 20:50:01 2003
72 --- src/version.c       Wed Nov 12 20:51:18 2003
73 ***************
74 *** 639,640 ****
75 --- 639,642 ----
76   {   /* Add new patch number below this line */
77 + /**/
78 +     154,
79   /**/
80
81 -- 
82 hundred-and-one symptoms of being an internet addict:
83 9. All your daydreaming is preoccupied with getting a faster connection to the
84    net: 28.8...ISDN...cable modem...T1...T3.
85
86  /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net   \\\
87 ///          Creator of Vim - Vi IMproved -- http://www.Vim.org          \\\
88 \\\              Project leader for A-A-P -- http://www.A-A-P.org        ///
89  \\\  Help AIDS victims, buy here: http://ICCF-Holland.org/click1.html  ///
This page took 0.028495 seconds and 3 git commands to generate.