Skip to content

Commit

Permalink
Fix crash and bug in AnnotationCCodeWriter
Browse files Browse the repository at this point in the history
  • Loading branch information
HoytKoepke committed Aug 19, 2008
1 parent e4add80 commit 66bc1c6
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions Cython/Compiler/Annotate.py
Original file line number Diff line number Diff line change
Expand Up @@ -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 = {}
Expand All @@ -29,7 +29,8 @@ def __init__(self, create_from=None, buffer=None, copy_formatting=True):
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)

Expand Down

0 comments on commit 66bc1c6

Please sign in to comment.