[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: lua_setfield vs lua_rawset
- From: Chris Marrin <chris@...>
- Date: Tue, 18 Oct 2005 12:20:08 -0700
lua_setfield() is a nice optimization if you have a value on TOS and a
table somewhere in the stack. It avoids having to push the property
name, then insert that property under the value before calling
lua_settable(). This case occurs for me a lot. I also use the
lua_rawset() version a lot. But there is not an equivalent
lua_rawsetfield(). Is there something I have overlooked, or is this just
an oversight? The same is true for lua_getfield().
--
chris marrin ,""$,
chris@marrin.com b` $ ,,.
mP b' , 1$'
,.` ,b` ,` :$$'
,|` mP ,` ,mm
,b" b" ,` ,mm m$$ ,m ,`P$$
m$` ,b` .` ,mm ,'|$P ,|"1$` ,b$P ,` :$1
b$` ,$: :,`` |$$ ,` $$` ,|` ,$$,,`"$$ .` :$|
b$| _m$`,:` :$1 ,` ,$Pm|` ` :$$,..;"' |$:
P$b, _;b$$b$1" |$$ ,` ,$$" ``' $$
```"```'" `"` `""` ""` ,P`
"As a general rule,don't solve puzzles that open portals to Hell"'