def check_srs(result, func, cargs):
    if isinstance(result, six.integer_types):
        result = c_void_p(result)
    if not result:
        raise SRSException('Invalid spatial reference pointer returned from "%s".' % func.__name__)
    return result


# ### Other error-checking routines ###
dataset/ETHPy150Open django/django/django/contrib/gis/gdal/prototypes/errcheck.py/check_srs/original