more typing in Scanners.pxd for slightly faster scanning
authorStefan Behnel <scoder@users.berlios.de>
Wed, 10 Nov 2010 22:49:36 +0000 (23:49 +0100)
committerStefan Behnel <scoder@users.berlios.de>
Wed, 10 Nov 2010 22:49:36 +0000 (23:49 +0100)
Cython/Plex/Scanners.pxd

index c40d8e6dedca8309479b5ff157774b34e66694a2..ed08953f6fe2d3418154696116896042994d21cf 100644 (file)
@@ -5,7 +5,7 @@ cdef class Scanner:
     cdef public lexicon
     cdef public stream
     cdef public name
-    cdef public buffer
+    cdef public unicode buffer
     cdef public Py_ssize_t buf_start_pos
     cdef public Py_ssize_t next_pos
     cdef public Py_ssize_t cur_pos
@@ -32,9 +32,9 @@ cdef class Scanner:
     cpdef tuple position(self)
 
     @cython.locals(cur_pos=long, cur_line=long, cur_line_start=long,
-                   input_state=long, next_pos=long,
+                   input_state=long, next_pos=long, state=dict,
                    buf_start_pos=long, buf_len=long, buf_index=long,
-                   trace=bint, discard=long)
+                   trace=bint, discard=long, data=unicode, buffer=unicode)
     cpdef run_machine_inlined(self)
     
     cpdef begin(self, state)