From def6e0d049161280f7709cdb57781c062e7137f4 Mon Sep 17 00:00:00 2001 From: Robert Bradshaw Date: Sat, 7 Mar 2009 12:58:05 -0800 Subject: [PATCH] re-instate @cython.locals in pxd --- Cython/Compiler/Scanning.pxd | 1 + Cython/Compiler/Scanning.py | 1 - Cython/Plex/Scanners.pxd | 6 ++++++ Cython/Plex/Scanners.py | 6 ------ 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/Cython/Compiler/Scanning.pxd b/Cython/Compiler/Scanning.pxd index d3220387..4df5f301 100644 --- a/Cython/Compiler/Scanning.pxd +++ b/Cython/Compiler/Scanning.pxd @@ -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) diff --git a/Cython/Compiler/Scanning.py b/Cython/Compiler/Scanning.py index 9e019f9e..3b448fca 100644 --- a/Cython/Compiler/Scanning.py +++ b/Cython/Compiler/Scanning.py @@ -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. diff --git a/Cython/Plex/Scanners.pxd b/Cython/Plex/Scanners.pxd index 375ab4cd..58c9a670 100644 --- a/Cython/Plex/Scanners.pxd +++ b/Cython/Plex/Scanners.pxd @@ -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) diff --git a/Cython/Plex/Scanners.py b/Cython/Plex/Scanners.py index 5f4af56d..c76ec706 100644 --- a/Cython/Plex/Scanners.py +++ b/Cython/Plex/Scanners.py @@ -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: -- 2.26.2