[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: error codes for lua_load?
- From: "Brett Bibby" <research@...>
- Date: Sat, 7 Feb 2004 13:12:03 +0800
Debugging some lua today...
1. According to the manual section 3.10 lua_load return 0, LUA_ERRSYNTAX or LUA_ERRMEM. Due to an error in my chunk loader where I wasn't reading enough bytes, I got error code 1 which is not one of these three. Is this a bug? Does lua_load potetnially return all the lua_pcall codes or is it really a subset?
2. The manual also states that it pushes the chunk as a function onto the stack. Does this mean I always need to do a lua_call to get the chunk processed? In other words, if I load a pre-compiled function chunk do I need to call the chunk to get the function into the vm or is all code loaded into the vm during lua_load?
Thanks,
Brett