mirror of
https://github.com/gnosygnu/xowa.git
synced 2026-03-02 03:49:30 +00:00
Scribunto: Make table accessible from datawrapper in mw.lua [#586]
This commit is contained in:
@@ -58,7 +58,7 @@ public class Xoh_make_fxt {
|
||||
}
|
||||
public void Expd__redlinks(String... ary) {
|
||||
int len = ary.length;
|
||||
for (int i = 0; i < len; i++) {
|
||||
for (int i = 0; i < len; i++) {
|
||||
Xopg_lnki_itm__hdump itm = new Xopg_lnki_itm__hdump(wiki.Ttl_parse(Bry_.new_u8(ary[i])));
|
||||
expd_redlinks.Add(itm);
|
||||
}
|
||||
|
||||
@@ -35,6 +35,14 @@ class Luaj_value_ {
|
||||
int rv_idx = 0;
|
||||
LuaValue cur = LuaValue.NIL; // needed for luaj iterator; tbl.next(cur);
|
||||
|
||||
// override tbl with xo_orig_table from mw.lua.dataWrapper; ISSUE#:586: DATE:2019-10-29
|
||||
LuaValue metatable_obj = tbl.getmetatable();
|
||||
if (metatable_obj != null && !metatable_obj.isnil()) {
|
||||
LuaValue orig_data_obj = ((LuaTable)metatable_obj).get("xo_orig_data");
|
||||
if (orig_data_obj != null && !orig_data_obj.isnil())
|
||||
tbl = (LuaTable)orig_data_obj;
|
||||
}
|
||||
|
||||
// loop over pairs in tbl; no direct way to get kvs
|
||||
while (true) {
|
||||
// get next itm
|
||||
|
||||
Reference in New Issue
Block a user