def close(self): """Close xdr trajectory file if it was open.""" if self.xdrfile is None: return libxdrfile2.xdrfile_close(self.xdrfile) self.xdrfile = None # guard against crashing with a double-free pointer
def close(self): status = libxdrfile2.exdrCLOSE if not self.xdrfile is None: status = libxdrfile2.xdrfile_close(self.xdrfile) self.xdrfile = None return status