To: vim_dev@googlegroups.com Subject: Patch 7.4.907 Fcc: outbox From: Bram Moolenaar Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ------------ Patch 7.4.907 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) Files: 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 *** ../vim-7.4.906/runtime/doc/if_lua.txt 2013-08-10 13:24:55.000000000 +0200 --- runtime/doc/if_lua.txt 2015-11-02 15:10:05.518333171 +0100 *************** *** 14,19 **** --- 14,20 ---- 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} *************** *** 400,403 **** --- 401,423 ---- ============================================================================== + 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: *** ../vim-7.4.906/runtime/doc/if_perl.txt 2013-08-10 13:24:55.000000000 +0200 --- runtime/doc/if_perl.txt 2015-11-02 15:10:05.518333171 +0100 *************** *** 290,294 **** --- 290,302 ---- 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: *** ../vim-7.4.906/runtime/doc/if_pyth.txt 2013-08-10 13:24:55.000000000 +0200 --- runtime/doc/if_pyth.txt 2015-11-02 15:10:05.518333171 +0100 *************** *** 28,34 **** ============================================================================== 1. Commands *python-commands* ! *:python* *:py* *E205* *E263* *E264* :[range]py[thon] {stmt} Execute Python statement {stmt}. A simple check if the `:python` command is working: > --- 28,34 ---- ============================================================================== 1. Commands *python-commands* ! *:python* *:py* *E263* *E264* *E887* :[range]py[thon] {stmt} Execute Python statement {stmt}. A simple check if the `:python` command is working: > *************** *** 679,698 **** ============================================================================== 9. Dynamic loading *python-dynamic* ! On MS-Windows the Python library can be loaded dynamically. The |:version| ! output then includes |+python/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. ! 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". ============================================================================== 10. Python 3 *python3* --- 679,704 ---- ============================================================================== 9. Dynamic loading *python-dynamic* ! 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 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. ! 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* *** ../vim-7.4.906/runtime/doc/if_ruby.txt 2013-08-10 13:24:55.000000000 +0200 --- runtime/doc/if_ruby.txt 2015-11-02 15:10:05.518333171 +0100 *************** *** 195,200 **** --- 199,206 ---- 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 *************** *** 212,216 **** --- 218,229 ---- 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: *** ../vim-7.4.906/runtime/doc/options.txt 2015-09-01 20:31:16.311776122 +0200 --- runtime/doc/options.txt 2015-11-02 15:10:05.526333077 +0100 *************** *** 4831,4836 **** --- 4847,4863 ---- 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 *************** *** 5532,5537 **** --- 5561,5577 ---- < 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 *************** *** 5658,5663 **** --- 5698,5724 ---- 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 "\") *************** *** 5876,5881 **** --- 5939,5955 ---- 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 *** ../vim-7.4.906/src/if_lua.c 2015-07-21 17:53:11.577527989 +0200 --- src/if_lua.c 2015-11-02 15:10:05.526333077 +0100 *************** *** 402,408 **** int lua_enabled(int verbose) { ! return lua_link_init(DYNAMIC_LUA_DLL, verbose) == OK; } #endif /* DYNAMIC_LUA */ --- 402,413 ---- int lua_enabled(int verbose) { ! #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 */ *** ../vim-7.4.906/src/if_perl.xs 2015-06-25 16:13:37.779750062 +0200 --- src/if_perl.xs 2015-11-02 15:10:05.530333030 +0100 *************** *** 611,617 **** perl_enabled(verbose) int verbose; { ! return perl_runtime_link_init(DYNAMIC_PERL_DLL, verbose) == OK; } #endif /* DYNAMIC_PERL */ --- 611,622 ---- perl_enabled(verbose) int verbose; { ! #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 */ *** ../vim-7.4.906/src/if_python.c 2015-02-03 12:55:11.140179551 +0100 --- src/if_python.c 2015-11-02 15:10:05.530333030 +0100 *************** *** 732,738 **** int python_enabled(int verbose) { ! return python_runtime_link_init(DYNAMIC_PYTHON_DLL, verbose) == OK; } /* --- 732,743 ---- int python_enabled(int verbose) { ! #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; } /* *** ../vim-7.4.906/src/if_python3.c 2015-10-07 10:39:49.568914811 +0200 --- src/if_python3.c 2015-11-02 15:10:05.530333030 +0100 *************** *** 686,692 **** int python3_enabled(int verbose) { ! return py3_runtime_link_init(DYNAMIC_PYTHON3_DLL, verbose) == OK; } /* Load the standard Python exceptions - don't import the symbols from the --- 686,697 ---- int python3_enabled(int verbose) { ! #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 *** ../vim-7.4.906/src/if_ruby.c 2015-04-21 15:25:26.425488328 +0200 --- src/if_ruby.c 2015-11-02 15:10:05.530333030 +0100 *************** *** 639,645 **** ruby_enabled(verbose) int verbose; { ! return ruby_runtime_link_init(DYNAMIC_RUBY_DLL, verbose) == OK; } #endif /* defined(DYNAMIC_RUBY) || defined(PROTO) */ --- 639,650 ---- ruby_enabled(verbose) int verbose; { ! #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) */ *** ../vim-7.4.906/src/option.c 2015-09-15 17:30:35.909682046 +0200 --- src/option.c 2015-11-02 15:10:05.534332982 +0100 *************** *** 1779,1784 **** --- 1779,1789 ---- {"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,2019 **** --- 2019,2029 ---- # 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,2124 **** --- 2129,2144 ---- (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,2197 **** --- 2212,2222 ---- {(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, *** ../vim-7.4.906/src/option.h 2015-07-21 17:53:11.585527913 +0200 --- src/option.h 2015-11-02 15:10:05.534332982 +0100 *************** *** 626,631 **** --- 626,634 ---- 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,687 **** --- 685,699 ---- #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,706 **** --- 713,721 ---- 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 *** ../vim-7.4.906/src/version.c 2015-11-02 14:45:12.135936003 +0100 --- src/version.c 2015-11-02 15:21:12.886459329 +0100 *************** *** 743,744 **** --- 743,746 ---- { /* Add new patch number below this line */ + /**/ + 907, /**/ -- hundred-and-one symptoms of being an internet addict: 82. AT&T names you Customer of the Month for the third consecutive time. /// 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 ///