]> git.pld-linux.org Git - packages/vim.git/blob - 7.3.142
- new
[packages/vim.git] / 7.3.142
1 To: vim_dev@googlegroups.com
2 Subject: Patch 7.3.142
3 Fcc: outbox
4 From: Bram Moolenaar <Bram@moolenaar.net>
5 Mime-Version: 1.0
6 Content-Type: text/plain; charset=UTF-8
7 Content-Transfer-Encoding: 8bit
8 ------------
9
10 Patch 7.3.142
11 Problem:    Python stdout doesn't have a flush() method, causing an import to
12             fail.
13 Solution:   Add a dummy flush() method. (Tobias Columbus)
14 Files:      src/if_py_both.h
15
16
17 *** ../vim-7.3.141/src/if_py_both.h     2010-10-27 12:17:54.000000000 +0200
18 --- src/if_py_both.h    2011-03-22 15:37:43.000000000 +0100
19 ***************
20 *** 33,38 ****
21 --- 33,39 ----
22   
23   static PyObject *OutputWrite(PyObject *, PyObject *);
24   static PyObject *OutputWritelines(PyObject *, PyObject *);
25 + static PyObject *OutputFlush(PyObject *, PyObject *);
26   
27   /* Function to write a line, points to either msg() or emsg(). */
28   typedef void (*writefn)(char_u *);
29 ***************
30 *** 47,55 ****
31   
32   static struct PyMethodDef OutputMethods[] = {
33       /* name,      function,           calling,    documentation */
34 !     {"write",     OutputWrite,        1,          "" },
35 !     {"writelines",  OutputWritelines, 1,          "" },
36 !     { NULL,       NULL,               0,          NULL }
37   };
38   
39   #define PyErr_SetVim(str) PyErr_SetString(VimError, str)
40 --- 48,57 ----
41   
42   static struct PyMethodDef OutputMethods[] = {
43       /* name,      function,           calling,    documentation */
44 !     {"write",     OutputWrite,        1,          ""},
45 !     {"writelines",  OutputWritelines, 1,          ""},
46 !     {"flush",       OutputFlush,        1,          ""},
47 !     { NULL,       NULL,               0,          NULL}
48   };
49   
50   #define PyErr_SetVim(str) PyErr_SetString(VimError, str)
51 ***************
52 *** 123,128 ****
53 --- 125,139 ----
54       return Py_None;
55   }
56   
57 +     static PyObject *
58 + OutputFlush(PyObject *self UNUSED, PyObject *args UNUSED)
59 + {
60 +     /* do nothing */
61 +     Py_INCREF(Py_None);
62 +     return Py_None;
63 + }
64
65
66   /* Buffer IO, we write one whole line at a time. */
67   static garray_T io_ga = {0, 0, 1, 80, NULL};
68   static writefn old_fn = NULL;
69 *** ../vim-7.3.141/src/version.c        2011-03-22 14:35:01.000000000 +0100
70 --- src/version.c       2011-03-22 15:45:38.000000000 +0100
71 ***************
72 *** 716,717 ****
73 --- 716,719 ----
74   {   /* Add new patch number below this line */
75 + /**/
76 +     142,
77   /**/
78
79 -- 
80 Living on Earth includes an annual free trip around the Sun.
81
82  /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net   \\\
83 ///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
84 \\\  an exciting new programming language -- http://www.Zimbu.org        ///
85  \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///
This page took 0.0279 seconds and 3 git commands to generate.