public static int luaZ_fill(ZIO z) { uint size; LuaState L = z.L; CharPtr buff; if (z.eoz != 0) { return(EOZ); } LuaUnlock(L); buff = z.reader(L, z.data, out size); LuaLock(L); if (buff == null || size == 0) { z.eoz = 1; /* avoid calling reader function next time */ return(EOZ); } z.n = size - 1; z.p = new CharPtr(buff); int result = char2int(z.p[0]); z.p.inc(); return(result); }
public static int luaZ_fill (ZIO z) { uint size; LuaState L = z.L; CharPtr buff; lua_unlock(L); buff = z.reader(L, z.data, out size); lua_lock(L); if (buff == null || size == 0) return EOZ; z.n = size - 1; z.p = new CharPtr(buff); int result = char2int(z.p[0]); z.p.inc(); return result; }
public static int luaZ_fill(ZIO z) { uint size; lua_State L = z.L; CharPtr buff; lua_unlock(L); buff = z.reader(L, z.data, out size); lua_lock(L); if (buff == null || size == 0) { return(EOZ); } z.n = size - 1; /* discount char being returned */ z.p = new CharPtr(buff); int result = (int)(z.p[0]); z.p.inc(); return(result); //FIXME:changed, (byte)->(int) }
public static int luaZ_fill(ZIO z) { uint size; lua_State L = z.L; CharPtr buff; lua_unlock(L); buff = z.reader(L, z.data, out size); lua_lock(L); if (buff == null || size == 0) { return(EOZ); } z.n = size - 1; z.p = new CharPtr(buff); int result = char2int(z.p[0]); z.p.inc(); return(result); }
public static int luaZ_fill (ZIO z) { uint size; LuaState L = z.L; CharPtr buff; if (z.eoz != 0) return EOZ; LuaUnlock(L); buff = z.reader(L, z.data, out size); LuaLock(L); if (buff == null || size == 0) { z.eoz = 1; /* avoid calling reader function next time */ return EOZ; } z.n = size - 1; z.p = new CharPtr(buff); int result = char2int(z.p[0]); z.p.inc(); return result; }