lua-users home
lua-l archive

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

> If you load something with luaL_loadstring, then you're giving it a
> 'string ["...."]' name. Dumping and loading it again will preserve the
> name you first gave it.

Excellent.  Nailed it.  Solved by switching to luaL_loadbuffer() and
passing the filename explicitly (luaL_loadstring() just passed the
source code as the 'name').

Thanks, Peter - also came across your blog while searching for the
solution, good stuff.

So the compiled bytecode contains the "name" passed in at compile time?