From: Stefan Behnel Date: Sat, 20 Mar 2010 17:07:43 +0000 (+0100) Subject: avoid redundant Python type conversion in scanner X-Git-Tag: 0.13.beta0~274 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=01af8155435780f70871591663d7da6430dd3cfa;p=cython.git avoid redundant Python type conversion in scanner --- 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: