}
case LUA_TTABLE:{
/* [array, table<s,t>, table<s,s>] */
- int size = lua_objlen(L, -1);
+ int size = lua_rawlen(L, -1);
lua_pushnumber(L, size + 1); /* [#, array, table<s,t>, table<s,s>] */
lua_pushstring(L, value); /* [string, #, array, table<s,t>, table<s,s>] */
lua_settable(L, -3); /* [array, table<s,t>, table<s,s>] */
}
case LUA_TTABLE:{
/* [array, table<s,t>, table<s,s>] */
- int size = lua_objlen(L, -1);
+ int size = lua_rawlen(L, -1);
lua_pushnumber(L, size + 1); /* [#, array, table<s,t>, table<s,s>] */
lua_pushlstring(L, value, len); /* [string, #, array, table<s,t>, table<s,s>] */
lua_settable(L, -3); /* [array, table<s,t>, table<s,s>] */
/* Load mode for lua_load() */
#define lua_load(a,b,c,d) lua_load(a,b,c,d,NULL)
#define lua_resume(a,b) lua_resume(a, NULL, b)
+#else
+#define lua_rawlen(L,i) lua_objlen(L, (i))
#endif
/* Create a set of AP_LUA_DECLARE(type), AP_LUA_DECLARE_NONSTD(type) and