MCPcopy Create free account
hub / github.com/apitrace/apitrace / _diff

Method _diff

scripts/tracediff.py:294–306  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

292 pass
293
294 def _diff(self):
295 matcher = difflib.SequenceMatcher(self.isjunk, self.a, self.b)
296 for tag, alo, ahi, blo, bhi in matcher.get_opcodes():
297 if tag == 'replace':
298 self.replace(alo, ahi, blo, bhi)
299 elif tag == 'delete':
300 self.delete(alo, ahi, blo, bhi)
301 elif tag == 'insert':
302 self.insert(alo, ahi, blo, bhi)
303 elif tag == 'equal':
304 self.equal(alo, ahi, blo, bhi)
305 else:
306 raise ValueError('unknown tag %s' % (tag,))
307
308 def isjunk(self, call):
309 return call.functionName == 'glGetError' and call.ret in ('GL_NO_ERROR', 0)

Callers 1

diffMethod · 0.95

Calls 4

replaceMethod · 0.95
deleteMethod · 0.95
insertMethod · 0.95
equalMethod · 0.95

Tested by

no test coverage detected