Пример #1
0
		public static int CheckOption(LuaStatePtr l, int narg, string def, string[] lst) {
			sbyte *[] lst_ = new sbyte*[lst.Length];
			for (int i = 0; i < lst.Length; ++i) {
				fixed(char * c = &lst[i].ToCharArray()[0]) {
					sbyte * b = (sbyte *)c;
					lst_[i] = b;
				}
			}
			return LuaLDelegates.luaL_checkoption(l, narg, def, lst_);
		}
Пример #2
0
		internal static extern IntPtr lua_touserdata(LuaStatePtr l, int idx);
Пример #3
0
		internal static extern int lua_rawlen(LuaStatePtr l, int idx);
Пример #4
0
		internal static extern int lua_toboolean(LuaStatePtr l, int idx);
Пример #5
0
//		public static bool ArgCheck(LuaStatePtr l, bool cond, int numarg, string extramsg) {
//			// WHAT DO I PUT HERE?
//		}

        public static string CheckString(LuaStatePtr l, int n)
        {
            return(new string(LuaLDelegates.luaL_checklstring(l, n, null)));
        }
Пример #6
0
		internal static extern void lua_pushlightuserdata(LuaStatePtr l, IntPtr p);
Пример #7
0
		internal static extern sbyte * lua_pushstring(LuaStatePtr l, [MarshalAs(UnmanagedType.LPStr)] string s);
Пример #8
0
		internal static extern void lua_pushnil(LuaStatePtr l);
Пример #9
0
 public static int Opt(LuaStatePtr l, Delegate f, int n, int d)
 {
     return(Lua.IsNoneOrNil(l, n) ? d : (int)f.DynamicInvoke(l, n));
 }
Пример #10
0
 public static void GetMetaTable(LuaStatePtr l, string n)
 {
     Lua.GetField(l, Lua.RegistryIndex, n);
 }
Пример #11
0
 public static void DoString(LuaStatePtr l, string s)
 {
     LuaL.LoadString(l, s);
     Lua.PCall(l, 0, Lua.MultRet, 0);
 }
Пример #12
0
 public static int LoadFile(LuaStatePtr l, string f)
 {
     return(LuaL.LoadFilex(l, f, null));
 }
Пример #13
0
 public static void DoFile(LuaStatePtr l, string fn)
 {
     LuaL.LoadFile(l, fn);
     Lua.PCall(l, 0, Lua.MultRet, 0);
 }
Пример #14
0
        // Skipped unneeded methods luaL_checkint etc.

        public static string TypeName(LuaStatePtr l, int i)
        {
            return(Lua.TypeName(l, Lua.Type(l, i)));
        }
Пример #15
0
 public static string OptString(LuaStatePtr l, int n, string d)
 {
     return(new string(LuaLDelegates.luaL_optlstring(l, n, d, null)));
 }
Пример #16
0
		internal static extern IntPtr lua_topointer(LuaStatePtr l, int idx);
Пример #17
0
		internal static extern int lua_rawequal(LuaStatePtr l, int idx1, int idx2);
Пример #18
0
 public static LuaBufferPtr LoadBuffer(LuaStatePtr l, string s, int sz, string n)
 {
     return(LuaL.LoadBufferx(l, s, sz, n, null));
 }
Пример #19
0
		internal static extern void lua_pushinteger(LuaStatePtr l, int n);
Пример #20
0
 internal extern static sbyte *luaL_gsub(LuaStatePtr l, [MarshalAs(UnmanagedType.LPStr)] string s, [MarshalAs(UnmanagedType.LPStr)] string p, [MarshalAs(UnmanagedType.LPStr)] string r);
Пример #21
0
		internal static extern void lua_close(LuaStatePtr l);
Пример #22
0
 internal extern static void luaL_setfuncs(LuaStatePtr l, IntPtr l_, int nup);
Пример #23
0
		internal static extern void lua_getglobal(LuaStatePtr l, [MarshalAs(UnmanagedType.LPStr)] string var);
Пример #24
0
 internal extern static int luaL_getsubtable(LuaStatePtr l, int idx, [MarshalAs(UnmanagedType.LPStr)] string fname);
Пример #25
0
		internal static extern uint lua_tounsignedx(LuaStatePtr l, int idx, int * isnum);
Пример #26
0
 internal extern static void luaL_traceback(LuaStatePtr l, LuaStatePtr l1, [MarshalAs(UnmanagedType.LPStr)] string msg, int level);
Пример #27
0
		internal static extern sbyte * lua_tolstring(LuaStatePtr l, int idx, int * len);
Пример #28
0
 internal extern static void luaL_requiref(LuaStatePtr l, [MarshalAs(UnmanagedType.LPStr)] string modname, LuaCFunction openf, int glb);
Пример #29
0
		internal static extern LuaCFunction lua_tocfunction(LuaStatePtr l, int idx);
Пример #30
0
 internal extern static void luaL_buffinit(LuaStatePtr l, LuaBufferPtr B);
Пример #31
0
		internal static extern LuaStatePtr lua_tothread(LuaStatePtr l, int idx);
Пример #32
0
 internal extern static int luaL_callmeta(LuaStatePtr l, int obj, [MarshalAs(UnmanagedType.LPStr)] string e);
Пример #33
0
		internal static extern void lua_arith(LuaStatePtr l, int op);
Пример #34
0
 internal extern static sbyte *luaL_buffinitsize(LuaStatePtr l, LuaBufferPtr B, int sz);
Пример #35
0
		internal static extern int lua_compare(LuaStatePtr l, int idx1, int idx2, int op);
Пример #36
0
		internal static extern int lua_iscfunction(LuaStatePtr l, int idx);
Пример #37
0
		internal static extern void lua_pushnumber(LuaStatePtr l, double n);
Пример #38
0
		internal static extern int lua_isuserdata(LuaStatePtr l, int idx);
Пример #39
0
		internal static extern void lua_pushunsigned(LuaStatePtr l, uint n);
Пример #40
0
		internal static extern int lua_type(LuaStatePtr l, int idx);
Пример #41
0
		internal static extern void lua_pushcclosure(LuaStatePtr l, LuaCFunction fn, int n);
Пример #42
0
		internal static extern string lua_typename(LuaStatePtr l, int tp);
Пример #43
0
		internal static extern void lua_pushboolean(LuaStatePtr l, int b);
Пример #44
0
		internal static extern double lua_tonumberx(LuaStatePtr l, int idx, int * isnum);
Пример #45
0
		internal static extern int lua_pushthread(LuaStatePtr l);
Пример #46
0
		internal static extern int lua_tointegerx(LuaStatePtr l, int idx, int * isnum);
Пример #47
0
		internal static extern void lua_gettable(LuaStatePtr l, int idx);
Пример #48
0
 public static void NewLibTable(LuaStatePtr l, string l_)
 {
     Lua.CreateTable(l, 0, l_.Length);
 }