lua-users home
lua-l archive

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


Wesley Smith wrote:
purpose.  I naively added lpeg.c to my project and added
luaopen_lpeg(L); in the appropriate place in main() of lua.c but get
the following error:

PANIC: unprotected error in call to Lua API (no calling environment)

As the Lua manual says, luaopen_xxx function aren't supposed to be called directly. See file linit.c from the Lua sources (or modify it according to your needs and include into your project).

--
Shmuel