re-instate @cython.locals in pxd
authorRobert Bradshaw <robertwb@math.washington.edu>
Sat, 7 Mar 2009 20:58:05 +0000 (12:58 -0800)
committerRobert Bradshaw <robertwb@math.washington.edu>
Sat, 7 Mar 2009 20:58:05 +0000 (12:58 -0800)
Cython/Compiler/Scanning.pxd
Cython/Compiler/Scanning.py
Cython/Plex/Scanners.pxd
Cython/Plex/Scanners.py

index d3220387282aecc2063acd0939d6a788482da6e8..4df5f3013a986ebdd1f85198c6027f78c5316c5b 100644 (file)
@@ -25,4 +25,5 @@ cdef class PyrexScanner(Scanner):
     cpdef next(self)
     cpdef bint expect(self, what, message = *) except -2
     
+    @cython.locals(current_level=cython.long, new_level=cython.long)
     cpdef indentation_action(self, text)
index 9e019f9e458f78bfe42ac110da51f7c0024390ba..3b448fca8803f7f6245478f51227de8a655d3d4c 100644 (file)
@@ -367,7 +367,6 @@ class PyrexScanner(Scanner):
         self.end_string_action(text)
         self.error("Unclosed string literal")
 
-    @cython.locals(current_level=cython.long, new_level=cython.long)
     def indentation_action(self, text):
         self.begin('')
         # Indentation within brackets should be ignored.
index 375ab4cd365568f4df5558ae578f39dcf59c830e..58c9a670282c94e14106eba8c55de35dd39fedd4 100644 (file)
@@ -24,10 +24,16 @@ cdef class Scanner:
 
     cdef public level
 
+    @cython.locals(input_state=long)
     cpdef next_char(self)
     cpdef read(self)
     cpdef position(self)
 
+    @cython.locals(cur_pos=cython.long, cur_line=cython.long,
+                 cur_line_start=cython.long, input_state=cython.long,
+                 next_pos=cython.long, buf_start_pos=cython.long,
+                 buf_len=cython.long, buf_index=cython.long,
+                 trace=cython.bint, discard=cython.long)
     cpdef run_machine_inlined(self)
     
     cpdef begin(self, state)
index 5f4af56d2497da59cc78bf146224b17cf27beb10..c76ec7067843549a927d84503ac8d09c28dfc58d 100644 (file)
@@ -160,11 +160,6 @@ class Scanner:
       pass
     return self.back_up()
 
-  @cython.locals(cur_pos=cython.long, cur_line=cython.long,
-                 cur_line_start=cython.long, input_state=cython.long,
-                 next_pos=cython.long, buf_start_pos=cython.long,
-                 buf_len=cython.long, buf_index=cython.long,
-                 trace=cython.bint, discard=cython.long)
   def run_machine_inlined(self):
     """
     Inlined version of run_machine for speed.
@@ -305,7 +300,6 @@ class Scanner:
 #        else:
 #            return None
 
-  @cython.locals(input_state=long)
   def next_char(self):
     input_state = self.input_state
     if self.trace: