code: def getLong(t):
      
      i = c_long()
      if PL_get_long(t, byref(i)):
          return i.value
      else:
          raise InvalidTypeError("long")
docs: If t is of type long, return it, otherwise raise InvalidTypeError.