Ejemplo n.º 1
0
 static int writeVarint16(IntPtr L)
 {
     try
     {
         ToLua.CheckArgsCount(L, 2);
         NetCore.VarintStream obj = (NetCore.VarintStream)ToLua.CheckObject(L, 1, typeof(NetCore.VarintStream));
         short arg0 = (short)LuaDLL.luaL_checknumber(L, 2);
         obj.writeVarint16(arg0);
         return(0);
     }
     catch (Exception e)
     {
         return(LuaDLL.toluaL_exception(L, e));
     }
 }
Ejemplo n.º 2
0
 static int readVarint16(IntPtr L)
 {
     try
     {
         ToLua.CheckArgsCount(L, 1);
         NetCore.VarintStream obj = (NetCore.VarintStream)ToLua.CheckObject(L, 1, typeof(NetCore.VarintStream));
         short o = obj.readVarint16();
         LuaDLL.lua_pushnumber(L, o);
         return(1);
     }
     catch (Exception e)
     {
         return(LuaDLL.toluaL_exception(L, e));
     }
 }
Ejemplo n.º 3
0
 static int writeVarintString(IntPtr L)
 {
     try
     {
         ToLua.CheckArgsCount(L, 2);
         NetCore.VarintStream obj = (NetCore.VarintStream)ToLua.CheckObject(L, 1, typeof(NetCore.VarintStream));
         string arg0 = ToLua.CheckString(L, 2);
         obj.writeVarintString(arg0);
         return(0);
     }
     catch (Exception e)
     {
         return(LuaDLL.toluaL_exception(L, e));
     }
 }
Ejemplo n.º 4
0
    static int _CreateNetCore_VarintStream(IntPtr L)
    {
        try
        {
            int count = LuaDLL.lua_gettop(L);

            if (count == 0)
            {
                NetCore.VarintStream obj = new NetCore.VarintStream();
                ToLua.PushObject(L, obj);
                return(1);
            }
            else
            {
                return(LuaDLL.luaL_throw(L, "invalid arguments to ctor method: NetCore.VarintStream.New"));
            }
        }
        catch (Exception e)
        {
            return(LuaDLL.toluaL_exception(L, e));
        }
    }