[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: lua_pushliteral
- From: Luiz Henrique de Figueiredo <lhf@...>
- Date: Wed, 14 Nov 2007 15:29:17 -0200
> 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.
Indeed, it's not there. Sorry.
> When & why should this be used instead of the normal lua_pushstring?
Use lua_pushliteral when you have a literal string instead of a string pointer.
lua_pushliteral is slightly faster than lua_pushstring because it avoids
a call to strlen; it also allows strings with embedded zeros.
--lhf