Thanks for the heads up Andrew. I managed to get it to work using `lua_keyin`.
As a side note, I will point out that if this is the direction the Lua team is taking, it might be prudent to reduce the amount of function calls and repeat-work that comes from searching for a key + getting its value. A function such as
int lua_keyvalue(lua_State* int index);
would be great
(though the name needs to be properly bikeshed). The desire to push the value of the key if the key is present and return non-zero: otherwise, return 0 and push nothing. This would prevent having to perform a double lookup from doing lua_keyin + lua_geti/lua_getfield/lua_gettable. This does not mean `lua_keyin` should not exist; having both would be critical to making sure the minimal amount of overhead is performed for the desired operation (checking if something exists versus knowing you are going to operate on it if it does exist).
Just musings, but... I hope they get in, and I hope that `lua_keyin` as well as the potential hypothetical `lua_keyvalue` include versions that get integers and fields for number / string arguments directly (as well as their raw version), making for a full suite that allows maximum performance and mimics the current Lua C API structure:
lua_keyin(L, index); lua_keyin_i(L, index, integer); lua_keyin_field(L, index, "string");
lua_keyvalue(L, index); lua_keyvalue_i(L, index, integer); lua_keyvalue_field(L, index, "string");