Ejemplo n.º 1
0
 public static LuaProto LoadBinary(ILuaState lua,
                                   ILoadInfo loadinfo, string name)
 {
     try
     {
         var reader = new BinaryBytesReader(loadinfo);
         var undump = new Undump(reader);
         undump.LoadHeader();
         return(undump.LoadFunction());
     }
     catch (UndumpException e)
     {
         var Lua = (LuaState)lua;
         Lua.O_PushString(string.Format(
                              "{0}: {1} precompiled chunk", name, e.Why));
         Lua.D_Throw(ThreadStatus.LUA_ERRSYNTAX);
         return(null);
     }
 }
Ejemplo n.º 2
0
        public static LuaProto LoadBinary( ILuaState lua,
			ILoadInfo loadinfo, string name )
        {
            try
            {
                var reader = new BinaryBytesReader( loadinfo );
                var undump = new Undump( reader );
                undump.LoadHeader();
                return undump.LoadFunction();
            }
            catch( UndumpException e )
            {
                var Lua = (LuaState)lua;
                Lua.O_PushString( string.Format(
                    "{0}: {1} precompiled chunk", name, e.Why ) );
                Lua.D_Throw( ThreadStatus.LUA_ERRSYNTAX );
                return null;
            }
        }
Ejemplo n.º 3
0
 private Undump( BinaryBytesReader reader )
 {
     Reader 	= reader;
 }
Ejemplo n.º 4
0
 private Undump(BinaryBytesReader reader)
 {
     Reader = reader;
 }