From d9f18f734cff972dcacc26dd1eae96110874aea2 Mon Sep 17 00:00:00 2001 From: xi Date: Thu, 26 Jul 2007 19:10:44 +0000 Subject: [PATCH] Fixed _yaml.pyx to work with the latest Pyrex. git-svn-id: http://svn.pyyaml.org/pyyaml/trunk@257 18f92427-320e-0410-9341-c67f048884a3 --- ext/_yaml.pyx | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/ext/_yaml.pyx b/ext/_yaml.pyx index 00d8334..ac8f803 100644 --- a/ext/_yaml.pyx +++ b/ext/_yaml.pyx @@ -281,9 +281,9 @@ cdef class CParser: cdef object _parser_error(self): if self.parser.error == YAML_MEMORY_ERROR: - raise MemoryError + return MemoryError elif self.parser.error == YAML_READER_ERROR: - raise ReaderError(self.stream_name, self.parser.problem_offset, + return ReaderError(self.stream_name, self.parser.problem_offset, self.parser.problem_value, '?', self.parser.problem) elif self.parser.error == YAML_SCANNER_ERROR \ or self.parser.error == YAML_PARSER_ERROR: @@ -609,9 +609,9 @@ cdef class CParser: if event.data.mapping_start.implicit == 1: implicit = True flow_style = None - if event.data.mapping_start.style == YAML_FLOW_SEQUENCE_STYLE: + if event.data.mapping_start.style == YAML_FLOW_MAPPING_STYLE: flow_style = True - elif event.data.mapping_start.style == YAML_BLOCK_SEQUENCE_STYLE: + elif event.data.mapping_start.style == YAML_BLOCK_MAPPING_STYLE: flow_style = False return MappingStartEvent(anchor, tag, implicit, start_mark, end_mark, flow_style) -- 2.11.4.GIT