projects
/
cython.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
599b26e
)
avoid redundant Python type conversion in scanner
author
Stefan Behnel
<scoder@users.berlios.de>
Sat, 20 Mar 2010 17:07:43 +0000
(18:07 +0100)
committer
Stefan Behnel
<scoder@users.berlios.de>
Sat, 20 Mar 2010 17:07:43 +0000
(18:07 +0100)
Cython/Plex/Scanners.py
patch
|
blob
|
history
diff --git
a/Cython/Plex/Scanners.py
b/Cython/Plex/Scanners.py
index c4181337006e52e6751cdabaca118a1c74e2c021..c8519047ef73df35ebbb1c7494161f67c63d3411 100644
(file)
--- 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: