Exemplo n.º 1
0
 @Override
 public long truncate(long size) {
   PyType self_type = getType();
   PyObject impl = self_type.lookup("truncate");
   if (impl != null) {
     return impl.__get__(this, self_type).__call__(Py.newLong(size)).asLong();
   } else {
     return super.truncate(size);
   }
 }
Exemplo n.º 2
0
 @Override
 public long seek(long pos, int whence) {
   PyType self_type = getType();
   PyObject impl = self_type.lookup("seek");
   if (impl != null) {
     return impl.__get__(this, self_type)
         .__call__(Py.newLong(pos), Py.newInteger(whence))
         .asLong();
   } else {
     return super.seek(pos, whence);
   }
 }
 public final PyObject invoke(PyObject[] args) {
   return Py.newLong(jffiInvoker.invokeAddress(jffiFunction, convertArguments(args)));
 }