diff options
author | xi <xi@18f92427-320e-0410-9341-c67f048884a3> | 2007-07-26 19:10:44 +0000 |
---|---|---|
committer | xi <xi@18f92427-320e-0410-9341-c67f048884a3> | 2007-07-26 19:10:44 +0000 |
commit | d9f18f734cff972dcacc26dd1eae96110874aea2 (patch) | |
tree | c022320f98bfe5d870710b1dcede86ba309eed6c /ext | |
parent | 57ce7d740210b3f52b379ebb3491f99722572553 (diff) | |
download | pyyaml-d9f18f734cff972dcacc26dd1eae96110874aea2.tar.gz |
Fixed _yaml.pyx to work with the latest Pyrex.
git-svn-id: http://svn.pyyaml.org/pyyaml/trunk@257 18f92427-320e-0410-9341-c67f048884a3
Diffstat (limited to 'ext')
-rw-r--r-- | ext/_yaml.pyx | 8 |
1 files 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) |