]> granicus.if.org Git - vim/commitdiff
Fix: "import termios" doesn't work with dynamically loaded Python. (James
authorBram Moolenaar <Bram@vim.org>
Thu, 22 Jul 2010 19:44:13 +0000 (21:44 +0200)
committerBram Moolenaar <Bram@vim.org>
Thu, 22 Jul 2010 19:44:13 +0000 (21:44 +0200)
Vega)

src/if_python.c
src/if_python3.c

index ea2e926ab5092dd51ac0daa547689b31407870ca..8185fc136f1a9790f94b6f32aa6fa2371b5cf2da 100644 (file)
@@ -96,11 +96,11 @@ struct PyMethodDef { Py_ssize_t a; };
 #  define HINSTANCE long_u             /* for generating prototypes */
 # endif
 
-#ifndef _WIN32
+#ifndef WIN3264
 # include <dlfcn.h>
 # define FARPROC void*
 # define HINSTANCE void*
-# define load_dll(n) dlopen((n),RTLD_LAZY)
+# define load_dll(n) dlopen((n), RTLD_LAZY|RTLD_GLOBAL)
 # define close_dll dlclose
 # define symbol_from_dll dlsym
 #else
index 422878ac03f8c4be29b6eae58f66efe6ae70c656..238f968b3f2e99821cb29e019b452a9a6fbb2447 100644 (file)
@@ -70,11 +70,11 @@ static void init_structs(void);
 
 #if defined(DYNAMIC_PYTHON3)
 
-#ifndef _WIN32
+#ifndef WIN3264
 #include <dlfcn.h>
 #define FARPROC void*
 #define HINSTANCE void*
-#define load_dll(n) dlopen((n),RTLD_LAZY)
+#define load_dll(n) dlopen((n), RTLD_LAZY|RTLD_GLOBAL)
 #define close_dll dlclose
 #define symbol_from_dll dlsym
 #else