lua-users home
lua-l archive

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


So I understand why this problem appeared in my code. I'm using ldump
directly from user code to dump the code, there is then no lua_lock before
entering the dump function.  This function is not declared in lua.h, I
needed the ldump.h to be able to call it.

Having a "public" function that does the lock should fix the problem? (I
know that this function is called using a pcall in luac, lua_lock beeing
then already call )

Julien

>> - I thinks the code in ldump is buggy.
>
> ldump.c does unlock before calling the user-supplied writer function.
> lundump.c does the same (in luaZ_fill). Every time you enter userland
> you need to unlock; it's like a Lua API function returning.
>