Patch for if_lua: include all Lua core libs

6 views
Skip to first unread message

Luis Carvalho

unread,
Jul 28, 2010, 11:31:38 AM7/28/10
to vim...@vim.org
Hi,

The Lua interface does not include all Lua core libs: it excludes the "io"
library and offers a restricted "os" library. However, since vim itself offers
system calls, this seems like an over-prudent constraint. In addition, there
has been recent interest in having all libs to the interface, especially "io".

The attached simple patch loads all Lua core libs for the interface.

Cheers,
Luis

--
Computers are useless. They can only give you answers.
-- Pablo Picasso

--
Luis Carvalho (Kozure)
lua -e 'print((("lexca...@NO.gmail.SPAM.com"):gsub("(%u+%.)","")))'

if-lua-corelibs.diff

Bram Moolenaar

unread,
Jul 28, 2010, 4:57:06 PM7/28/10
to Luis Carvalho, vim...@vim.org

Luis Carvalho wrote:

> The Lua interface does not include all Lua core libs: it excludes the "io"
> library and offers a restricted "os" library. However, since vim itself offers
> system calls, this seems like an over-prudent constraint. In addition, there
> has been recent interest in having all libs to the interface, especially "io".
>
> The attached simple patch loads all Lua core libs for the interface.

I like patches that make the code simpler :-).

--
ARTHUR: Old woman!
DENNIS: Man!
ARTHUR: Man. I'm sorry. Old man, What knight live in that castle over there?
DENNIS: I'm thirty-seven.
"Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES LTD

/// Bram Moolenaar -- Br...@Moolenaar.net -- http://www.Moolenaar.net \\\
/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\ download, build and distribute -- http://www.A-A-P.org ///
\\\ help me help AIDS victims -- http://ICCF-Holland.org ///

Reply all
Reply to author
Forward
0 new messages