]> granicus.if.org Git - vim/commitdiff
patch 7.4.907 v7.4.907
authorBram Moolenaar <Bram@vim.org>
Mon, 2 Nov 2015 14:28:18 +0000 (15:28 +0100)
committerBram Moolenaar <Bram@vim.org>
Mon, 2 Nov 2015 14:28:18 +0000 (15:28 +0100)
Problem:    Libraries for dynamically loading interfaces can only be defined
            at compile time.
Solution:   Add options to specify the dll names. (Kazuki Sakamoto,
            closes #452)

13 files changed:
runtime/doc/if_lua.txt
runtime/doc/if_perl.txt
runtime/doc/if_pyth.txt
runtime/doc/if_ruby.txt
runtime/doc/options.txt
src/if_lua.c
src/if_perl.xs
src/if_python.c
src/if_python3.c
src/if_ruby.c
src/option.c
src/option.h
src/version.c

index 2b322ddbae4f6180e5140c88624b501203933195..e6b8e680462b951c1deb8468e194bedd76fb2ccf 100644 (file)
@@ -1,4 +1,4 @@
-*if_lua.txt*    For Vim version 7.4.  Last change: 2013 Sep 04
+*if_lua.txt*    For Vim version 7.4.  Last change: 2015 Oct 16
 
 
                  VIM REFERENCE MANUAL    by Luis Carvalho
@@ -14,6 +14,7 @@ The Lua Interface to Vim                              *lua* *Lua*
 6. Buffer userdata             |lua-buffer|
 7. Window userdata             |lua-window|
 8. The luaeval function                |lua-luaeval|
+9. Dynamic loading             |lua-dynamic|
 
 {Vi does not have any of these commands}
 
@@ -399,5 +400,24 @@ Examples: >
        :echo Rand(1,10)
 
 
+==============================================================================
+9. Dynamic loading                                 *lua-dynamic*
+
+On MS-Windows and Unix the Lua library can be loaded dynamically.  The
+|:version| output then includes |+lua/dyn|.
+
+This means that Vim will search for the Lua DLL or shared library file only
+when needed.  When you don't use the Lua interface you don't need it, thus
+you can use Vim without this file.
+
+On MS-Windows to use the Lua interface the Lua DLL must be in your search path.
+In a console window type "path" to see what directories are used.  The version
+of the DLL must match the Lua version Vim was compiled with.
+
+On Unix the 'luadll' option can be used to specify the Lua shared library file
+instead of DYNAMIC_LUA_DLL file what was specified at compile time.  The
+version of the shared library must match the Lua version Vim was compiled with.
+
+
 ==============================================================================
  vim:tw=78:ts=8:noet:ft=help:norl:
index 7be5f06f687988c3b664ff079e9658c48a32c011..c73eb610feb2e5d518430569caa80ad9428138c0 100644 (file)
@@ -1,4 +1,4 @@
-*if_perl.txt*   For Vim version 7.4.  Last change: 2013 Oct 05
+*if_perl.txt*   For Vim version 7.4.  Last change: 2015 Oct 16
 
 
                  VIM REFERENCE MANUAL    by Sven Verdoolaege
@@ -290,5 +290,13 @@ The name of the DLL must match the Perl version Vim was compiled with.
 Currently the name is "perl512.dll".  That is for Perl 5.12.  To know for
 sure edit "gvim.exe" and search for "perl\d*.dll\c".
 
+
+Unix ~
+
+The 'perldll' option can be used to specify the Perl shared library file
+instead of DYNAMIC_PERL_DLL file what was specified at compile time.  The
+version of the shared library must match the Perl version Vim was compiled
+with.
+
 ==============================================================================
  vim:tw=78:ts=8:ft=help:norl:
index 4ed8eac742c8e1bb2fa5c74338ccf9ca8e42d581..3d066e33ee462cb9d689c9962f29d98f23885c5c 100644 (file)
@@ -1,4 +1,4 @@
-*if_pyth.txt*   For Vim version 7.4.  Last change: 2014 Jul 23
+*if_pyth.txt*   For Vim version 7.4.  Last change: 2015 Oct 16
 
 
                  VIM REFERENCE MANUAL    by Paul Moore
@@ -679,20 +679,26 @@ functions to evaluate Python expressions and pass their values to VimL.
 ==============================================================================
 9. Dynamic loading                                     *python-dynamic*
 
-On MS-Windows the Python library can be loaded dynamically.  The |:version|
-output then includes |+python/dyn|.
+On MS-Windows and Unix the Python library can be loaded dynamically.  The
+|:version| output then includes |+python/dyn| or |+python3/dyn|.
 
-This means that Vim will search for the Python DLL file only when needed.
-When you don't use the Python interface you don't need it, thus you can use
-Vim without this DLL file.
+This means that Vim will search for the Python DLL or shared library file only
+when needed.  When you don't use the Python interface you don't need it, thus
+you can use Vim without this file.
 
-To use the Python interface the Python DLL must be in your search path.  In a
-console window type "path" to see what directories are used.
+On MS-Windows to use the Python interface the Python DLL must be in your search
+path.  In a console window type "path" to see what directories are used.
 
 The name of the DLL must match the Python version Vim was compiled with.
 Currently the name is "python24.dll".  That is for Python 2.4.  To know for
 sure edit "gvim.exe" and search for "python\d*.dll\c".
 
+On Unix the 'pythondll' or 'python3dll' option can be used to specify the
+Python shared library file instead of DYNAMIC_PYTHON_DLL or
+DYNAMIC_PYTHON3_DLL file what were specified at compile time.  The version of
+the shared library must match the Python 2.x or Python 3 version Vim was
+compiled with.
+
 ==============================================================================
 10. Python 3                                           *python3*
 
index 4084181f97ac157f60c1f688d69796404a16cb69..0d41d8fb2b653b7bbb4f80287c34bf38d6f02b05 100644 (file)
@@ -1,4 +1,4 @@
-*if_ruby.txt*   For Vim version 7.4.  Last change: 2015 Feb 22
+*if_ruby.txt*   For Vim version 7.4.  Last change: 2015 Oct 16
 
 
                  VIM REFERENCE MANUAL    by Shugo Maeda
@@ -199,6 +199,8 @@ This means that Vim will search for the Ruby DLL file or shared library only
 when needed.  When you don't use the Ruby interface you don't need it, thus
 you can use Vim even though this library file is not on your system.
 
+MS-Windows ~
+
 You need to install the right version of Ruby for this to work.  You can find
 the package to download from:
 http://www.garbagecollect.jp/ruby/mswin32/en/download/release.html
@@ -216,5 +218,12 @@ and comment-out the check for _MSC_VER.
 You may also need to rename the include directory name to match the version,
 strangely for Ruby 1.9.3 the directory is called 1.9.1.
 
+Unix ~
+
+The 'rubydll' option can be used to specify the Ruby shared library file
+instead of DYNAMIC_RUBY_DLL file what was specified at compile time.  The
+version of the shared library must match the Ruby version Vim was compiled
+with.
+
 ==============================================================================
  vim:tw=78:ts=8:ft=help:norl:
index 3cb667d35d1ea4e78a3de9b7640e36081d10d60a..f0e4f58c1f89687d68f72c61ace3cd433a86334b 100644 (file)
@@ -1,4 +1,4 @@
-*options.txt*  For Vim version 7.4.  Last change: 2015 Sep 15
+*options.txt*  For Vim version 7.4.  Last change: 2015 Nov 01
 
 
                  VIM REFERENCE MANUAL    by Bram Moolenaar
@@ -1248,7 +1248,7 @@ A jump table for the options with a short description can be found at |Q_op|.
        break if 'linebreak' is on.  Only works for ASCII and also for 8-bit
        characters when 'encoding' is an 8-bit encoding.
 
-                                               *'breakindent'* *'bri'*
+                               *'breakindent'* *'bri'* *'nobreakindent'* *'nobri'*
 'breakindent' 'bri'    boolean (default off)
                        local to window
                        {not in Vi}
@@ -3412,7 +3412,7 @@ A jump table for the options with a short description can be found at |Q_op|.
        modeline, see |sandbox-option|.  That stops the option from working,
        since changing the buffer text is not allowed.
 
-                                               *'fsync'* *'fs'*
+                                       *'fsync'* *'fs'* *'nofsync'* *'nofs'*
 'fsync' 'fs'           boolean (default on)
                        global
                        {not in Vi}
@@ -4666,7 +4666,7 @@ A jump table for the options with a short description can be found at |Q_op|.
                :source $VIMRUNTIME/menu.vim
 <      Warning: This deletes all menus that you defined yourself!
 
-                                       *'langnoremap'* *'lnr'*
+                       *'langnoremap'* *'lnr'* *'nolangnoremap'* *'nolnr'*
 'langnoremap' 'lnr'    boolean (default off)
                        global
                        {not in Vi}
@@ -4847,6 +4847,17 @@ A jump table for the options with a short description can be found at |Q_op|.
        Note that using the "-u NONE" and "--noplugin" command line arguments
        reset this option. |-u| |--noplugin|
 
+                                               *'luadll'*
+'luadll'               string  (default empty)
+                       global
+                       {not in Vi} {only for Unix}
+                       {only available when compiled with the |+lua/dyn|
+                       feature}
+       Specifies the path of the Lua shared library instead of DYNAMIC_LUA_DLL
+       what was specified at compile time.
+       This option cannot be set from a |modeline| or in the |sandbox|, for
+       security reasons.
+
                                                *'macatsui'* *'nomacatsui'*
 'macatsui'             boolean (default on)
                        global
@@ -5550,6 +5561,17 @@ A jump table for the options with a short description can be found at |Q_op|.
 <      Replace the ';' with a ':' or whatever separator is used.  Note that
        this doesn't work when $INCL contains a comma or white space.
 
+                                               *'perldll'*
+'perldll'              string  (default empty)
+                       global
+                       {not in Vi} {only for Unix}
+                       {only available when compiled with the |+perl/dyn|
+                       feature}
+       Specifies the path of the Perl shared library instead of
+       DYNAMIC_PERL_DLL what was specified at compile time.
+       This option cannot be set from a |modeline| or in the |sandbox|, for
+       security reasons.
+
                        *'preserveindent'* *'pi'* *'nopreserveindent'* *'nopi'*
 'preserveindent' 'pi'  boolean (default off)
                        local to buffer
@@ -5676,6 +5698,27 @@ A jump table for the options with a short description can be found at |Q_op|.
        Insert mode completion.  When zero as much space as available is used.
        |ins-completion-menu|.
 
+                                               *'python3dll'*
+'python3dll'           string  (default empty)
+                       global
+                       {not in Vi} {only for Unix}
+                       {only available when compiled with the |+python3/dyn|
+                       feature}
+       Specifies the path of the Python 3 shared library instead of
+       DYNAMIC_PYTHON3_DLL what was specified at compile time.
+       This option cannot be set from a |modeline| or in the |sandbox|, for
+       security reasons.
+
+                                               *'pythondll'*
+'pythondll'            string  (default empty)
+                       global
+                       {not in Vi} {only for Unix}
+                       {only available when compiled with the |+python/dyn|
+                       feature}
+       Specifies the path of the Python 2.x shared library instead of
+       DYNAMIC_PYTHON_DLL what was specified at compile time.
+       This option cannot be set from a |modeline| or in the |sandbox|, for
+       security reasons.
 
                                                *'quoteescape'* *'qe'*
 'quoteescape' 'qe'     string  (default "\")
@@ -5896,6 +5939,17 @@ A jump table for the options with a short description can be found at |Q_op|.
        This is useful for languages such as Hebrew, Arabic and Farsi.
        The 'rightleft' option must be set for 'rightleftcmd' to take effect.
 
+                                               *'rubydll'*
+'rubydll'              string  (default empty)
+                       global
+                       {not in Vi} {only for Unix}
+                       {only available when compiled with the |+ruby/dyn|
+                       feature}
+       Specifies the path of the Ruby shared library instead of
+       DYNAMIC_RUBY_DLL what was specified at compile time.
+       This option cannot be set from a |modeline| or in the |sandbox|, for
+       security reasons.
+
                                         *'ruler'* *'ru'* *'noruler'* *'noru'*
 'ruler' 'ru'           boolean (default off)
                        global
index 167e86517aa15ac419c1152db45dc8920b144fbd..bc2d6c3678d219e8d8fa130d204b70d260452765 100644 (file)
@@ -402,7 +402,12 @@ lua_link_init(char *libname, int verbose)
     int
 lua_enabled(int verbose)
 {
-    return lua_link_init(DYNAMIC_LUA_DLL, verbose) == OK;
+#ifdef WIN3264
+    char *dll = DYNAMIC_LUA_DLL;
+#else
+    char *dll = *p_luadll ? (char *)p_luadll : DYNAMIC_LUA_DLL;
+#endif
+    return lua_link_init(dll, verbose) == OK;
 }
 
 #endif /* DYNAMIC_LUA */
index 685c0bacd04b636adf5ecadc42a9b2f92ea191eb..19292b384b847f5bf127c178cf702936e8f35763 100644 (file)
@@ -611,7 +611,12 @@ perl_runtime_link_init(char *libname, int verbose)
 perl_enabled(verbose)
     int                verbose;
 {
-    return perl_runtime_link_init(DYNAMIC_PERL_DLL, verbose) == OK;
+#if WIN3264
+    char *dll = DYNAMIC_PERL_DLL;
+#else
+    char *dll = *p_perldll ? (char *)p_perldll : DYNAMIC_PERL_DLL;
+#endif
+    return perl_runtime_link_init(dll, verbose) == OK;
 }
 #endif /* DYNAMIC_PERL */
 
index 2ef0dfc9ac8b5b4332dc45de24be9971aadf315d..9d28df076cb650eec8960c7e3304af710ed1c660 100644 (file)
@@ -732,7 +732,12 @@ python_runtime_link_init(char *libname, int verbose)
     int
 python_enabled(int verbose)
 {
-    return python_runtime_link_init(DYNAMIC_PYTHON_DLL, verbose) == OK;
+#ifdef WIN3264
+    char *dll = DYNAMIC_PYTHON_DLL;
+#else
+    char *dll = *p_pydll ? (char *)p_pydll : DYNAMIC_PYTHON_DLL;
+#endif
+    return python_runtime_link_init(dll, verbose) == OK;
 }
 
 /*
index a6a655f0a304e67169fb965915f824e56af2ea85..721e3cc5bbc93e8bff8842f358a46c586def4100 100644 (file)
@@ -686,7 +686,12 @@ py3_runtime_link_init(char *libname, int verbose)
     int
 python3_enabled(int verbose)
 {
-    return py3_runtime_link_init(DYNAMIC_PYTHON3_DLL, verbose) == OK;
+#ifdef WIN3264
+    char *dll = DYNAMIC_PYTHON3_DLL;
+#else
+    char *dll = *p_py3dll ? (char *)p_py3dll : DYNAMIC_PYTHON3_DLL;
+#endif
+    return py3_runtime_link_init(dll, verbose) == OK;
 }
 
 /* Load the standard Python exceptions - don't import the symbols from the
index 3767bf33460e20b2d8917b86bd6eb514ebe9e13e..ac2387857e7c9b4dda4703e98d53a807cdae57a5 100644 (file)
@@ -639,7 +639,12 @@ ruby_runtime_link_init(char *libname, int verbose)
 ruby_enabled(verbose)
     int                verbose;
 {
-    return ruby_runtime_link_init(DYNAMIC_RUBY_DLL, verbose) == OK;
+#ifdef WIN3264
+    char *dll = DYNAMIC_RUBY_DLL;
+#else
+    char *dll = *p_rubydll ? (char *)p_rubydll : DYNAMIC_RUBY_DLL;
+#endif
+    return ruby_runtime_link_init(dll, verbose) == OK;
 }
 #endif /* defined(DYNAMIC_RUBY) || defined(PROTO) */
 
index d1bce6ac38e5bac57e84cfe471c5a372d154b700..7c9f9c8f523cf48f9af987037953165c2400e9d2 100644 (file)
@@ -1779,6 +1779,11 @@ static struct vimoption
     {"loadplugins", "lpl",  P_BOOL|P_VI_DEF,
                            (char_u *)&p_lpl, PV_NONE,
                            {(char_u *)TRUE, (char_u *)0L} SCRIPTID_INIT},
+#if defined(DYNAMIC_LUA) && !defined(WIN3264)
+    {"luadll",      NULL,   P_STRING|P_VI_DEF|P_SECURE,
+                           (char_u *)&p_luadll, PV_NONE,
+                           {(char_u *)"", (char_u *)0L} SCRIPTID_INIT},
+#endif
 #ifdef FEAT_GUI_MAC
     {"macatsui",    NULL,   P_BOOL|P_VI_DEF|P_RCLR,
                            (char_u *)&p_macatsui, PV_NONE,
@@ -2014,6 +2019,11 @@ static struct vimoption
 # endif
 #endif
                                (char_u *)0L} SCRIPTID_INIT},
+#if defined(DYNAMIC_PERL) && !defined(WIN3264)
+    {"perldll",     NULL,   P_STRING|P_VI_DEF|P_SECURE,
+                           (char_u *)&p_perldll, PV_NONE,
+                           {(char_u *)"", (char_u *)0L} SCRIPTID_INIT},
+#endif
     {"preserveindent", "pi", P_BOOL|P_VI_DEF|P_VIM,
                            (char_u *)&p_pi, PV_PI,
                            {(char_u *)FALSE, (char_u *)0L} SCRIPTID_INIT},
@@ -2119,6 +2129,16 @@ static struct vimoption
                            (char_u *)NULL, PV_NONE,
 #endif
                            {(char_u *)0L, (char_u *)0L} SCRIPTID_INIT},
