Mercurial > vim
comparison src/if_py_both.h @ 16718:9aa87f5aab55 v8.1.1361
patch 8.1.1361: Python setuptools don't work with Python 3
commit https://github.com/vim/vim/commit/0b0ad35c339b8ad156df493bebeb77e02b32b120
Author: Bram Moolenaar <Bram@vim.org>
Date: Mon May 20 21:52:45 2019 +0200
patch 8.1.1361: Python setuptools don't work with Python 3
Problem: Python setuptools don't work with Python 3.
Solution: Add dummy implementation for find_module. (Joel Frederico,
closes #4402, closes #3984
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Mon, 20 May 2019 22:00:05 +0200 |
parents | e791f29affae |
children | fc58fee685e2 |
comparison
equal
deleted
inserted
replaced
16717:94be3f45281f | 16718:9aa87f5aab55 |
---|---|
1220 return Py_None; | 1220 return Py_None; |
1221 } | 1221 } |
1222 | 1222 |
1223 return spec; | 1223 return spec; |
1224 } | 1224 } |
1225 | |
1226 static PyObject * | |
1227 FinderFindModule(PyObject* self UNUSED, PyObject* args UNUSED) | |
1228 { | |
1229 // Apparently returning None works. | |
1230 Py_INCREF(Py_None); | |
1231 return Py_None; | |
1232 } | |
1225 #else | 1233 #else |
1226 static PyObject * | 1234 static PyObject * |
1227 call_load_module(char *name, int len, PyObject *find_module_result) | 1235 call_load_module(char *name, int len, PyObject *find_module_result) |
1228 { | 1236 { |
1229 PyObject *fd, *pathname, *description; | 1237 PyObject *fd, *pathname, *description; |
1398 {"chdir", (PyCFunction)VimChdir, METH_VARARGS|METH_KEYWORDS, "Change directory"}, | 1406 {"chdir", (PyCFunction)VimChdir, METH_VARARGS|METH_KEYWORDS, "Change directory"}, |
1399 {"fchdir", (PyCFunction)VimFchdir, METH_VARARGS|METH_KEYWORDS, "Change directory"}, | 1407 {"fchdir", (PyCFunction)VimFchdir, METH_VARARGS|METH_KEYWORDS, "Change directory"}, |
1400 {"foreach_rtp", VimForeachRTP, METH_O, "Call given callable for each path in &rtp"}, | 1408 {"foreach_rtp", VimForeachRTP, METH_O, "Call given callable for each path in &rtp"}, |
1401 #if PY_VERSION_HEX >= 0x030700f0 | 1409 #if PY_VERSION_HEX >= 0x030700f0 |
1402 {"find_spec", FinderFindSpec, METH_VARARGS, "Internal use only, returns spec object for any input it receives"}, | 1410 {"find_spec", FinderFindSpec, METH_VARARGS, "Internal use only, returns spec object for any input it receives"}, |
1403 #else | 1411 #endif |
1404 {"find_module", FinderFindModule, METH_VARARGS, "Internal use only, returns loader object for any input it receives"}, | 1412 {"find_module", FinderFindModule, METH_VARARGS, "Internal use only, returns loader object for any input it receives"}, |
1405 #endif | |
1406 {"path_hook", VimPathHook, METH_VARARGS, "Hook function to install in sys.path_hooks"}, | 1413 {"path_hook", VimPathHook, METH_VARARGS, "Hook function to install in sys.path_hooks"}, |
1407 {"_get_paths", (PyCFunction)Vim_GetPaths, METH_NOARGS, "Get &rtp-based additions to sys.path"}, | 1414 {"_get_paths", (PyCFunction)Vim_GetPaths, METH_NOARGS, "Get &rtp-based additions to sys.path"}, |
1408 { NULL, NULL, 0, NULL} | 1415 { NULL, NULL, 0, NULL} |
1409 }; | 1416 }; |
1410 | 1417 |