lua-users home
lua-l archive

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

Carsten Fuchs wrote:
lua_tostring() from my code.

However, I'm wondering why lua_tostring() behaves in this (somewhat
surprising) manner? This makes it different from all the other lua_to*()
functions, and I wonder why this is so??

I guess that the conversion to a string means that the string has to be
allocated and stored somewhere. Numbers and booleans presumably
do not have the allocation issue.