+#if defined(DYNAMIC_PYTHON3) && !defined(WIN3264)
+    {"python3dll",  NULL,   P_STRING|P_VI_DEF|P_SECURE,
+                           (char_u *)&p_py3dll, PV_NONE,
+                           {(char_u *)"", (char_u *)0L} SCRIPTID_INIT},
+#endif
+#if defined(DYNAMIC_PYTHON) && !defined(WIN3264)
+    {"pythondll",   NULL,   P_STRING|P_VI_DEF|P_SECURE,
+                           (char_u *)&p_pydll, PV_NONE,
+                           {(char_u *)"", (char_u *)0L} SCRIPTID_INIT},
+#endif
     {"quoteescape", "qe",   P_STRING|P_ALLOCED|P_VI_DEF,
 #ifdef FEAT_TEXTOBJ
                            (char_u *)&p_qe, PV_QE,
@@ -2192,6 +2212,11 @@ static struct vimoption
                            {(char_u *)NULL, (char_u *)0L}
 #endif
                            SCRIPTID_INIT},
+#if defined(DYNAMIC_RUBY) && !defined(WIN3264)
+    {"rubydll",     NULL,   P_STRING|P_VI_DEF|P_SECURE,
+                           (char_u *)&p_rubydll, PV_NONE,
+                           {(char_u *)"", (char_u *)0L} SCRIPTID_INIT},
+#endif
     {"ruler",      "ru",   P_BOOL|P_VI_DEF|P_VIM|P_RSTAT,
 #ifdef FEAT_CMDL_INFO
                            (char_u *)&p_ru, PV_NONE,
index 5e655bba1cd91f18abdc7df70eb7e44be1c4390c..739fd67bbee75e6f3f9f4948d9ead8aeb268cbef 100644 (file)
@@ -626,6 +626,9 @@ EXTERN char_u       *p_lcs;         /* 'listchars' */
 
 EXTERN int     p_lz;           /* 'lazyredraw' */
 EXTERN int     p_lpl;          /* 'loadplugins' */
+#if defined(DYNAMIC_LUA) && !defined(WIN3264)
+EXTERN char_u  *p_luadll;      /* 'luadll' */
+#endif
 #ifdef FEAT_GUI_MAC
 EXTERN int     p_macatsui;     /* 'macatsui' */
 #endif
@@ -682,6 +685,15 @@ EXTERN char_u      *p_path;        /* 'path' */
 #ifdef FEAT_SEARCHPATH
 EXTERN char_u  *p_cdpath;      /* 'cdpath' */
 #endif
+#if defined(DYNAMIC_PERL) && !defined(WIN3264)
+EXTERN char_u  *p_perldll;     /* 'perldll' */
+#endif
+#if defined(DYNAMIC_PYTHON3) && !defined(WIN3264)
+EXTERN char_u  *p_py3dll;      /* 'python3dll' */
+#endif
+#if defined(DYNAMIC_PYTHON) && !defined(WIN3264)
+EXTERN char_u  *p_pydll;       /* 'pythondll' */
+#endif
 #ifdef FEAT_RELTIME
 EXTERN long    p_rdt;          /* 'redrawtime' */
 #endif
@@ -701,6 +713,9 @@ EXTERN int  p_rs;           /* 'restorescreen' */
 EXTERN int     p_ari;          /* 'allowrevins' */
 EXTERN int     p_ri;           /* 'revins' */
 #endif
+#if defined(DYNAMIC_RUBY) && !defined(WIN3264)
+EXTERN char_u  *p_rubydll;     /* 'rubydll' */
+#endif
 #ifdef FEAT_CMDL_INFO
 EXTERN int     p_ru;           /* 'ruler' */
 #endif
index 8e20841df71662dc036b11073b670ed3876fc396..9f5510975c06e9a9cdc45aff6ef9ab646a26a340 100644 (file)
@@ -741,6 +741,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    907,
 /**/
     906,
 /**/