[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: Is there an #include equivalent in Lua (I do not mean require)
- From: Luiz Henrique de Figueiredo <lhf@...>
- Date: Fri, 19 Sep 2014 01:46:22 -0300
> I don't fully understand how the load() function works in srlua.c,
> namely how it is able to locate the end of the executable data and
> the beginning of the Lua code, because I am not familiar with the
> structure of Unix executables.
glue just appends a Lua script to a Lua interpreter and then adds a
few data bytes at the end containing the size of the Lua script.
srlua then seeks to its end, reads the data bytes, seeks to the beginning
of the script, and loads it from there.