[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: lua_pushliteral
- From: "Duncan Cross" <duncan.cross@...>
- Date: Wed, 14 Nov 2007 17:29:05 +0000
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.