/// <summary> /// [-0, +1, e] const char *lua_pushstring (lua_State *L, const char *s); /// /// Pushes the zero-terminated string pointed to by s onto the stack. /// Lua makes (or reuses) an internal copy of the given string, /// so the memory at s can be freed or reused immediately after the function returns. /// </summary> /// <param name="L"></param> /// <param name="s">If s is NULL, pushes nil and returns NULL.</param> /// <returns>a pointer to the internal copy of the string.</returns> public CharPtr pushstring(_.LuaState L, string s) { return(bind <Func <_.LuaState, string, IntPtr> >("pushstring")(L, s)); }
/// <summary> /// [-1, +1, -] void lua_rawget (lua_State *L, int index); /// /// Similar to lua_gettable, but does a raw access (i.e., without metamethods). /// </summary> /// <param name="L"></param> /// <param name="index"></param> /// <returns></returns> public int rawget(_.LuaState L, int index) { return(bind <Func <LuaState, int, int> >("rawget")(L, index)); }
/// <summary> /// [-0, +1, e] void lua_getglobal (lua_State *L, const char *name); /// /// Pushes onto the stack the value of the global name. /// </summary> /// <param name="L"></param> /// <param name="name"></param> /// <returns>Returns the type of that value.</returns> public int getglobal(_.LuaState L, string name) { return(bind <Func <LuaState, string, int> >("getglobal")(L, name)); }
/// <summary> /// [-0, +1, e] int lua_getfield (lua_State *L, int index, const char *k); /// /// Pushes onto the stack the value t[k], where t is the value at the given index. /// As in Lua, this function may trigger a metamethod for the "index" event. /// </summary> /// <param name="L"></param> /// <param name="index"></param> /// <param name="k"></param> public int getfield(_.LuaState L, int index, string k) { return(bind <Func <LuaState, int, string, int> >("getfield")(L, index, k)); }
/// <summary> /// [-1, +1, e] int lua_gettable (lua_State *L, int index); /// /// Pushes onto the stack the value t[k], where t is the value at the given index /// and k is the value at the top of the stack. /// /// This function pops the key from the stack, pushing the resulting value in its place. /// As in Lua, this function may trigger a metamethod for the "index" event. /// </summary> /// <param name="L"></param> /// <param name="index"></param> /// <returns>the type of the pushed value.</returns> public int gettable(_.LuaState L, int index) { return(bind <Func <LuaState, int, int> >("rawgeti")(L, index)); }