public static extern void lua_setfield( IntPtr luaState, int index, [MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof(UTF8Marshaler))] string key);
public static void PushDictionary(this IntPtr L, Dictionary <string, double> dict) { Lua.lua_newtable(L); foreach (var pair in dict) { Push(L, pair.Value); Lua.lua_setfield(L, -2, pair.Key); } }