Everybody knows it is good programming practice to keep the stack balanced. What I\'m wondering, though, is whether I\'m allowed to modify stack values in a C function called fr
The stack values are the property of the C function being called. You can do whatever you wish with them. The only effect to the outside is the values returned by the function.
C functions called from Lua do not need to keep the stack balanced, that is, with the same contents or number of items it had on entry.