def check_const_string(result, func, cargs, offset=None, cpl=False):
 if offset:
  check_err(result, cpl=cpl)
  ptr = ptr_byref(cargs, offset)
  return ptr.value
 else:
  return result

def check_const_string ( result , func , cargs , offset = None , cpl = False ) : if offset : check_err ( result , cpl = cpl ) ptr = ptr_byref ( cargs , offset ) return ptr . value else : return result
similar functionality to check_string .