'Return a Python integer from any native integer value.'

def long_from_signed_int(self, ival):

    bits = ival.type.width
    if (bits <= self.long.width):
        return self.long_from_long(self.builder.sext(ival, self.long))
    elif (bits <= self.longlong.width):
        return self.long_from_longlong(self.builder.sext(ival, self.longlong))
    else:
        raise OverflowError(('integer    too    big    (%d    bits)' % bits))
