[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: No filenames in traceback, only 'string ["..."]'
- From: Devon Strawn <strawn@...>
- Date: Mon, 3 Jan 2011 14:46:19 -0800
> 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?