asInt property

int asInt

Converts a python int to a dart int

Implementation

int get asInt {
  final res = dartpyc.PyLong_AsLong(this);
  if (!pyErrOccurred()) {
    dartpyc.Py_DecRef(this);
    return res;
  }
  throw DartPyException('Error in converting to an dart int');
}