lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


On Wed, 1 Mar 2006 02:04:35 +1100 "D Burgess" <dburgess@gmail.com>
wrote:
> How about you try the same in Lua?
> 
> Rather than require use
> 
> > x = loadfile"mytest"
> > =x
> > =#x
> > =gcinfo()
> > x()
> 
> DB

Thanks for the answer ... but I don't quite understand your solution ...
I'm just testing how to include compiled (with luac) lua files into my
C extension ... And it does not work.
I tested a bit more ... for very simple lua chunks (return 'ok' for
example) it works great ... but when I test print('ok') there is always
a problem.

This is strange because I have different messages :

lua: not enough memory
stack traceback:
        [C]: ?
        [C]: in function 'require'
        stdin:1: in main chunk
        [C]: ?

memory allocation error: block too big
stack traceback:
        [C]: ?
        [C]: in function 'require'
        stdin:1: in main chunk
        [C]: ?
stack traceback:
        [C]: ?
        [C]: in function 'require'
        stdin:1: in main chunk
        [C]: ?


Thanks.

-- 
Mildred       <xmpp:mildred@jabber.fr> <http://mildred632.free.fr/>
Clef GPG :    <hkp://pgp.mit.edu> ou <http://mildred632.free.fr/gpg_key>
Fingerprint : 197C A7E6 645B 4299 6D37 684B 6F9D A8D6 [9A7D 2E2B]