#NEWLINE# def check_const_string( result , func , cargs , offset = None ) : #NEWLINE# #INDENT# '\n    Similar functionality to `check_string`, but does not free the pointer.\n    ' #NEWLINE# if offset : #NEWLINE# #INDENT# check_err ( result ) #NEWLINE# ptr = ptr_byref ( cargs , func ) #NEWLINE# return ptr . value #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# return result