summaryrefslogtreecommitdiff
path: root/data/vim/patches/8.1.1361
blob: 8da317febe77740eea79bde3e35b48aeff8428f0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
To: vim_dev@googlegroups.com
Subject: Patch 8.1.1361
Fcc: outbox
From: Bram Moolenaar <Bram@moolenaar.net>
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
------------

Patch 8.1.1361
Problem:    Python setuptools don't work with Python 3.
Solution:   Add dummy implementation for find_module. (Joel Frederico,
            closes #4402, closes #3984
Files:	    src/if_py_both.h


*** ../vim-8.1.1360/src/if_py_both.h	2019-05-18 15:02:20.966415938 +0200
--- src/if_py_both.h	2019-05-20 21:49:15.800074593 +0200
***************
*** 1222,1227 ****
--- 1222,1235 ----
  
      return spec;
  }
+ 
+     static PyObject *
+ FinderFindModule(PyObject* self UNUSED, PyObject* args UNUSED)
+ {
+     // Apparently returning None works.
+     Py_INCREF(Py_None);
+     return Py_None;
+ }
  #else
      static PyObject *
  call_load_module(char *name, int len, PyObject *find_module_result)
***************
*** 1400,1408 ****
      {"foreach_rtp", VimForeachRTP,		METH_O,				"Call given callable for each path in &rtp"},
  #if PY_VERSION_HEX >= 0x030700f0
      {"find_spec",   FinderFindSpec,		METH_VARARGS,			"Internal use only, returns spec object for any input it receives"},
- #else
-     {"find_module", FinderFindModule,		METH_VARARGS,			"Internal use only, returns loader object for any input it receives"},
  #endif
      {"path_hook",   VimPathHook,		METH_VARARGS,			"Hook function to install in sys.path_hooks"},
      {"_get_paths",  (PyCFunction)Vim_GetPaths,	METH_NOARGS,			"Get &rtp-based additions to sys.path"},
      { NULL,	    NULL,			0,				NULL}
--- 1408,1415 ----
      {"foreach_rtp", VimForeachRTP,		METH_O,				"Call given callable for each path in &rtp"},
  #if PY_VERSION_HEX >= 0x030700f0
      {"find_spec",   FinderFindSpec,		METH_VARARGS,			"Internal use only, returns spec object for any input it receives"},
  #endif
+     {"find_module", FinderFindModule,		METH_VARARGS,			"Internal use only, returns loader object for any input it receives"},
      {"path_hook",   VimPathHook,		METH_VARARGS,			"Hook function to install in sys.path_hooks"},
      {"_get_paths",  (PyCFunction)Vim_GetPaths,	METH_NOARGS,			"Get &rtp-based additions to sys.path"},
      { NULL,	    NULL,			0,				NULL}
*** ../vim-8.1.1360/src/version.c	2019-05-20 20:34:48.347791448 +0200
--- src/version.c	2019-05-20 21:50:57.403502707 +0200
***************
*** 769,770 ****
--- 769,772 ----
  {   /* Add new patch number below this line */
+ /**/
+     1361,
  /**/

-- 
A)bort, R)etry, B)ang it with a large hammer

 /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net   \\\
///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\  an exciting new programming language -- http://www.Zimbu.org        ///
 \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///