[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: lua_pushliteral
- From: Matt Campbell <mattcampbell@...>
- Date: Wed, 14 Nov 2007 11:31:21 -0600
lua_pushliteral is a macro defined in the lua.h file. Use it when you
want to push a string literal, that is, a string whose value is
specified directly in the macro call. The advantage of lua_pushliteral
is that it uses the sizeof operator to determine the length of the
string literal; this computation can be performed at compile time, thus
eliminating a call to strlen or equivalent. So lua_pushliteral is more
efficient for pushing string literals than lua_pushstring.
Matt