BOLTStack.Lua.lua_setfield C# (CSharp) Method

lua_setfield() private method

private lua_setfield ( IntPtr luaState, int index, [ MarshalTypeRef = typeof(UTF8Marshaler))]stringkey ) : void
luaState System.IntPtr
index int
MarshalTypeRef [
return void
        public static extern void lua_setfield(
            IntPtr luaState,
            int index,
            [MarshalAs(UnmanagedType.CustomMarshaler,
                MarshalTypeRef = typeof(UTF8Marshaler))]
            string key);

Usage Example

Esempio n. 1
0
 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);
     }
 }
All Usage Examples Of BOLTStack.Lua::lua_setfield