def check_str_arg(result, func, cargs):
    dbl = result
    ptr = cargs[-1]._obj
    return dbl, ptr.value
This is for the OSRGet[Angular|Linear]Units functions, which
dataset/ETHPy150Open AppScale/appscale/AppServer/lib/django-1.2/django/contrib/gis/gdal/prototypes/errcheck.py/check_str_arg