lua-users home
lua-l archive

Modifying field of local table via c-Api

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


 Here is my approach for modifying local table1.entry1:
lua_getlocal(ls, &debug_info, targetIndex);
lua_getfield(ls, -1, "entry1");
lua_pushstring(ls, "newVal");
lua_setfield(ls, -2, "entry1"); // CRASH
It doesn't work. Any objections?
Cheers, Jörg

AltStyle によって変換されたページ (->オリジナル) /