diff options
author | HoytKoepke <none@none> | 2008-08-18 19:02:28 -0700 |
---|---|---|
committer | HoytKoepke <none@none> | 2008-08-18 19:02:28 -0700 |
commit | 66bc1c6ffbedd8772cf5afed2c4a10239e2f072c (patch) | |
tree | 84db627e85214cfe7888ccfa30bf183a52b02353 | |
parent | e4add80f5d3d9a45e385c367f2961b1e0b39938a (diff) | |
download | cython-66bc1c6ffbedd8772cf5afed2c4a10239e2f072c.tar.gz |
Fix crash and bug in AnnotationCCodeWriter0.9.8.1
-rw-r--r-- | Cython/Compiler/Annotate.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/Cython/Compiler/Annotate.py b/Cython/Compiler/Annotate.py index 5f6ca4174..4a8a27bb2 100644 --- a/Cython/Compiler/Annotate.py +++ b/Cython/Compiler/Annotate.py @@ -19,8 +19,8 @@ class AnnotationCCodeWriter(CCodeWriter): def __init__(self, create_from=None, buffer=None, copy_formatting=True): CCodeWriter.__init__(self, create_from, buffer, copy_formatting=True) - self.annotation_buffer = StringIO() if create_from is None: + self.annotation_buffer = StringIO() self.annotations = [] self.last_pos = None self.code = {} @@ -29,7 +29,8 @@ class AnnotationCCodeWriter(CCodeWriter): self.annotation_buffer = create_from.annotation_buffer self.annotations = create_from.annotations self.code = create_from.code - + self.last_pos = create_from.last_pos + def create_new(self, create_from, buffer, copy_formatting): return AnnotationCCodeWriter(create_from, buffer, copy_formatting) |