MCPcopy Create free account
hub / github.com/RetiredWizard/PyDOS / hash_buffer

Method hash_buffer

pye.py:1003–1007  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

1001 sb.write(c)
1002 return sb.getvalue()
1003 def hash_buffer(self):
1004 res = 0
1005 for line in self.content:
1006 res = ((res * 227 + 1) ^ hash(line)) & 0x3fffffff
1007 return res
1008 def get_file(self, fname):
1009 if fname:
1010 try:

Callers 5

redrawMethod · 0.95
undo_redoMethod · 0.95
handle_edit_keysMethod · 0.95
edit_loopMethod · 0.95
get_fileMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected