Skip to content

Commit d94464e

Browse files
committed
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)
1 parent 8a52ba7 commit d94464e

13 files changed

Lines changed: 184 additions & 20 deletions

File tree

runtime/doc/if_lua.txt

Lines changed: 21 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
*if_lua.txt* For Vim version 7.4. Last change: 2013 Sep 04
1+
*if_lua.txt* For Vim version 7.4. Last change: 2015 Oct 16
22

33

44
VIM REFERENCE MANUAL by Luis Carvalho
@@ -14,6 +14,7 @@ The Lua Interface to Vim *lua* *Lua*
1414
6. Buffer userdata |lua-buffer|
1515
7. Window userdata |lua-window|
1616
8. The luaeval function |lua-luaeval|
17+
9. Dynamic loading |lua-dynamic|
1718

1819
{Vi does not have any of these commands}
1920

@@ -399,5 +400,24 @@ Examples: >
399400
:echo Rand(1,10)
400401
401402
403+
==============================================================================
404+
9. Dynamic loading *lua-dynamic*
405+
406+
On MS-Windows and Unix the Lua library can be loaded dynamically. The
407+
|:version| output then includes |+lua/dyn|.
408+
409+
This means that Vim will search for the Lua DLL or shared library file only
410+
when needed. When you don't use the Lua interface you don't need it, thus
411+
you can use Vim without this file.
412+
413+
On MS-Windows to use the Lua interface the Lua DLL must be in your search path.
414+
In a console window type "path" to see what directories are used. The version
415+
of the DLL must match the Lua version Vim was compiled with.
416+
417+
On Unix the 'luadll' option can be used to specify the Lua shared library file
418+
instead of DYNAMIC_LUA_DLL file what was specified at compile time. The
419+
version of the shared library must match the Lua version Vim was compiled with.
420+
421+
402422
==============================================================================
403423
vim:tw=78:ts=8:noet:ft=help:norl:

runtime/doc/if_perl.txt

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
*if_perl.txt* For Vim version 7.4. Last change: 2013 Oct 05
1+
*if_perl.txt* For Vim version 7.4. Last change: 2015 Oct 16
22

33

44
VIM REFERENCE MANUAL by Sven Verdoolaege
@@ -290,5 +290,13 @@ The name of the DLL must match the Perl version Vim was compiled with.
290290
Currently the name is "perl512.dll". That is for Perl 5.12. To know for
291291
sure edit "gvim.exe" and search for "perl\d*.dll\c".
292292

293+
294+
Unix ~
295+
296+
The 'perldll' option can be used to specify the Perl shared library file
297+
instead of DYNAMIC_PERL_DLL file what was specified at compile time. The
298+
version of the shared library must match the Perl version Vim was compiled
299+
with.
300+
293301
==============================================================================
294302
vim:tw=78:ts=8:ft=help:norl:

runtime/doc/if_pyth.txt

Lines changed: 14 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
*if_pyth.txt* For Vim version 7.4. Last change: 2014 Jul 23
1+
*if_pyth.txt* For Vim version 7.4. Last change: 2015 Oct 16
22

33

44
VIM REFERENCE MANUAL by Paul Moore
@@ -679,20 +679,26 @@ functions to evaluate Python expressions and pass their values to VimL.
679679
==============================================================================
680680
9. Dynamic loading *python-dynamic*
681681

682-
On MS-Windows the Python library can be loaded dynamically. The |:version|
683-
output then includes |+python/dyn|.
682+
On MS-Windows and Unix the Python library can be loaded dynamically. The
683+
|:version| output then includes |+python/dyn| or |+python3/dyn|.
684684

685-
This means that Vim will search for the Python DLL file only when needed.
686-
When you don't use the Python interface you don't need it, thus you can use
687-
Vim without this DLL file.
685+
This means that Vim will search for the Python DLL or shared library file only
686+
when needed. When you don't use the Python interface you don't need it, thus
687+
you can use Vim without this file.
688688

689-
To use the Python interface the Python DLL must be in your search path. In a
690-
console window type "path" to see what directories are used.
689+
On MS-Windows to use the Python interface the Python DLL must be in your search
690+
path. In a console window type "path" to see what directories are used.
691691

692692
The name of the DLL must match the Python version Vim was compiled with.
693693
Currently the name is "python24.dll". That is for Python 2.4. To know for
694694
sure edit "gvim.exe" and search for "python\d*.dll\c".
695695

696+
On Unix the 'pythondll' or 'python3dll' option can be used to specify the
697+
Python shared library file instead of DYNAMIC_PYTHON_DLL or
698+
DYNAMIC_PYTHON3_DLL file what were specified at compile time. The version of
699+
the shared library must match the Python 2.x or Python 3 version Vim was
700+
compiled with.
701+
696702
==============================================================================
697703
10. Python 3 *python3*
698704

runtime/doc/if_ruby.txt

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
*if_ruby.txt* For Vim version 7.4. Last change: 2015 Feb 22
1+
*if_ruby.txt* For Vim version 7.4. Last change: 2015 Oct 16
22

33

44
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
199199
when needed. When you don't use the Ruby interface you don't need it, thus
200200
you can use Vim even though this library file is not on your system.
201201

202+
MS-Windows ~
203+
202204
You need to install the right version of Ruby for this to work. You can find
203205
the package to download from:
204206
http://www.garbagecollect.jp/ruby/mswin32/en/download/release.html
@@ -216,5 +218,12 @@ and comment-out the check for _MSC_VER.
216218
You may also need to rename the include directory name to match the version,
217219
strangely for Ruby 1.9.3 the directory is called 1.9.1.
218220

221+
Unix ~
222+
223+
The 'rubydll' option can be used to specify the Ruby shared library file
224+
instead of DYNAMIC_RUBY_DLL file what was specified at compile time. The
225+
version of the shared library must match the Ruby version Vim was compiled
226+
with.
227+
219228
==============================================================================
220229
vim:tw=78:ts=8:ft=help:norl:

runtime/doc/options.txt

Lines changed: 58 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
*options.txt* For Vim version 7.4. Last change: 2015 Sep 15
1+
*options.txt* For Vim version 7.4. Last change: 2015 Nov 01
22

33

44
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|.
12481248
break if 'linebreak' is on. Only works for ASCII and also for 8-bit
12491249
characters when 'encoding' is an 8-bit encoding.
12501250

1251-
*'breakindent'* *'bri'*
1251+
*'breakindent'* *'bri'* *'nobreakindent'* *'nobri'*
12521252
'breakindent' 'bri' boolean (default off)
12531253
local to window
12541254
{not in Vi}
@@ -3412,7 +3412,7 @@ A jump table for the options with a short description can be found at |Q_op|.
34123412
modeline, see |sandbox-option|. That stops the option from working,
34133413
since changing the buffer text is not allowed.
34143414

3415-
*'fsync'* *'fs'*
3415+
*'fsync'* *'fs'* *'nofsync'* *'nofs'*
34163416
'fsync' 'fs' boolean (default on)
34173417
global
34183418
{not in Vi}
@@ -4666,7 +4666,7 @@ A jump table for the options with a short description can be found at |Q_op|.
46664666
:source $VIMRUNTIME/menu.vim
46674667
< Warning: This deletes all menus that you defined yourself!
46684668

4669-
*'langnoremap'* *'lnr'*
4669+
*'langnoremap'* *'lnr'* *'nolangnoremap'* *'nolnr'*
46704670
'langnoremap' 'lnr' boolean (default off)
46714671
global
46724672
{not in Vi}
@@ -4847,6 +4847,17 @@ A jump table for the options with a short description can be found at |Q_op|.
48474847
Note that using the "-u NONE" and "--noplugin" command line arguments
48484848
reset this option. |-u| |--noplugin|
48494849

4850+
*'luadll'*
4851+
'luadll' string (default empty)
4852+
global
4853+
{not in Vi} {only for Unix}
4854+
{only available when compiled with the |+lua/dyn|
4855+
feature}
4856+
Specifies the path of the Lua shared library instead of DYNAMIC_LUA_DLL
4857+
what was specified at compile time.
4858+
This option cannot be set from a |modeline| or in the |sandbox|, for
4859+
security reasons.
4860+
48504861
*'macatsui'* *'nomacatsui'*
48514862
'macatsui' boolean (default on)
48524863
global
@@ -5550,6 +5561,17 @@ A jump table for the options with a short description can be found at |Q_op|.
55505561
< Replace the ';' with a ':' or whatever separator is used. Note that
55515562
this doesn't work when $INCL contains a comma or white space.
55525563

5564+
*'perldll'*
5565+
'perldll' string (default empty)
5566+
global
5567+
{not in Vi} {only for Unix}
5568+
{only available when compiled with the |+perl/dyn|
5569+
feature}
5570+
Specifies the path of the Perl shared library instead of
5571+
DYNAMIC_PERL_DLL what was specified at compile time.
5572+
This option cannot be set from a |modeline| or in the |sandbox|, for
5573+
security reasons.
5574+
55535575
*'preserveindent'* *'pi'* *'nopreserveindent'* *'nopi'*
55545576
'preserveindent' 'pi' boolean (default off)
55555577
local to buffer
@@ -5676,6 +5698,27 @@ A jump table for the options with a short description can be found at |Q_op|.
56765698
Insert mode completion. When zero as much space as available is used.
56775699
|ins-completion-menu|.
56785700

