From 01af8155435780f70871591663d7da6430dd3cfa Mon Sep 17 00:00:00 2001 From: Stefan Behnel Date: Sat, 20 Mar 2010 18:07:43 +0100 Subject: [PATCH] avoid redundant Python type conversion in scanner --- Cython/Plex/Scanners.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Cython/Plex/Scanners.py b/Cython/Plex/Scanners.py index c4181337..c8519047 100644 --- a/Cython/Plex/Scanners.py +++ b/Cython/Plex/Scanners.py @@ -138,8 +138,8 @@ class Scanner(object): if self.trace: print("Scanner: read: Performing %s %d:%d" % ( action, self.start_pos, self.cur_pos)) - base = self.buf_start_pos - text = self.buffer[self.start_pos - base : self.cur_pos - base] + text = self.buffer[self.start_pos - self.buf_start_pos : + self.cur_pos - self.buf_start_pos] return (text, action) else: if self.cur_pos == self.start_pos: -- 2.26.2