On Wed, Sep 03, 2008 at 09:03:21AM -0400, Luis Carvalho wrote:

Thanks for catching this. A new patch, that also provides a simple
configure.in, is available at

http://wiki.linuxfromscratch.org/blfs/attachment/wiki/vim/vim72-lua-0.2.patch.gz

I have a question. The standalone Lua interpreter is usually linked to a
static library, but the linker gets a -E option to export all symbols and so
dynamic modules get supported. Should I add a check for gcc and add -Wl,-E?
That would export all symbols in Vim, and so it doesn't sound like a good
idea... I could also link to a shared Lua library as default. What do you guys
think?

Cheers,
Luis.

Hi,

First of all thanks for the patch, I've also been toying around with Lua support in vim, but up to now it's only a sandbox for playing around with various things both on the Lua and the vim side.

Anyway, as for your question I'd say just default to using a shared lib.
Most other interfaces seem to do so, and I'd say the costs should be neglectable in this case. On Windows looking up the required symbols at runtime seems to be the most popular choice, though I personally don't care to much about it either way.

One last thing, I noticed that your patch seems to have problems with
nested compounds:

    function! s:foo()
        let l:things = [[1, "foo"], [2, "bar"], [3, "baz"]]
        " for extra evilness:
        " call add(l:things, l:things)
        lua vim.eval("l:things")
    endfunction
    call s:foo()

Saving this as test.vim and doing vim -c 'so test.vim' causes a segmentation fault. Same happens if I stick in a dictionary.
Flat lists seem to work flawlessly though.

Let me know if you can't reproduce this, then I'l do a debug-build tomorrow and get you a meaningful backtrace.

Best regards
Andy
--
BOFH Excuse #239:

CPU needs bearings repacked

Attachment: pgpF2cizfgjuO.pgp
Description: PGP signature

Raspunde prin e-mail lui