5701+
*'python3dll'*
5702+
'python3dll' string (default empty)
5703+
global
5704+
{not in Vi} {only for Unix}
5705+
{only available when compiled with the |+python3/dyn|
5706+
feature}
5707+
Specifies the path of the Python 3 shared library instead of
5708+
DYNAMIC_PYTHON3_DLL what was specified at compile time.
5709+
This option cannot be set from a |modeline| or in the |sandbox|, for
5710+
security reasons.
5711+
5712+
*'pythondll'*
5713+
'pythondll' string (default empty)
5714+
global
5715+
{not in Vi} {only for Unix}
5716+
{only available when compiled with the |+python/dyn|
5717+
feature}
5718+
Specifies the path of the Python 2.x shared library instead of
5719+
DYNAMIC_PYTHON_DLL what was specified at compile time.
5720+
This option cannot be set from a |modeline| or in the |sandbox|, for
5721+
security reasons.
56795722

56805723
*'quoteescape'* *'qe'*
56815724
'quoteescape' 'qe' string (default "\")
@@ -5896,6 +5939,17 @@ A jump table for the options with a short description can be found at |Q_op|.
58965939
This is useful for languages such as Hebrew, Arabic and Farsi.
58975940
The 'rightleft' option must be set for 'rightleftcmd' to take effect.
58985941

5942+
*'rubydll'*
5943+
'rubydll' string (default empty)
5944+
global
5945+
{not in Vi} {only for Unix}
5946+
{only available when compiled with the |+ruby/dyn|
5947+
feature}
5948+
Specifies the path of the Ruby shared library instead of
5949+
DYNAMIC_RUBY_DLL what was specified at compile time.
5950+
This option cannot be set from a |modeline| or in the |sandbox|, for
5951+
security reasons.
5952+
58995953
*'ruler'* *'ru'* *'noruler'* *'noru'*
59005954
'ruler' 'ru' boolean (default off)
59015955
global

src/if_lua.c

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -402,7 +402,12 @@ lua_link_init(char *libname, int verbose)
402402
int
403403
lua_enabled(int verbose)
404404
{
405-
return lua_link_init(DYNAMIC_LUA_DLL, verbose) == OK;
405+
#ifdef WIN3264
406+
char *dll = DYNAMIC_LUA_DLL;
407+
#else
408+
char *dll = *p_luadll ? (char *)p_luadll : DYNAMIC_LUA_DLL;
409+
#endif
410+
return lua_link_init(dll, verbose) == OK;
406411
}
407412

408413
#endif /* DYNAMIC_LUA */

src/if_perl.xs

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -611,7 +611,12 @@ perl_runtime_link_init(char *libname, int verbose)
611611
perl_enabled(verbose)
612612
int verbose;
613613
{
614-
return perl_runtime_link_init(DYNAMIC_PERL_DLL, verbose) == OK;
614+
#if WIN3264
615+
char *dll = DYNAMIC_PERL_DLL;
616+
#else
617+
char *dll = *p_perldll ? (char *)p_perldll : DYNAMIC_PERL_DLL;
618+
#endif
619+
return perl_runtime_link_init(dll, verbose) == OK;
615620
}
616621
#endif /* DYNAMIC_PERL */
617622

src/if_python.c

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -732,7 +732,12 @@ python_runtime_link_init(char *libname, int verbose)
732732
int
733733
python_enabled(int verbose)
734734
{
735-
return python_runtime_link_init(DYNAMIC_PYTHON_DLL, verbose) == OK;
735+
#ifdef WIN3264
736+
char *dll = DYNAMIC_PYTHON_DLL;
737+
#else
738+
char *dll = *p_pydll ? (char *)p_pydll : DYNAMIC_PYTHON_DLL;
739+
#endif
740+
return python_runtime_link_init(dll, verbose) == OK;
736741
}
737742

738743
/*

src/if_python3.c

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -686,7 +686,12 @@ py3_runtime_link_init(char *libname, int verbose)
686686
int
687687
python3_enabled(int verbose)
688688
{
689-
return py3_runtime_link_init(DYNAMIC_PYTHON3_DLL, verbose) == OK;
689+
#ifdef WIN3264
690+
char *dll = DYNAMIC_PYTHON3_DLL;
691+
#else
692+
char *dll = *p_py3dll ? (char *)p_py3dll : DYNAMIC_PYTHON3_DLL;
693+
#endif
694+
return py3_runtime_link_init(dll, verbose) == OK;
690695
}
691696

692697
/* Load the standard Python exceptions - don't import the symbols from the

src/if_ruby.c

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -639,7 +639,12 @@ ruby_runtime_link_init(char *libname, int verbose)
639639
ruby_enabled(verbose)
640640
int verbose;
641641
{
642-
return ruby_runtime_link_init(DYNAMIC_RUBY_DLL, verbose) == OK;
642+
#ifdef WIN3264
643+
char *dll = DYNAMIC_RUBY_DLL;
644+
#else
645+
char *dll = *p_rubydll ? (char *)p_rubydll : DYNAMIC_RUBY_DLL;
646+
#endif
647+
return ruby_runtime_link_init(dll, verbose) == OK;
643648
}
644649
#endif /* defined(DYNAMIC_RUBY) || defined(PROTO) */
645650

0 commit comments

Comments
 (0)