summaryrefslogtreecommitdiff
path: root/src/if_python.c
diff options
context:
space:
mode:
authorMartin Tournoij <martin@arp242.net>2021-07-24 13:57:29 +0200
committerBram Moolenaar <Bram@vim.org>2021-07-24 13:57:29 +0200
commit1a3e5747b7df7ddda312bbfd18e04fc2122001fb (patch)
treedf3916d14b86db869aa32ce5a032e4d7dc09f0fa /src/if_python.c
parent5a234eb18e6e43408755bb24e813330306c11629 (diff)
downloadvim-git-1a3e5747b7df7ddda312bbfd18e04fc2122001fb.tar.gz
patch 8.2.3208: dynamic library load error does not mention why it failedv8.2.3208
Problem: Dynamic library load error does not mention why it failed. Solution: Add the error message. (Martin Tournoij, closes #8621)
Diffstat (limited to 'src/if_python.c')
-rw-r--r--src/if_python.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/if_python.c b/src/if_python.c
index 7f90ede15..a27098245 100644
--- a/src/if_python.c
+++ b/src/if_python.c
@@ -141,10 +141,12 @@ struct PyMethodDef { Py_ssize_t a; };
# endif
# define close_dll dlclose
# define symbol_from_dll dlsym
+# define load_dll_error dlerror
# else
# define load_dll vimLoadLib
# define close_dll FreeLibrary
# define symbol_from_dll GetProcAddress
+# define load_dll_error GetWin32Error
# endif
// This makes if_python.c compile without warnings against Python 2.5
@@ -688,7 +690,7 @@ python_runtime_link_init(char *libname, int verbose)
if (!hinstPython)
{
if (verbose)
- semsg(_(e_loadlib), libname);
+ semsg(_(e_loadlib), libname, load_dll_error());
return FAIL;
}