projects
/
profile
/
ivi
/
murphy.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
a201de6
)
lua-object: always init variable length when iterating object fields.
author
Ismo Puustinen
<ismo.puustinen@intel.com>
Mon, 22 Sep 2014 09:58:41 +0000
(12:58 +0300)
committer
Ismo Puustinen
<ismo.puustinen@intel.com>
Mon, 22 Sep 2014 10:37:06 +0000
(13:37 +0300)
src/core/lua-utils/object.h
patch
|
blob
|
history
diff --git
a/src/core/lua-utils/object.h
b/src/core/lua-utils/object.h
index
f4a8e50
..
5638b3a
100644
(file)
--- a/
src/core/lua-utils/object.h
+++ b/
src/core/lua-utils/object.h
@@
-130,13
+130,13
@@
+
#define MRP_LUA_FOREACH_FIELD(_L, _i, _n, _l) \
for (lua_pushnil(_L); \
\
-
lua_next(_L, _i) &&
\
+
!(_l = 0) && lua_next(_L, _i) &&
\
(_n = (lua_type(_L, -2) == LUA_TSTRING) ? \
- lua_tolstring(_L, -2, &_l) : "" ) && \
- ((lua_type(_L, -2) == LUA_TSTRING) || !( _l = 0)); \
+ lua_tolstring(_L, -2, &_l) : "" ); \
\
lua_pop(_L, 1))