Let's say we have a table that was passed to a function and it's now on top of the stack like so:
// -1 = table
Is it possible to get the metatable from that table on stack? I can simply get it with a known-name identifier like so:
luaL_getmetatable(L, "Foo");
But I want to re-use the function and get the metatable from the table that's in the stack.
There is probably an easy way to do this, but I can't seem to find a function for this.