Adds the references from one manager to another. We assume that both managers have the same block structure.
(self, mgr: BaseBlockManager)
| 317 | return not self.blocks[blkno].refs.has_reference() |
| 318 | |
| 319 | def add_references(self, mgr: BaseBlockManager) -> None: |
| 320 | """ |
| 321 | Adds the references from one manager to another. We assume that both |
| 322 | managers have the same block structure. |
| 323 | """ |
| 324 | if len(self.blocks) != len(mgr.blocks): |
| 325 | # If block structure changes, then we made a copy |
| 326 | return |
| 327 | for i, blk in enumerate(self.blocks): |
| 328 | blk.refs = mgr.blocks[i].refs |
| 329 | blk.refs.add_reference(blk) |
| 330 | |
| 331 | def references_same_values(self, mgr: BaseBlockManager, blkno: int) -> bool: |
| 332 | """ |
no outgoing calls
no test coverage detected