[Pypersyst-cvs] pypersyst/pypersyst/entity extent.py,1.7,1.8
Brought to you by:
pobrien
From: <po...@us...> - 2003-08-28 16:24:25
|
Update of /cvsroot/pypersyst/pypersyst/pypersyst/entity In directory sc8-pr-cvs1:/tmp/cvs-serv31424/entity Modified Files: extent.py Log Message: be nice to pickles Index: extent.py =================================================================== RCS file: /cvsroot/pypersyst/pypersyst/pypersyst/entity/extent.py,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** extent.py 28 Aug 2003 15:06:43 -0000 1.7 --- extent.py 28 Aug 2003 16:24:22 -0000 1.8 *************** *** 49,52 **** --- 49,53 ---- del d['_linkattrs'] del d['_linkattrids'] + del d['_nextlinkattrid'] del d['_linksFromTo'] del d['_linksToFrom'] *************** *** 56,59 **** --- 57,68 ---- def __setstate__(self, state): """Sets state after unpickling.""" + self._instances = {} + self._nextoid = 0 + self._altkeys = {} + self._linkattrs = {} + self._linkattrids = {} + self._nextlinkattrid = 0 + self._linksFromTo = {} + self._linksToFrom = {} self.__dict__.update(state) *************** *** 232,240 **** def _refreshlinks(self): """Refresh links.""" - self._linkattrs = {} - self._linkattrids = {} - self._nextlinkattrid = 0 - self._linksFromTo = {} - self._linksToFrom = {} for instance in self._instances.values(): self._addlinks(instance) --- 241,244 ---- |