Skip to content

Commit

Permalink
modified get_sequence_points to eliminate multiple calls to method.Se…
Browse files Browse the repository at this point in the history
…quencePointCount
  • Loading branch information
Harry Pierson committed Mar 11, 2009
1 parent da2d4b7 commit 607873f
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions ipydbg.py
Expand Up @@ -39,17 +39,18 @@ def __str__(self):
return "%s:%d (offset: %d)" % (Path.GetFileName(self.doc.URL), self.start_line, self.offset)

def get_sequence_points(method):
spOffsets = Array.CreateInstance(int, method.SequencePointCount)
spDocs = Array.CreateInstance(ISymbolDocument, method.SequencePointCount)
spStartLines = Array.CreateInstance(int, method.SequencePointCount)
spEndLines = Array.CreateInstance(int, method.SequencePointCount)
spStartCol = Array.CreateInstance(int, method.SequencePointCount)
spEndCol = Array.CreateInstance(int, method.SequencePointCount)
sp_count = method.SequencePointCount
spOffsets = Array.CreateInstance(int, sp_count)
spDocs = Array.CreateInstance(ISymbolDocument, sp_count)
spStartLines = Array.CreateInstance(int, sp_count)
spEndLines = Array.CreateInstance(int, sp_count)
spStartCol = Array.CreateInstance(int, sp_count)
spEndCol = Array.CreateInstance(int, sp_count)

method.GetSequencePoints(spOffsets, spDocs, spStartLines, spStartCol,
spEndLines, spEndCol)

for i in range(method.SequencePointCount):
for i in range(sp_count):
yield sequence_point(spOffsets[i], spDocs[i], spStartLines[i],
spStartCol[i], spEndLines[i], spEndCol[i])

Expand Down Expand Up @@ -205,5 +206,4 @@ def input():
break

input()



0 comments on commit 607873f

Please sign in to comment.