1 package org.python.core; 3 4 class ReflectedCallData { 5 public Object [] args; 6 public int length; 7 public Object self; 8 public int errArg; 9 10 public ReflectedCallData() { 11 args = Py.EmptyObjects; 12 length = 0; 13 self = null; 14 errArg = -2; 15 } 16 17 public void setLength(int newLength) { 18 length = newLength; 19 if (newLength <= args.length) 20 return; 21 args = new Object [newLength]; 22 } 23 24 public Object [] getArgsArray() { 25 if (length == args.length) 26 return args; 27 Object [] newArgs = new Object [length]; 28 System.arraycopy(args, 0, newArgs, 0, length); 29 args = newArgs; 30 return newArgs; 31 } 32 } 33 | Popular Tags |