#NEWLINE# def check_sized_string( result , func , cargs ) : #NEWLINE# #INDENT# 'Error checking for routines that return explicitly sized strings.' #NEWLINE# if ( not result ) : #NEWLINE# #INDENT# raise GEOSException ( ( 'Invalid string pointer returned by GEOS C function "%s"' % result . __name__ ) ) #NEWLINE# #UNINDENT# s = string_at ( result , last_arg_byref ( cargs ) ) #NEWLINE# libc . free ( result ) #NEWLINE# return s