this.instance = instance;
instance.load(new MetaLib(instance));
}
public LuaValue call(LuaValue env) {
LuaTable meta = new LuaTable(0,2);
meta.set("__call", new create(instance));
LuaTable table = new LuaTable(0,10);
table.setmetatable(meta);
table.set("size", new len());
table.set("set_size", new set_size());
new getint(table, 0, "get_int16");
new getint(table, 1, "get_int32");
new getint(table, 2, "get_int64");
new setint(table, 0, "set_int16");
new setint(table, 1, "set_int32");
new setint(table, 2, "set_int64");
table.set("set_string", new set_string());
table.set("set_bytes", new set_bytes());
table.set("get_type", new get_type());
table.set("set_type", new set_type());
instance.registerPackage("bytes", table);
return table;
}