lua-users home
lua-l archive

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

lua_tostring changes the value at the index specified (to a string).  This
should be made more clear in the documentation.

Both the fact that the function appears in section 5.4 labelled
"Querying the Stack" and the fact that the function appears in a
paragraph that starts "To translate a value in the stack to a
specific C type" give me (wrongly as it happens) the impression
that lua_tostring doesn't modify the value on the stack.

As an aside, I don't think there should be one function that does both

1) give me a C string corresponding to a lua value
2) convert a lua value into a lua string.

lua_tonumber also has similar behaviour.