Convert to midp apis

This commit is contained in:
James Roseborough
2010-07-06 16:25:24 +00:00
parent ef6e5120a9
commit 806e41dd17
2 changed files with 5 additions and 3 deletions

View File

@@ -569,8 +569,10 @@ public class LuaTable extends LuaValue {
Varargs n = next(k); Varargs n = next(k);
if ( (k = n.arg1()).isnil() ) if ( (k = n.arg1()).isnil() )
break; break;
l.add( k ); l.addElement( k );
} }
return (LuaValue[]) l.toArray(new LuaValue[l.size()]); LuaValue[] a = new LuaValue[l.size()];
l.copyInto(a);
return a;
} }
} }

View File

@@ -61,7 +61,7 @@ public class WeakTable extends LuaTable {
return super.getHashLength(); return super.getHashLength();
} }
protected WeakTable changemode(boolean weakkeys, boolean weakvalues) { protected LuaTable changemode(boolean weakkeys, boolean weakvalues) {
this.weakkeys = weakkeys; this.weakkeys = weakkeys;
this.weakvalues = weakvalues; this.weakvalues = weakvalues;
return this; return this;