def check_sized_string(result, func, cargs):
    if not result:
        raise GEOSException('Invalid string pointer returned by GEOS C function "%s"' % func.__name__)
    # A c_size_t object is passed in by reference for the second
    # argument on these routines, and its needed to determine the
    # correct size.
    s = string_at(result, last_arg_byref(cargs))
    libc.free(result)
    return s
Decodes incoming text/bytes string using `incoming` if they're not
dataset/ETHPy150Open dcramer/django-compositepks/django/contrib/gis/geos/prototypes/errcheck.py/check_sized_string--crossover with--dataset/ETHPy150Open openstack/python-rackclient/rackclient/openstack/common/strutils.py/safe_decode