lua-users home
lua-l archive

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


On Nov 14, 2007 5:22 PM, Peter Cawley <lua@corsix.org> wrote:
> I see instances of the aux library and standard libraries using
> lua_pushliteral to push strings onto a LUA stack, but cannot find any
> mention of the function in the manual. When & why should this be used
> instead of the normal lua_pushstring?

I think it uses the fact that the length of the string is known at
compile time to push the string (slightly) faster, since
lua_pushstring has to look for the terminating character to determine
the length.